Merge lp:~invernizzi/gnome-activity-journal/GAJ-todo-gtg into lp:gnome-activity-journal

Proposed by Luca Invernizzi
Status: Merged
Merge reported by: Randal Barlow
Merged at revision: not available
Proposed branch: lp:~invernizzi/gnome-activity-journal/GAJ-todo-gtg
Merge into: lp:gnome-activity-journal
Diff against target: 47 lines (+22/-1)
2 files modified
src/config.py (+1/-0)
src/content_objects.py (+21/-1)
To merge this branch: bzr merge lp:~invernizzi/gnome-activity-journal/GAJ-todo-gtg
Reviewer Review Type Date Requested Status
Randal Barlow Pending
Review via email: mp+28799@code.launchpad.net

Description of the change

Hello there,
This adds support for TODO elements in GAJ, in particular those coming from "Getting Things GNOME!".
The code to export GTG tasks to zeitgeist is available in [0], and will land in GTG trunk in less than a month.

I'll take this occasion to ask: how can I control the length of the yellow bar in [1] (which "Interpetation" do you use for that)? Yes, I could read your code, just a bit lazy :)

[0] lp:~gtg-user/gtg/multi-backends__invernizzi_gsoc/
[1] http://yfrog.com/3uscreenshottkp

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/config.py'
--- src/config.py 2010-06-19 19:21:44 +0000
+++ src/config.py 2010-06-29 21:05:40 +0000
@@ -244,5 +244,6 @@
244 Interpretation.IMMESSAGE.uri: Source(Interpretation.IMMESSAGE, "applications-internet", _("Conversation"), _("Conversations")),244 Interpretation.IMMESSAGE.uri: Source(Interpretation.IMMESSAGE, "applications-internet", _("Conversation"), _("Conversations")),
245 Interpretation.WEBSITE.uri: Source(Interpretation.WEBSITE, "gnome-mime-html", _("Website"), _("Websites")),245 Interpretation.WEBSITE.uri: Source(Interpretation.WEBSITE, "gnome-mime-html", _("Website"), _("Websites")),
246 Interpretation.EMAIL.uri: Source(Interpretation.EMAIL, "applications-internet", _("Email"), _("Emails")),246 Interpretation.EMAIL.uri: Source(Interpretation.EMAIL, "applications-internet", _("Email"), _("Emails")),
247 Interpretation.TODO.uri: Source(Interpretation.TODO, "applications-office", _("Todo"), _("Todos")),
247 INTERPRETATION_UNKNOWN: Source("Unknown", "applications-other", _("Other Activity"), _("Other Activities")),248 INTERPRETATION_UNKNOWN: Source("Unknown", "applications-other", _("Other Activity"), _("Other Activities")),
248}249}
249250
=== modified file 'src/content_objects.py'
--- src/content_objects.py 2010-05-30 03:23:30 +0000
+++ src/content_objects.py 2010-06-29 21:05:40 +0000
@@ -709,6 +709,26 @@
709 common.launch_command("tomboy", ["--open-note", self.uri])709 common.launch_command("tomboy", ["--open-note", self.uri])
710710
711711
712class GTGContentObject(BaseContentType):
713 @classmethod
714 def use_class(cls, event):
715 """ Used by the content object chooser to check if the content object will work for the event"""
716 if event.actor == "application://gtg.desktop":
717 return cls
718 return False
719
720 icon_name = "$ACTOR"
721 text = _("{source._desc_sing} {event.subjects[0].text}")
722 timelineview_text = _("GTG\n{source._desc_sing} {event.subjects[0].text}")
723 thumbview_text = _("GTG\n{source._desc_sing} {event.subjects[0].text}")
724
725 type_color_representation = common.TANGOCOLORS[0], common.TANGOCOLORS[2]
726
727 def launch(self):
728 if common.is_command_available("gtg"):
729 common.launch_command("gtg", [self.uri])
730
731
712class MusicPlayerContentObject(BaseContentType):732class MusicPlayerContentObject(BaseContentType):
713 """Used by music players when the backing subject is not a file"""733 """Used by music players when the backing subject is not a file"""
714734
@@ -741,5 +761,5 @@
741# Content object list used by the section function. Should use Subclasses but I like to have some order in which these should be used761# Content object list used by the section function. Should use Subclasses but I like to have some order in which these should be used
742if sys.version_info >= (2,6):762if sys.version_info >= (2,6):
743 map(AbstractContentObject.content_object_types.append, (MusicPlayerContentObject, BzrContentObject, WebContentObject,763 map(AbstractContentObject.content_object_types.append, (MusicPlayerContentObject, BzrContentObject, WebContentObject,
744 IMContentObject, TomboyContentObject, EmailContentObject, HamsterContentObject))764 IMContentObject, TomboyContentObject, GTGContentObject, EmailContentObject, HamsterContentObject))
745765