Re: "click" event on a GtkSpinEntry



Il Tue, 22 Aug 2017 15:10:44 -0400 cecashon aol com scrisse:
...
There is a good read about the spin button at

https://blog.gtk.org/author/ebassi/

with Tim Bader on April 25, 2017. I don't know if you have seen that.

Hi Eric,

no, I did not see that... it would have saved me some reverse
engineering time.

My first try was just to get the GdkWindow of the spin button
but that gave me the main window. No help there.

Yes, that was my second attempt too. My first one was to check for
the presence of the spin callback. I was using
g_main_context_find_source_by_user_data() with the instance as
user_data but I soon discovered the argument of that callback is
wrapped by gdk_threads_add_timeout() [1] [2], so I gave up.

[1] https://git.gnome.org/browse/gtk+/tree/gtk/gtkspinbutton.c#n769
[2] https://git.gnome.org/browse/gtk+/tree/gdk/gdk.c?h=3.22.19#n929

Noticed that
the cursor changed with the mouse movement so I went with that.
Probably even more hackish than your solution. 

That is really smart and dirty! Yes, the hackishness level is still
quite high.

Many thanks for the suggestions, really appreciated. It seems the
solution requires a macgyverism after all.

Ciao.
-- 
Nicola


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]