[Glade-users] need help with lookup_widget()



Hi all.

I have a problem with lookup_widget(). 
In Anjuta's project, generated with Glade, in main.c I've called 
--------------------------------------------------------------
GtkWidget *my_window;
GtkWidget *one_more_window;

my_window=create_my_window();
one_more_window = create_one_more_window();

gtk_widget_show(one_more_window);
------------------------------------------------------------
But didn't call gtk_widget_show(my_window);

Now, I want to display my_window and close one_more_window in
callbacks.c.
There is a button in one_more_window, and in callback for clicked event
for that button I wrote:
-----------------------------------------------------------------------
void
on_my_btn_clicked (GtkButton *button,gpointer data)
{
GtkWidget *one_more_window;
GtkWidget *my_window;

one_more_window = lookup_widget(button,"one_more_window");
gtk_widget_destroy(one_more_window);

my_window=lookup_widget(button,"my_window");
-------------------------------------------------------------
But there is a error that widget my_window is not found. 
create_my_window() and create_one_more_window() is in interface.c.
If I call for gtk_widget_show(my_window) in main.c - it's displayed ok.
So it just can't find my_window. Therefore, I can't call
gtk_widget_show() Any ideas?

Regards, decvar





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