After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709246 - Mobile broadband submenu should link to the control center mobile broadband settings
Mobile broadband submenu should link to the control center mobile broadband s...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: system-status
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-10-02 08:26 UTC by Hans de Goede
Modified: 2013-10-09 16:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
NetworkMenu: make the settings launcher point to the right devices (4.00 KB, patch)
2013-10-02 17:42 UTC, Giovanni Campagna
needs-work Details | Review
NetworkMenu: make the settings launcher point to the right devices (4.01 KB, patch)
2013-10-03 12:36 UTC, Giovanni Campagna
none Details | Review
NetworkMenu: make the settings launcher point to the right devices (4.10 KB, patch)
2013-10-03 13:53 UTC, Giovanni Campagna
committed Details | Review

Description Hans de Goede 2013-10-02 08:26:55 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
Comment 1 Allan Day 2013-10-02 08:37:13 UTC
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.
Comment 2 Giovanni Campagna 2013-10-02 17:42:05 UTC
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)
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-10-02 17:53:15 UTC
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
Comment 4 Giovanni Campagna 2013-10-02 21:31:14 UTC
(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.
Comment 5 Giovanni Campagna 2013-10-03 12:36:18 UTC
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.
Comment 6 Giovanni Campagna 2013-10-03 13:53:06 UTC
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.
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-10-03 13:53:52 UTC
Review of attachment 256386 [details] [review]:

Yep.
Comment 8 Giovanni Campagna 2013-10-09 16:41:41 UTC
Attachment 256386 [details] pushed as 6a7d184 - NetworkMenu: make the settings launcher point to the right devices