GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Sep 16, 2014 5:29 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: GtkCheckMenuItem toggled signal not working...
PostPosted: Mon Jun 02, 2008 5:08 pm 
Offline
GTK+ Geek

Joined: Wed May 28, 2008 5:49 pm
Posts: 66
Here's what I did in glade. Made 2 GtkRadioMenuItem, and for the group, set them to each other, so only one can be on at a time. Then attached a "on_horizontal_bar_toggled" handler to the "toggle" signal of one. I used the gtkbuilder to connect the signals, and I do this in my callback function:

Code:
void on_horizontal_bar_toggled(GtkCheckMenuItem * button, VadiGui * gui)
{
    if (button->active)
        printf("on\n");
    else
        printf("off\n");
}


Now, when the program starts, I get this: "Gtk-CRITICAL **: gtk_radio_action_set_group: assertion `!g_slist_find (group, action)' failed". I suspect I was only supposed to add one radio button to the other, not both ways like I did - however Glade isn't allowing me to erase the field now. But only 1 button is checked at a time, so it's sort of ok.

Sort of because button->active always returns 0, even if the button is on. Any ideas on whats going wrong? I'm lost.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 5:22 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
Hard to say... but GtkBuilder doesn't like something about how Glade setup those radio groups.

Could you post the glade file and tell us what version of glade you're working in?

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 6:19 pm 
Offline
GTK+ Geek

Joined: Wed May 28, 2008 5:49 pm
Posts: 66
I'm using Glade 3.4.5, and am using the GtkBuilder in this app.

Here's the .glade and .xml (I use .xml): http://www.mediafire.com/?myyctnu2pc3


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 4:48 pm 
Offline
GTK+ Geek

Joined: Wed May 28, 2008 5:49 pm
Posts: 66
I've fixed the issue of the buttons being in each others group, now only one is in the others group.

I can't figure out why are the callbacks being set wrong, or what is going wrong though.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group