Re: [Tails-dev] Fix to #5917 tails-greeter password field : …

Delete this message

Reply to this message
Autor: intrigeri
Data:  
Dla: The Tails public development discussion list
Temat: Re: [Tails-dev] Fix to #5917 tails-greeter password field : Warn when caps-lock in ON
Hi Andres,

Andres Gomez Ramirez wrote (06 Oct 2013 16:23:23 GMT) :
> Hi, I created a patch for feature #5917 (tails-greeter password
> field : Warn when caps-lock in ON).


Thanks!

> I had a problem when caps lock key was on. I press the key again and it doesn't
> generate a key event, so the warning message does not hide until i press another key;
> don't know if this is GTK normal behavior or specific to my keyboard or virtualbox.
> Could please somebody check that?


I notice there's some indentation discrepancy in there (tabs vs.
spaces):

            elif event.keyval == gtk.keysyms.Caps_Lock:            
        if event.state & gtk.gdk.LOCK_MASK:
            self.caps_lock_warning_area.show()
        elif not (event.state & gtk.gdk.LOCK_MASK):
        self.caps_lock_warning_area.hide()    


Perhaps that could make Python see the second elif as being part of
the main `if event.keyval [...] elif event.keyval ==
gtk.keysyms.Caps_Lock [...]' control structure, instead of (as it
should be) part of `if event.state & gtk.gdk.LOCK_MASK: [...]'?
If that were the case, then indeed the piece of code that hides the
caps lock warning would never be run.

Also, please make sure your commits don't add space errors.
Git commit warns you about this.

Cheers,
--
intrigeri
| GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
| OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr.asc