Re: [gtk-list] Disabling callbacks - Further explanation



Okay, maybe I need to explain better.

I have a program that uses both widgets (buttons, check boxes, toggle
buttons, etc) to enter commands, etc. The user can also enter these commands
manually through a text widget command line.

The problem I am encountering (an infinite loop of update widget -->
callback --> update widget, etc ) generally occurs because when the screen
is updated, due to a redraw, expose, or whatever, OR the user entering a
command which, for example, might depress a toggle button, the visual state
of the widget must be changed to reflect the state of the variable.

For example: suppose I have a pair of radio button which control whether
data is saved to an external file or not. The user can select "on" with the
mouse OR type "save on" in the command line. Either one of these actions
should result in the "On" button being depressed, the "Off" button being
undepressed and the 'save' variable being set to 1.

Unfortunately, when the screen is redrawn, and the button is toggled,
another signal is emitted, (toggled) and I don't want this to happen.

Basically, I want to be able to turn the signal of, update my display, and
turn them back on again.

I hope this gives you a better picture of what I'm trying to do.

Thanks, Miranda

/------------------------------------------------------------------------\
| Miranda Hawarden-Ogata             Email: hawarden@irtf.ifa.hawaii.edu |
| NASA IRTF, Institute of Astronomy  Phone: (808) 974-4206               |
| 1175 Manono St., Bldg 393            Fax: (808) 974-4207               |
| Hilo, HI 96720                                                         |
\------------------------------------------------------------------------/





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