Re: [gtk-list] Setting check menu item state without triggering




On Sun, 9 May 1999, Neil Hodgson wrote:
> 
>     I have several check menu items in a menu and want to set their state
> without triggering the menu item's signal function. Normally, the state is
> changed when the user selects the item which all works well. Sometimes, such
> as when loading preferences, I want to check and uncheck these items to
> match the preferences. I tried the code in Developing Linux Applications
> (Synchronizing Toolbar and Menu Items, starting page 96) but this results in
> signals being sent.
> 

Yeah, there is no nice way to avoid this. The easiest thing to do is keep
a boolean flag somewhere, and if TRUE have your signal handlers return
without doing anything. 

Havoc




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