deskbar-applet r2162 - in trunk: . deskbar/handlers
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r2162 - in trunk: . deskbar/handlers
- Date: Mon, 12 May 2008 18:14:12 +0100 (BST)
Author: sebp
Date: Mon May 12 17:14:12 2008
New Revision: 2162
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2162&view=rev
Log:
Added OpenThunderbirdMailMessageAction.
Mail messages are now opened in either evolution or thunderbird (fixes #420475).
Display e-mail address as author when no name is available
Modified:
trunk/ChangeLog
trunk/deskbar/handlers/beagle-live.py
Modified: trunk/deskbar/handlers/beagle-live.py
==============================================================================
--- trunk/deskbar/handlers/beagle-live.py (original)
+++ trunk/deskbar/handlers/beagle-live.py Mon May 12 17:14:12 2008
@@ -104,7 +104,10 @@
self.set_name_properties(("dc:title",
"parent:dc:title",))
self.set_extra_properties({"sender": ("fixme:from_name",
- "parent:fixme:from_name",)
+ "parent:fixme:from_name",
+ "fixme:from",),
+ "client": ("fixme:client",),
+ "thunderbird-uri": ("fixme:uri",)
})
self.set_category("emails")
@@ -253,6 +256,17 @@
def get_verb(self):
return "<b>%(name)s</b>"
+
+class OpenThunderbirdMailMessageAction(OpenWithApplicationAction):
+ def __init__(self, name, uri):
+ OpenWithApplicationAction.__init__(self, name, "thunderbird",
+ ["-viewbeagle", uri])
+
+ def get_icon(self):
+ return "stock_mail"
+
+ def get_verb(self):
+ return "<b>%(name)s</b>"
class OpenFeedAction(ShowUrlAction):
def __init__(self, name, identifier, publisher=None, snippet=None):
@@ -397,7 +411,14 @@
if isinstance(result["type"], ContactType):
self.add_action( OpenContactAction(result["name"], result["uri"]) )
elif isinstance(result["type"], MailMessageType):
- self.add_action( OpenMailMessageAction(result["name"], result["uri"]) )
+ if result["client"] == "thunderbird":
+ action = OpenThunderbirdMailMessageAction(result["name"], result["thunderbird-uri"])
+ elif result["client"] == "evolution":
+ action = OpenMailMessageAction(result["name"], result["uri"])
+ else:
+ LOGGER.warning("Unknown/Unsupported e-mail client %s", result["client"])
+ return
+ self.add_action( action )
self.set_snippet( _("From <i>%s</i>") % result["sender"] )
elif isinstance(result["type"], FeedItemType):
self.add_action( OpenFeedAction(result["name"], result["identifier"]) )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]