Spin Button Question



I am having a problem when using a spin button in conjunction with a pop
up dialog. When the spin button increment arrow is clicked with the
mouse, a signal is sent that updates the data connected to the spin
button. Another signal is then sent when the data changes which pops up
a dialog.

The problem is: when I pop up the modal dialog, it removes focus from
the spin button widget. As a result of that, the button release event on
the spin button never occurs, and the spin button goes into an infinite
timer repeat loop (as if the mouse was pressed down & never released).

Looking at the code in gtkspinbutton.c in method
gtk_spin_button_button_press

the call to gtk_spin_button_real_spin generates the signal to update the
data which then sends a signal to pop up the dialog. When it gets back
into gtk_spin_button_button_press, it no longer has focus (the button
release event has been lost), but it then adds the timer stuff which
causes an infinite loop.

I can make code mod work arounds (e.g. only do timer stuff if it still
has focus, etc), but I was wondering if there was a way to make this
work without altering the gtk code as I would prefer to link to the
precompiled libraries as opposed to carrying my own copy of gtk around.

Thanks,

- Dave





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