-
meson
I try to experiment with a push-to-talk button, but after holding the button down, the release-button event isn't fired. Do you have any suggestion how to accomplish this correctly? Otherwise I will leave that for now.
-
cal0pteryx
meson: https://lazka.github.io/pgi-docs/index.html#Gtk-3.0/classes/Widget.html#Gtk.Widget.signals.button_release_event
-
cal0pteryx
Might need an event mask in the button
-
meson
Event mask _in the buttom_? I tried that with no luck. But doesn't it actually say the event mask must be added to the GDK Window?
-
cal0pteryx
To the window of the button. Yes, I'd have to experiment myself to find out where exactly to add this
-
meson
No problem. Whenever you got too much time ;)
-
cal0pteryx
meson: https://dev.gajim.org/gajim/gajim/-/blob/master/gajim/gtk/avatar_selector.py#L202
-
cal0pteryx
Just an example
-
meson
Thanks, it works if I press and release quickly, but not after long pressing. I will think about it more tomorrow
-
meson
I guess it looses focus?
-
lovetox
did you try the button.clicked event?
-
lovetox
docs say its triggered once the button is released
-
lovetox
https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/Button.html#signals
-
lovetox
also it has released and pressed signals
-
lovetox
also it says you can use the Widget.button_press_event
-
meson
Thanks, works now o/
-
meson
But I needed to grab the focus and temporarily set the popup menu to non-modal
-
meson
Tomorrow refactoring and cleaning up a little bit and then it should be quasi ready.
-
fjklp
gui stuff sounds miserable :)
-
meson
UI is always the hardest part
-
lovetox
personally i hate push to talk
-
lovetox
you have no good way to tell the user that this is a push to talk function
-
lovetox
which normally results in 1 second files beeing sent
-
meson
lovetox: it would first start recording after a delay when pressed
-
lovetox
yeah of course you can think up solutions for that
-
lovetox
but the question is why
-
lovetox
whats the big benefit here
-
lovetox
why as a user do i need to learn to use this function correctly with repeated tries, and it does not behave like all other buttons in the application
-
meson
cal0pteryx mentioned Telegram which offers this functionality. WhatsApp users are use to it. I mean it would save three clicks.
-
lovetox
so what if i record a 10 minute message?
-
meson
But yeah I just wanted to experiment with it. It's easily removed again
-
meson
Then you click once, open the popup menu and click the record button
-
lovetox
so there are two different buttons?
-
meson
No
-
meson
It's the same button
-
lovetox
ok common .. like how would users even discover this functionality
-
lovetox
i press the button, a menu opens, what in the world would ever let me assume i can push that button long to get some functionality
-
meson
I will show a demo later or tomorrow. Maybe we could a info in the mouse hover hint
-
meson
No that button
-
meson
The one in the message action bar
-
lovetox
yes, the menu button or?
-
meson
Yeah
-
meson
But before we start or continue about different things by accident, let me first show you how it is
-
meson
Otherwise we discuss for.nothing
-
lovetox
alright, no worries, i stop now, im not the expert in recording voice messages
-
meson
No problem, I'm happy about feedback and good arguments in any direction :)