How to use GtkCheckMenuItem?
- From: Roland Roberts <roland astrofoto org>
- To: gtk-list gnome org
- Subject: How to use GtkCheckMenuItem?
- Date: 20 Mar 2001 14:05:17 -0500
I'm building an application with Glade and have run into a problem
with a menu item not behaving as I expect. I have a menu in the
menubar labelled "View" where I intend to put several check box items
which can be used to turn on/off various top-level windows. The first
one I am working on is a "File List" window based on a CList.
Initially, I simply forced the window to be created (if necessary) and
displayed every time I would open a new file; this way, I *knew* the
code to create and display the window was working properly. Next, I
changed the menu to add the "View->File List" item and added a
callback to the GtkCheckMenuItem for the "toggled" signal. Inside the
signal handler, I put a g_message call to let me know the signal
handler was invoked: but it isn't.
After some trial-and-error (and poking about the GTK headers), I've
discovered that using the "activate" signal and checking the status of
GTK_MENU_CHECK_ITEM(object)->active is the "right" thing to do.
Is this a Glade problem?
roland
--
PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
roland rlenter com 76-15 113th Street, Apt 3B
rbroberts acm org Forest Hills, NY 11375
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]