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
This commit is contained in:
parent
99efde5673
commit
0d963df7b3
@ -93,7 +93,8 @@ Indicator.prototype = {
|
|||||||
this._updateFullMenu();
|
this._updateFullMenu();
|
||||||
|
|
||||||
this.menu.addAction(_("Bluetooth Settings"), function() {
|
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));
|
this._applet.connect('pincode-request', Lang.bind(this, this._pinRequest));
|
||||||
|
@ -74,7 +74,8 @@ XKBIndicator.prototype = {
|
|||||||
Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
|
Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
|
||||||
}));
|
}));
|
||||||
this.menu.addAction(_("Localization Settings"), function() {
|
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);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1486,7 +1486,8 @@ NMApplet.prototype = {
|
|||||||
this.menu.addMenuItem(this._devices.vpn.section);
|
this.menu.addMenuItem(this._devices.vpn.section);
|
||||||
|
|
||||||
this.menu.addAction(_("Network Settings"), function() {
|
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 = [ ];
|
this._activeConnections = [ ];
|
||||||
|
Loading…
Reference in New Issue
Block a user