Proper App Behaviour: Sensitivity Strategy?




	Is there an _easy_ way to have menu items be grayed out?  Using
gtk_widget_set_sensitive()  means I need to check some state variable
every time I perform an operation on my data, on every single widget whose
sensitivity depends on that state variable.

	I was hoping there was some way I could have the menuitem "watch"
a particular variable, and then become insensitive automatically.

	What about a GtkAdjustment widget?  If it works for a "range" with
scrollbars, couldn't it work for a boolean on a menuitem or button on a
toolbar?  Then I could have my "Save" callback set that GtkAdjustment to
"FALSE" (or 0.0, whatever) and all the items that depend on that-- the
File/Save menuitem, the "Save" button on the toolbar, perhaps even the
statusbar-- could immediately turn themselves insensitive.

	Is this possible with a GtkMenuItem?


--Derek




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