problem with gtk_radio_tool_button_set_group function/



Hi all)

I have some problem with GtkRadioToolButton class, when i try to set a new group(group1) for some  button(radio_tool_btn_2), it's written below,when i tried to call the gtk_radio_tool_button_set_group function the button(radio_tool_btn_2) that belonged to second group (group2), did not remove from second group (group2).
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        radio_tool_btn_1 = gtk_radio_tool_button_new(NULL);
if(radio_tool_btn_1 == NULL)
{
                 return; /// or doing some thing else, 
}
group1 = gtk_radio_tool_button_get_group(GTK_RADIO_TOOL_BUTTON(radio_tool_btn_1));
if(group1 == NULL)
{
                 return; /// or doing some thing else, 
}
radio_tool_btn_2 = gtk_radio_tool_button_new(NULL);
if(radio_tool_btn_2 == NULL)
{
                 return; /// or doing some thing else, 
}
group2 = gtk_radio_tool_button_get_group(GTK_RADIO_TOOL_BUTTON(radio_tool_btn_2));
if(group2 == NULL)
{
                 return; /// or doing some thing else, 
}
add_group_length_before = g_slist_length(group2);
gtk_radio_tool_button_set_group(GTK_RADIO_TOOL_BUTTON(radio_tool_btn_2), group1);

add_group_length_after = g_slist_length(group2);
        printf("after:%d\nbefore:%d\n", add_group_length_after, add_group_length_before);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
it is print this:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
after:1
before:1
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

what is it? it is bug? or i'm doing something wrong/ 
--
with best ragareds Shahzadyan Khachik


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