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 660806 - No Caps Lock warning
No Caps Lock warning
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: login-screen
3.2.x
Other Linux
: Normal enhancement
: ---
Assigned To: Ray Strode [halfline]
gnome-shell-maint
: 661938 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-10-03 17:40 UTC by Jeremy Newton
Modified: 2011-10-17 21:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
st-entry: Display a capslock warning in password entries (4.34 KB, patch)
2011-10-17 20:08 UTC, Florian Müllner
reviewed Details | Review
css: Style the capslock warning in password entries (1.21 KB, patch)
2011-10-17 20:08 UTC, Florian Müllner
committed Details | Review
st-entry: Display a capslock warning in password entries (5.07 KB, patch)
2011-10-17 20:28 UTC, Florian Müllner
none Details | Review
st-entry: Display a capslock warning in password entries (5.10 KB, patch)
2011-10-17 20:37 UTC, Florian Müllner
committed Details | Review

Description Jeremy Newton 2011-10-03 17:40:08 UTC
There is no warning for caps lock when typing in your password, which was a very useful figured in previous versions.
Comment 1 Ray Strode [halfline] 2011-10-17 02:11:51 UTC
We probably want this in all password fields, which means this should go in St I guess.
Comment 2 Jasper St. Pierre (not reading bugmail) 2011-10-17 05:29:10 UTC
(In reply to comment #1)
> We probably want this in all password fields, which means this should go in St
> I guess.

With Florian's work on ShellEntry, it should be fairly easy to do as a secondary icon.
Comment 3 Matthias Clasen 2011-10-17 12:39:56 UTC
*** Bug 661938 has been marked as a duplicate of this bug. ***
Comment 4 Florian Müllner 2011-10-17 20:08:13 UTC
Created attachment 199263 [details] [review]
st-entry: Display a capslock warning in password entries

Implement the GtkEntry behavior of showing a warning icon when
capslock is turned on while entering hidden text.
Comment 5 Florian Müllner 2011-10-17 20:08:20 UTC
Created attachment 199264 [details] [review]
css: Style the capslock warning in password entries
Comment 6 Jasper St. Pierre (not reading bugmail) 2011-10-17 20:12:58 UTC
Review of attachment 199263 [details] [review]:

::: src/st/st-entry.c
@@ +499,3 @@
+
+  keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
+  g_signal_handlers_disconnect_by_func (keymap, keymap_state_changed, entry);

If I'm reading this right, this has a "glitch":

  1. Focus field.
  2. Turn caps lock on.
  3. Blur field.
  4. Turn caps lock off.

Just calling remove_capslock_feedback() here should fix that.
Comment 7 Jasper St. Pierre (not reading bugmail) 2011-10-17 20:13:11 UTC
Review of attachment 199264 [details] [review]:

LGTM.
Comment 8 Florian Müllner 2011-10-17 20:14:42 UTC
This is pretty much a verbatim copy of the code in GtkEntry, with two exceptions:

 - only warn on capslock (Gtk also warns on numlock and differentiates using
   a tooltip - we don't do tooltips in shell)
 - no "caps-lock-warning" property to disable the behavior
   (we can add this later should we need it)
Comment 9 Florian Müllner 2011-10-17 20:28:19 UTC
Created attachment 199269 [details] [review]
st-entry: Display a capslock warning in password entries

(In reply to comment #6)
> If I'm reading this right, this has a "glitch":
> 
>   1. Focus field.
>   2. Turn caps lock on.
>   3. Blur field.
>   4. Turn caps lock off.

With "blur" you mean "show text"? If so, attached patch should fix it ...
Comment 10 Florian Müllner 2011-10-17 20:37:24 UTC
Created attachment 199272 [details] [review]
st-entry: Display a capslock warning in password entries

OK, so apparently that was not what was meant by "blur" - fixed after clarification on IRC.
Comment 11 Jasper St. Pierre (not reading bugmail) 2011-10-17 20:43:00 UTC
Review of attachment 199272 [details] [review]:

Looks good.
Comment 12 Florian Müllner 2011-10-17 20:45:30 UTC
Attachment 199264 [details] pushed as 0eab448 - css: Style the capslock warning in password entries
Attachment 199272 [details] pushed as a26a77f - st-entry: Display a capslock warning in password entries
Comment 13 Ray Strode [halfline] 2011-10-17 21:36:09 UTC
hey thanks Florian!