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 767210 - wireless-security: Make broken configuration entries red
wireless-security: Make broken configuration entries red
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-applet
unspecified
Other All
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-06-03 16:46 UTC by Bastien Nocera
Modified: 2016-06-07 13:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wireless-security: Make broken configuration entries red (15.09 KB, patch)
2016-06-03 16:46 UTC, Bastien Nocera
none Details | Review
wireless-security: Make broken configuration entries red (17.80 KB, patch)
2016-06-06 10:27 UTC, Bastien Nocera
none Details | Review

Description Bastien Nocera 2016-06-03 16:46:19 UTC
.
Comment 1 Bastien Nocera 2016-06-03 16:46:25 UTC
Created attachment 329078 [details] [review]
wireless-security: Make broken configuration entries red

When a configuration setting is wrong, set the entry or file chooser
that contains the incorrect information to be surrounded by red.

This makes it easier for users to find where the error was made that
disallows them to click the "Apply" button.

See https://bugzilla.gnome.org/show_bug.cgi?id=734446
and https://bugzilla.gnome.org/show_bug.cgi?id=734472
Comment 2 Beniamino Galvani 2016-06-06 09:03:15 UTC
Review of attachment 329078 [details] [review]:

Is it expected that the red border is visible only when using GNOME3
and not for example with MATE?

::: src/wireless-security/eap-method-simple.c
@@ +80,3 @@
 	/* Check if the password should always be requested */
+	if (always_ask_selected (method->password_entry)) {
+		widget_unset_error (method->password_entry);

widget_unset_error (GTK_WIDGET (method->password_entry)); ?

::: src/wireless-security/ws-wpa-psk.c
@@ +67,3 @@
 	len = key ? strlen (key) : 0;
 	if ((len < 8) || (len > 64)) {
+		widget_set_error (entry);

I'm not sure why, but it seems this makes the psk disappear when invalid on MATE.
Comment 3 Bastien Nocera 2016-06-06 10:13:18 UTC
(In reply to Beniamino Galvani from comment #2)
> Review of attachment 329078 [details] [review] [review]:
> 
> Is it expected that the red border is visible only when using GNOME3
> and not for example with MATE?

Because its theme doesn't implement the feature?

> ::: src/wireless-security/eap-method-simple.c
> @@ +80,3 @@
>  	/* Check if the password should always be requested */
> +	if (always_ask_selected (method->password_entry)) {
> +		widget_unset_error (method->password_entry);
> 
> widget_unset_error (GTK_WIDGET (method->password_entry)); ?
> 
> ::: src/wireless-security/ws-wpa-psk.c
> @@ +67,3 @@
>  	len = key ? strlen (key) : 0;
>  	if ((len < 8) || (len > 64)) {
> +		widget_set_error (entry);
> 
> I'm not sure why, but it seems this makes the psk disappear when invalid on
> MATE.

I don't see how that's possible, unless there's a bug in the theme MATE uses.
Comment 4 Bastien Nocera 2016-06-06 10:27:26 UTC
Created attachment 329179 [details] [review]
wireless-security: Make broken configuration entries red

When a configuration setting is wrong, set the entry or file chooser
that contains the incorrect information to be surrounded by red.

This makes it easier for users to find where the error was made that
disallows them to click the "Apply" button.

See https://bugzilla.gnome.org/show_bug.cgi?id=734446
See https://bugzilla.gnome.org/show_bug.cgi?id=734472
Comment 5 Bastien Nocera 2016-06-06 10:30:50 UTC
Fixed a warning in the filepicker validation, and made the filepicker validation better. I've also made sure to clear errors on widgets when disabling the 8021x security.

I'm not sure that I caught all the possible error cases, but I'd really like to land this, and fix specific bugs later on. I also haven't added any support for connection-editor/ validation, and I don't plan to in the short term either.
Comment 6 Thomas Haller 2016-06-06 19:07:42 UTC
Patch lgtm and tests good.


I pushed the patch + 2 fixup commits to ce-highlight-invalid-bgo767210 branch.

https://git.gnome.org/browse/network-manager-applet/log/?h=ce-highlight-invalid-bgo767210



ACK?
Comment 7 Bastien Nocera 2016-06-07 10:57:35 UTC
Not sure about the changes in eap-method.c but if you've tested them, looks fine to me.
Comment 8 Thomas Haller 2016-06-07 13:31:23 UTC
I don't see Beniaminos issue with the psk field on KDE (comment 2).


Merged patch+fixups to master:
https://git.gnome.org/browse/network-manager-applet/commit/?id=950c14dd71e9e9d6b9644cdbd7a148a34c2bea79