[Glade-users] problem: 'lookup_widget'



Hello,

I have a problem with glade-2.0.0. I'm not really sure, if it
is a problem with glade-2 or if I make a mistake.

The problem-discription:

I have a gnome-app, a menu-bar and in the menubar I have a check-item.
Also I have a Toolbar with a toggle-button.

Both, check-item and toolbar-button are connected by g_signal_connect(..)
Also both have a GLADE_HOOKUP_OBJECT(...)
All make by using glade-2 - tool.


Now I wish follow, if check-item is clicked, than also toggle-button
should be activated. And if toggle-button clicked, the check-item
will be activated.

So I writen in callback.c:

void cb_togglebutton(GtkToggleButton *togglebutton, ... ) {
        gtk_check_menu_item_set_active( lookup_widget( ... ), value );
}

and

void cb_check_item(GtkMenuItem *menuitem, ...) {
        gtk_toggle_button_set_active( lookup_widget( ... ), value );
}


But on runtime I become a problem (warning-messages).
I mean: in interface.c (created be glade2) first come the section with
'g_signal_connect()'
and than come the section 'GLADE_HOOKUP_OBJECT()'

And so the lookup_widget can't find the widget at creation-time, but if
the app-window is created complete, than all will work fine.

Sorry, my english is not the best one.
Bye Heiko




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