gtg team mailing list archive
-
gtg team
-
Mailing list archive
-
Message #03472
[Merge] lp:~mmcasetti/gtg/search into lp:gtg
Marta Maria Casetti has proposed merging lp:~mmcasetti/gtg/search into lp:gtg.
Requested reviews:
Gtg developers (gtg)
For more details, see:
https://code.launchpad.net/~mmcasetti/gtg/search/+merge/99516
Search through DBus
--
https://code.launchpad.net/~mmcasetti/gtg/search/+merge/99516
Your team Gtg developers is requested to review the proposed merge of lp:~mmcasetti/gtg/search into lp:gtg.
=== modified file 'AUTHORS'
--- AUTHORS 2012-03-27 08:50:01 +0000
+++ AUTHORS 2012-03-27 13:11:29 +0000
@@ -96,8 +96,12 @@
* Paul Kishimoto <mail@xxxxxxxxxxxxxxxxxxx>
* Wolter Hellmund <wolterh6@xxxxxxxxx>
* huxuan <i@xxxxxxxxxx>
+<<<<<<< TREE
* Nimit Shah <nimit.svnit@xxxxxxxxx>
* Abdul Rauf <abdulraufhaseeb@xxxxxxxxx>
* Radina Matic <radina.matic@xxxxxxxxx>
* Steve Scheel <nmu.sscheel@xxxxxxxxx>
* Anant Gupta <anant718@xxxxxxxxxxx>
+=======
+* Marta Maria Casetti <mmcasetti@xxxxxxxxx>
+>>>>>>> MERGE-SOURCE
=== modified file 'CHANGELOG'
--- CHANGELOG 2012-03-27 08:50:01 +0000
+++ CHANGELOG 2012-03-27 13:11:29 +0000
@@ -6,7 +6,11 @@
* Removed module GTG.tools.openurl and replaced by python's webbrowser.open
* Removed import_json plugin
* Saved searches could have assigned color
+<<<<<<< TREE
* Stopped links from opening when accidently letting go of mouse button while selecting them, #823339, by Steve Scheel
+=======
+ * Search through DBus
+>>>>>>> MERGE-SOURCE
2012-02-13 Getting Things GNOME! 0.2.9
* Big refractorization of code, now using liblarch
=== modified file 'GTG/gtk/dbuswrapper.py'
--- GTG/gtk/dbuswrapper.py 2012-03-17 02:20:46 +0000
+++ GTG/gtk/dbuswrapper.py 2012-03-27 13:11:29 +0000
@@ -22,9 +22,10 @@
import dbus.glib
import dbus.service
-from GTG.core import CoreConfig
-from GTG.tools.dates import Date
-
+from GTG.core import CoreConfig
+from GTG.tools.dates import Date
+from GTG.core.search import InvalidQuery
+from GTG.core.search import parse_search_query
BUSNAME = CoreConfig.BUSNAME
BUSFACE = CoreConfig.BUSINTERFACE
@@ -143,7 +144,21 @@
return [self.GetTask(id) for id in tasks]
else:
return dbus.Array([], "s")
-
+
+ @dbus.service.method(BUSNAME, in_signature="s", out_signature="as")
+ def SearchTasks(self, query):
+ """
+ Searches the task list
+ """
+ tree = self.req.get_tasks_tree().get_basetree()
+ view = tree.get_viewtree()
+ try:
+ search = parse_search_query(query)
+ view.apply_filter('search', parameters = search)
+ return view.get_all_nodes()
+ except InvalidQuery:
+ return dbus.Array([], "s")
+
@dbus.service.method(BUSNAME)
def HasTask(self, tid):
"""
=== modified file 'GTG/gtk/preferences.py'
--- GTG/gtk/preferences.py 2012-03-26 22:18:17 +0000
+++ GTG/gtk/preferences.py 2012-03-27 13:11:29 +0000
@@ -98,7 +98,7 @@
elif modules and dbus:
text = '\n'.join((GnomeConfig.bmiss2, modules, dbus))
else:
- test = ""
+ text = ""
return text
def plugin_error_text(plugin):