GNOME Bugzilla – Bug 657093
Show wireless and mobile dialogs in process
Last modified: 2011-09-05 16:09:48 UTC
Currently, gnome-control-center calls out to nm-applet for the "Connect to hidden wireless network" dialog. This is no longer possible in 3.2, as gnome-shell conflicts with nm-applet, and the latter is fallback-mode only. Instead, there is a new library, called libnm-gtk, that abstracts away all the complexity of the various dialogs. This way, gnome-shell can also invoke gnome-control-center instead of depending on nm-applet.
Created attachment 194391 [details] [review] Add a way for panels to receive additional arguments. This patch introduces the "argv" property to CcPanel. Panels that wish to handle extra arguments shall override it and act appropriately in the constructor.
Created attachment 194392 [details] [review] network: show wireless dialogs when asked When invoked with certain arguments, show the wireless and 3g dialogs from libnm-gtk. Previously they were provided by nm-applet, but now gnome-shell conflicts with it and it makes sense anyway to have one place for network configuration. Also added a "show-device" command, that just selects a device in the tree view.
Is there any reason why this needs to be in gnome-control-center (as in the process) rather than in a separate application? If it needs to be called from somewhere else, without the network panel showing up, I'd rather a helper be created instead.
(In reply to comment #3) > Is there any reason why this needs to be in gnome-control-center (as in the > process) rather than in a separate application? > > If it needs to be called from somewhere else, without the network panel showing > up, I'd rather a helper be created instead. Dialogs are modal, and for this to work they must be in the same process as the parent. I do want the network panel to show up along side the dialog (which is therefore attached to it). Also, this is really a stop-gap for 3.2. Hopefully in 3.4 advanced network configuration (including 802.1x) will be done directly in the panel, instead of using a separate dialog or calling out nm-connection-editor.
(In reply to comment #4) > (In reply to comment #3) > > Is there any reason why this needs to be in gnome-control-center (as in the > > process) rather than in a separate application? > > > > If it needs to be called from somewhere else, without the network panel showing > > up, I'd rather a helper be created instead. > > Dialogs are modal, and for this to work they must be in the same process as the > parent. They don't. We already hack this up using XWindow IDs in a number of applications. > I do want the network panel to show up along side the dialog (which is > therefore attached to it). That's fine. > Also, this is really a stop-gap for 3.2. Hopefully in 3.4 advanced network > configuration (including 802.1x) will be done directly in the panel, instead of > using a separate dialog or calling out nm-connection-editor. That's fine by me as well, as long as we get the necessary NetworkManager changes in time.
nm changes have landed
Giovanni, any chance you could turn this into a standalone helper instead ?
(In reply to comment #7) > Giovanni, any chance you could turn this into a standalone helper instead ? It wouldn't be difficult, but I don't think it would be useful. I think we all agree that network configuration should be in the network panel, both visually and in terms of code. It would be weird if configuring most connections opened a system modal (ie. shell) dialog, while configuring wpa enterprise opened a modal gtk dialog; at least, by having them in the network panel, one sees that an additional configuration application has opened. If on the other hand it was an helper binary launched by the panel (as the shell cannot reliably launch two processes), what would be the point?
Review of attachment 194391 [details] [review]: ::: libgnome-control-center/libgnome-control-center.pc @@ +3,3 @@ +libdir=/home/giovanni/gnome-shell/install/lib64 +includedir=${prefix}/include +extensiondir=/home/giovanni/gnome-shell/install/lib64/control-center-1/panels I don't think so.
Review of attachment 194392 [details] [review]: Does it work with gnome-control-center already running? What happens if there's already a dialogue shown? ::: panels/network/cc-network-panel.c @@ +106,3 @@ + PROP_0, + PROP_ARGV, + PROP_LAST Why PROP_LAST? Just remove that. @@ +137,3 @@ + if (g_strcmp0 (string, "show-device") == 0) + return OPERATION_SHOW_DEVICE; + return OPERATION_CONNECT_HIDDEN; Warning here?
(In reply to comment #10) > Review of attachment 194392 [details] [review]: > > Does it work with gnome-control-center already running? What happens if there's > already a dialogue shown? Yes (the network panel is summoned, if needed), and multiple dialogs can be stacked.
Created attachment 195573 [details] [review] Add a way for panels to receive additional arguments. This patch introduces the "argv" property to CcPanel. Panels that wish to handle extra arguments shall override it and act appropriately in the constructor.
Created attachment 195574 [details] [review] network: show wireless dialogs when asked When invoked with certain arguments, show the wireless and 3g dialogs from libnm-gtk. Previously they were provided by nm-applet, but now gnome-shell conflicts with it and it makes sense anyway to have one place for network configuration. Also added a "show-device" command, that just selects a device in the tree view.
Review of attachment 195573 [details] [review]: Looks good.
Review of attachment 195574 [details] [review]: ::: panels/network/Makefile.am @@ +30,3 @@ panel-cell-renderer-signal.h \ + network-dialogs.c \ + network-dialogs.h \ Those files are missing.
Created attachment 195685 [details] [review] network: show wireless dialogs when asked When invoked with certain arguments, show the wireless and 3g dialogs from libnm-gtk. Previously they were provided by nm-applet, but now gnome-shell conflicts with it and it makes sense anyway to have one place for network configuration. Also added a "show-device" command, that just selects a device in the tree view.
Review of attachment 195685 [details] [review]: Looks good. Did the NM code including libnm-gtk get a proper release?
Attachment 195573 [details] pushed as 1f9ae38 - Add a way for panels to receive additional arguments. Attachment 195685 [details] pushed as d26fb96 - network: show wireless dialogs when asked libnm-gtk code is not released as a tarball, but it's in GIT master and therefore I'd expect a proper release before 3.2