GNOME Bugzilla – Bug 709246
Mobile broadband submenu should link to the control center mobile broadband settings
Last modified: 2013-10-09 16:41:47 UTC
Hi, I was just thinking that it would be nice if clicking the "network settings" option below a "Mobile Broadband" entry in the system status menu would not just bring up the network panel in the contrlol panel, but would also automatically select the matching Mobile Broadband connection in the network panel. I'm not sure if this will be easy to implement, but it would be good for the user experience. Regards, Hans
Hey, yes - that was the design, actually. :) The mockups have a menu item titled "Mobile Broadband Settings" which would link to the relevant part of the control center.
Created attachment 256306 [details] [review] NetworkMenu: make the settings launcher point to the right devices Tell gnome-control-center to focus on the associated device when launching it from one of the submenus. Only partially tested (won't have wwan until NM learns bluez 5, which should be soon but is currently in testing for f20)
Review of attachment 256306 [details] [review]: should we change the other calls of Util.spawn? I'm not sure why that isn't good enough any more. ::: js/misc/util.js @@ +86,3 @@ +// +// Runs @argv as if it was an application, handling startup notification +function spawnApp(app_name, argv) { appName @@ +92,3 @@ + + let context = global.create_app_launch_context(); + app.launch([], context); I really wish we could simply use URIs for a device instead of this. Ugh. ::: js/ui/status/network.js @@ +277,3 @@ + if (this.SettingsLabel) { + this.item.menu.addAction(this.SettingsLabel, Lang.bind(this, function() { + Util.spawnApp(this.SettingsLabel, ['gnome-control-center', 'network', 'show-device', Shouldn't this be _("Settings"), not "Wireless Settings" or similar? I'm not sure where this actually appears, though. @@ +405,3 @@ Extends: NMConnectionDevice, category: NMConnectionCategory.WWAN, + SettingsLabel: _("Mobile Broadband Settings"), yuck. I'd prefer something like this.item.menu.addMenuItem(createSettingsItem(_("Mobile Broadband Settings", this._device)); @@ +968,3 @@ + this.item.menu.addAction(_("Wireless Settings"), Lang.bind(this, function() { + Util.spawnApp(_("Wireless Settings"), ['gnome-control-center', 'network', 'show-device', bad indentation
(In reply to comment #3) > Review of attachment 256306 [details] [review]: > > should we change the other calls of Util.spawn? I'm not sure why that isn't > good enough any more. spawnApp handles startup notification, but only if the app itself supports that, otherwise you get a starting cursor for 30 seconds and then nothing, so using it unconditionally is bad (especially for alt-f2) > @@ +92,3 @@ > + > + let context = global.create_app_launch_context(); > + app.launch([], context); > > I really wish we could simply use URIs for a device instead of this. Ugh. We could do a lot better than that, and use the equivalent of g_desktop_app_info_launch_action() with a GVariant parameter (because command line args are converted to GApplication actions), but g-c-c is not dbus activatable... > ::: js/ui/status/network.js > @@ +277,3 @@ > + if (this.SettingsLabel) { > + this.item.menu.addAction(this.SettingsLabel, Lang.bind(this, > function() { > + Util.spawnApp(this.SettingsLabel, ['gnome-control-center', > 'network', 'show-device', > > Shouldn't this be _("Settings"), not "Wireless Settings" or similar? I'm not > sure where this actually appears, though. In the wireless submenu. And it should be Network Settings at least, because it brings you to the network panel. Wireless Settings sounded better to me, given that it focus a wireless device. Maybe "Wi-Fi Settings"? (For mobile broadband, see comment 1) > @@ +405,3 @@ > Extends: NMConnectionDevice, > category: NMConnectionCategory.WWAN, > + SettingsLabel: _("Mobile Broadband Settings"), > > yuck. I'd prefer something like > > this.item.menu.addMenuItem(createSettingsItem(_("Mobile Broadband > Settings", this._device)); Why? You'd be duplicating more code in the subclasses, instead of just the label.
Created attachment 256359 [details] [review] NetworkMenu: make the settings launcher point to the right devices Tell gnome-control-center to focus on the associated device when launching it from one of the submenus.
Created attachment 256386 [details] [review] NetworkMenu: make the settings launcher point to the right devices Tell gnome-control-center to focus on the associated device when launching it from one of the submenus.
Review of attachment 256386 [details] [review]: Yep.
Attachment 256386 [details] pushed as 6a7d184 - NetworkMenu: make the settings launcher point to the right devices