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 349991 - Irrelevant fields are not correctly hidden in the preferences box
Irrelevant fields are not correctly hidden in the preferences box
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: VPN: pptp
git master
Other All
: Normal minor
: ---
Assigned To: Antony Mee
Antony Mee
Depends on:
Blocks:
 
 
Reported: 2006-08-04 21:51 UTC by Craig Box
Modified: 2006-08-11 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A patch for the NetworkManager nm-vpn-properties code to improve management of the details widget (30.12 KB, patch)
2006-08-06 04:03 UTC, Antony Mee
accepted-commit_now Details | Review

Description Craig Box 2006-08-04 21:51:24 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.
Comment 1 Craig Box 2006-08-04 21:53:19 UTC
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)".
Comment 2 Antony Mee 2006-08-05 09:10:52 UTC
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.
Comment 3 Antony Mee 2006-08-05 14:03:09 UTC
This bug should really belong to the PPTP component... Dan, if you could please :)
Comment 4 Dan Williams 2006-08-05 22:22:42 UTC
changed
Comment 5 Antony Mee 2006-08-06 04:03:18 UTC
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.)
Comment 6 Antony Mee 2006-08-06 04:09:04 UTC
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.
Comment 7 Dan Williams 2006-08-11 01:09:16 UTC
Patch looks good; feel free to commit.
Comment 8 Antony Mee 2006-08-11 16:36:35 UTC
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.