GNOME Bugzilla – Bug 349991
Irrelevant fields are not correctly hidden in the preferences box
Last modified: 2006-08-11 16:36:35 UTC
When you create a connection, depending on your selection in the Connection/Type box, only the relevant tabs show up on the box. When you edit a connection, if you change your selection, the spurious tabs are hidden. This should be done by default on entering the dialog, and is not currently.
Also: When you first enter the dialog box, the Type choose is blank, and thus all tabs are showing; you cannot select a blank option, so it should default, probably to the first option, in this case "Windows VPN (PPTP)".
I have had great difficulty tracking this one down. The code has been in place to the the hiding and showing of tabs (or expanders as it was) since my first commits, it just didn't work one entry. I've tracked this down to the way nm-vpn-properties actually creates the windows and uses the widgets provided. It always calls gtk_widget_show_all, meaning that all the children of the widget it has been given also get shown. Simlilarly, it always calls gtk_widget_hide_all where gtk_widget_hide would do. That seems to be the cause of bug #349946 I'll see if I can find a work around in the nm-vpn-properties code, simply removing all the "_alls" stops the GnomeDruid functioning properly so al little more care seems to be needed. As for your second point, I have two ideas that are yet to be implemented. One is to actually have different dialogues for different connection type where the connection type is either hidden of greyed out. This would be done, either by some kind of control parameter or by having seperate binaries, but built from the same code base. The difficulty there is that nm-vpn-properties would need some awareness of this. It may be possible to have both general and fixed dialogues that way. The second idea concerning the "unset" check box, was actually to make that the default for a new connection window, and to hide all the tabs and "front" items (the gateway and stuff) until a valid selection is made.
This bug should really belong to the PPTP component... Dan, if you could please :)
changed
Created attachment 70292 [details] [review] A patch for the NetworkManager nm-vpn-properties code to improve management of the details widget The issue of everything being shown when the VPN details widget is first displayed is actually down to the way that that the nm-vpn-properties tool handles showing,hiding,reparenting and even destroying the widgets it gets from the VPN plugins. This patch solves the "show all" issue and makes the "add connection" and "edit connection" dialogs share more common code and do things in the same ways. (It should only require a small on to of this patch to resolve #349946 too.)
Dan would you take a look at the above patch... The first part of this issue turns out to require a fix in the nm-vpn-manager code. The change is only in the what nm-vpn-properties does with the widgets at its disposal. There is no change to the interface between nm-vpn-properties and the plugin properties tools.
Patch looks good; feel free to commit.
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.