Updating branch refs/heads/master
to 5a860ad128032b3cb7b44d6b6a66b8131189eb06 (commit)
from 495aabe0932f46af2cf02f178ea4fc7d0c826125 (commit)
commit 5a860ad128032b3cb7b44d6b6a66b8131189eb06
Author: Christian Dywan <[email protected]>
Date: Thu Aug 11 00:33:50 2011 +0200
Work around indicator bug: Fallback to desktop file
Messaging indicator breaks if the desktop file doesn't exist.
postler/postler-service.vala | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/postler/postler-service.vala b/postler/postler-service.vala
index 37956bc..dd0b325 100644
--- a/postler/postler-service.vala
+++ b/postler/postler-service.vala
@@ -307,8 +307,11 @@ namespace Postler {
#if HAVE_INDICATE
indicator = Indicate.Server.ref_default ();
indicator.set_type ("message.email");
- indicator.set_desktop_file (
- Config.DATADIR + "/applications/postler.desktop");
+ /* Work around indicator bug: Manually fallback to system-wide
file */
+ string desktop_file = Config.DATADIR +
"/applications/postler.desktop";
+ if (!FileUtils.test (desktop_file, FileTest.EXISTS))
+ desktop_file = "/usr/share/applications/postler.desktop";
+ indicator.set_desktop_file (desktop_file);
indicator.server_display.connect (() => {
Postler.App.spawn_uri ("");
});
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits