[gnome-shell] dateMenu: Use .desktop file to launch calendar



commit 66adeef9bdb66e2ebfc8998f913ca6f915ac2d38
Author: Florian MÃllner <fmuellner gnome org>
Date:   Tue Jun 19 17:56:01 2012 +0200

    dateMenu: Use .desktop file to launch calendar
    
    When selecting "Open Calendar" in the date menu, the configured
    application is launched via command line, so we don't get any
    startup notification. If Evolution is used as calendar application,
    launch it via the .desktop file added by the last commit instead in
    order to fix the issue.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677907

 js/ui/dateMenu.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index 5e5b3af..7a691df 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -167,9 +167,10 @@ const DateMenuButton = new Lang.Class({
         this.menu.close();
         let calendarSettings = new Gio.Settings({ schema: 'org.gnome.desktop.default-applications.office.calendar' });
         let tool = calendarSettings.get_string('exec');
-        if (tool.length == 0 || tool == 'evolution') {
+        if (tool.length == 0 || tool.substr(0, 9) == 'evolution') {
             // TODO: pass the selected day
-            Util.spawn(['evolution', '-c', 'calendar']);
+            let app = Shell.AppSystem.get_default().lookup_app('evolution-calendar.desktop');
+            app.activate();
         } else {
             let needTerm = calendarSettings.get_boolean('needs-term');
             if (needTerm) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]