weird behavior in GTK+-2.4.14




I have a weird nagging problem that's driving me crazy..

I have a program with upwards of several hundred Gui controls (most are
spinbuttons or textentries.)

I'm getting spurious events being emitted by the spinbuttons on focus(into and
out of the application) changes.  (but not ALL of them even do it even though
they all have the same signal handlers) on focus changes.

i.e. if I click in a spinbutton (i.e. click in the text part, don't change
anything and don't click on the arrows) it emits the "value changed" signal
handler (which I feel is incorrect as the value has NOT changed).  After
changing the value the "value_changed" signal fires TWICE. debugging prints out
that it fires off with the previous value and then again with thenew value
(Annoying, but livable)

Now if I move the mouse in and out of the window (system configured with Focus
FOLLOWS mouse) each time the focus  LEAVES the application it emits the
"value_changed" signal TWICE.  focusing back in fires no value_changed signal.

the gui controls are loaded by a glade file, and according to glade there are 4
signal handlers for each of the spinbuttons..

"value_changed" goes to spin_button_handler <-- this is the one firing on focus
changes

"changed" goes to entry_changed_handler (used to do things when the user
manually edits the text part of the spinbutton)

"key_press_event" and "key_release_event" both go to key_event (which handles
keyboard shortcuts)

WHY is it firing off "value_changed" signals on a focus change?, and how the
hell do I stop it from doing that?

Why is it firing off the value changed signal TWICE when changing the
spinbutton's value? (once with  old once with new)



=====
Dave J. Andruczyk


                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250



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