[gnome-shell] status: use Shell.AppSystem to launch settings panels



commit 0d963df7b3ee81419fc74aa2a1a97b47dc49a888
Author: Diego Escalante Urrelo <descalante igalia com>
Date:   Thu Mar 17 21:05:53 2011 -0500

    status: use Shell.AppSystem to launch settings panels
    
    Different methos are being used to launch the control-center panels of each
    status icon. Standarize on Shell.AppSystem.
    This also fixes the network icon using a non-existant Util.spawnDesktop()
    method.
    
    Bug #645091

 js/ui/status/bluetooth.js |    3 ++-
 js/ui/status/keyboard.js  |    3 ++-
 js/ui/status/network.js   |    3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js
index 092cd1a..070016a 100644
--- a/js/ui/status/bluetooth.js
+++ b/js/ui/status/bluetooth.js
@@ -93,7 +93,8 @@ Indicator.prototype = {
         this._updateFullMenu();
 
         this.menu.addAction(_("Bluetooth Settings"), function() {
-            GLib.spawn_command_line_async('gnome-control-center bluetooth');
+            let app = Shell.AppSystem.get_default().get_app('bluetooth-properties.desktop');
+            app.activate(-1);
         });
 
         this._applet.connect('pincode-request', Lang.bind(this, this._pinRequest));
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index ae498e0..06a0b49 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -74,7 +74,8 @@ XKBIndicator.prototype = {
             Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
         }));
         this.menu.addAction(_("Localization Settings"), function() {
-            Util.spawn(['gnome-control-center', 'region']);
+            let app = Shell.AppSystem.get_default().get_app('gnome-region-panel.desktop');
+            app.activate(-1);
         });
     },
 
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 3b240f3..2e33b4b 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -1486,7 +1486,8 @@ NMApplet.prototype = {
         this.menu.addMenuItem(this._devices.vpn.section);
 
         this.menu.addAction(_("Network Settings"), function() {
-            Util.spawnDesktop('gnome-network-panel');
+            let app = Shell.AppSystem.get_default().get_app('gnome-network-panel.desktop');
+            app.activate(-1);
         });
 
         this._activeConnections = [ ];



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