You are not logged in.

#26 2018-11-24 22:22:25

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: pyStopwatch: a gui stopwatch that can minimize to the tray

@likytau
Thanks for reporting these issues. Everything should be fixed now.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#27 2018-11-25 15:50:00

Steef435
Member
Registered: 2013-08-29
Posts: 533
Website

Re: pyStopwatch: a gui stopwatch that can minimize to the tray

(small note: state indeed represents modifier state but is a collection of flags, so if you only check for state != 0 then you would also respond to ctrl-m, ctrl-alt-m, super-m, etc.

So you'd have to check whether state equals gtk.gdk.MOD1_MASK for alt-m, and check whether state equals (gtk.gdk.MOD1_MASK | gtk.gdk.SHIFT_MASK) for alt-M

and yeah, as is already mentioned: an event is sent through all its handlers until one of them returns true, so return true in order to prevent the default handler from executing and thus executing the default tab behaviour)

Last edited by Steef435 (2018-11-25 15:50:28)

Offline

#28 2018-11-25 20:02:58

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,380
Website

Re: pyStopwatch: a gui stopwatch that can minimize to the tray

Steef435 wrote:

(small note: state indeed represents modifier state but is a collection of flags, so if you only check for state != 0 then you would also respond to ctrl-m, ctrl-alt-m, super-m, etc.

So you'd have to check whether state equals gtk.gdk.MOD1_MASK for alt-m, and check whether state equals (gtk.gdk.MOD1_MASK | gtk.gdk.SHIFT_MASK) for alt-M

Thanks for the clarification. I didn't post the details yesterday but the update does indeed check for gtk.gdk.MOD1_MASK specifically and returns false if that bit is set (none of the custom key handlers deal with <alt>). This was also necessary to keep <shift>+h/m/s working for decrements.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB