GNOME Bugzilla – Bug 93246
Network preferences do not have OK/Cancel/Apply buttons
Last modified: 2011-03-18 02:59:09 UTC
Description of Problem: When you try entering 'http://foo' as the proxy location, the dialog will, as soon as you typed the 'f', remove the 'http://' prefix, and place the cursor _before_ the 'f'. This is very confusing. It shouldn't try to modify the user's input while he's typing. Instead, the location should just be saved in the correct format when the user closes the dialog.
This is a side effect of instant apply. To solve it we would need to make the entry non-standard and not apply the settings until the user hits 'ok' or maybe a new button 'test'. Thoughts ?
I found this in the Gnome HIG: "Do not make the user press an OK or Apply button to make the changes happen, unless either: [...] the changes in the window have to be applied simultaneously to prevent the system entering a potentially unstable state. For example, the hostname and proxy fields in a network properties window." (http://developer.gnome.org/projects/gup/hig/1.0/windows.html#instant-apply) So, OK/Apply/Cancel buttons should be added to this window. (I don't think you should add a "Test" button, no other program has that.)
Wouldn't it be possible to just do it when 'enter' is hit instead of mid-type?
Created attachment 18613 [details] [review] Patch against HEAD.
This patch re-sets the cursor position to it's old value when the entry is changed. That's very intuitive - if the old string is longer than the new one, it's set to the last position - this is automatically handled by the GTK+ method. If it's short, the cursor re-appears on the old position which prevents the cursor from jumping around. The patch is against capplets/common, so I hope it doesn't break any other applet. regs, Chris
Is there any new status on this bug? What do people think of this patch? Has this patch been commited? Jody? -- Sorry for all the spam people, just trying to get the UI-Review moving by cleaning out the old cruft.
Adding PATCH keyword.
Comment on attachment 18613 [details] [review] Patch against HEAD. this is a kludge to work around the problem of things changing under the user's feet. I don't think it would work in all situations eg user types foo.com then goes back and adds a n http:// prefix. When the prefix matches we would remove it and the cursor would be put in positiong 7 ?
By the same token using Enter is not really feasible because the user can not know that they need to hit enter there. Nor do I like the idea of in this one case having an apply. Our best guess would be to have a focus out handler, and a timer that would update after typing stops for a few seconds.
still here with 2.9
still there with 2.10 bumping version
*** Bug 561202 has been marked as a duplicate of this bug. ***
A patch to do the update on focus-out instead of entry change event has been produced for Ubuntu and attached to report https://bugs.edge.launchpad.net/gnome-control-center/+bug/542001 This is an idea of how to improve usability without adding the buttons and al. Thanks for reviewing it and commenting.
Created attachment 157582 [details] [review] update proxy entry on focus-out latest version of the patch against gnome-control-center-2.29.92
Review of attachment 157582 [details] [review]: This patch shouldn't be used as is. First of all, there are several instances of bad indentation and/or spacing that should be fixed. In addition to focus-out there should also be a timeout so you don't need to leave the entry in order for the setting to take effect. ::: gnome-network-properties.c @@ +1338,2 @@ static GConfValue * extract_proxy_host (GConfPropertyEditor *peditor, const GConfValue *orig) This doesn't make sense. If you just copy the value anyway, you should not have a conversion function at all. @@ +1403,3 @@ + client = gconf_client_get_default (); + + char const *entered_text = gtk_entry_get_text(entry); Only declare new variables at the start of a code block. @@ +1409,3 @@ + host = get_hostname_from_uri (entered_text); + + gconf_client_set_string (client, (gchar *)key, (host != NULL)?host:entered_text, NULL); It shouldn't be necessary to explicitly call GConf here. Just write the modified value (if any) back to the widget.