Can't quite get my head around this, can anyone help?



I've got a bunch of entry boxes and an HScale widget.  If the user
changes something on the form and clicks the HScale Widget before
clicking the save button, I popup a message box.  If the user clicks Ok,
the HScale should ignore the changes and procede.  If the user clicks
Cancel, the HScale should stop.

Ok, so I can't can't use the "value-changed" signal for the HScale.  I
belive I can use the "change-value", but I can't quite get it to work
right.  If I return TRUE when the user clicks Cancel, that works.  But
whether I return TRUE or FALSE on the OK button, it doesn't work.  It
either ignores the change or it calls itself repeatedly.

Can someone point me to some example code in Gtk that intercepts a
signal, prompts the user, and either continues or aborts the signal,
depending on user response?  A button wouldn't do this, but I'm sure
there are other widgets that would.  I've Googled everything I can think
of, but I either receive an overwhelming, unapplicable list of results
or none.



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