hey guys,
i am using Glade 2.0 in which i have created a Gnome window as well as a Gnome dialog box. So now when i click on some menu option i would like to display this dialog box. I dont know how to implement this without getting into the hassle of global variables and all. And also when i do somehow manage to display the Gnome about dialog box, i cannot understand which event is called when i close this box. could someone please help me out. Im pretty new to Gtk programming. Thanks
If you look at glade generated "interface.c", you win find a function create_YourDialogName (); you can simply call that function with something like this:
GtkWidget * dlg, * parent;
parent = lookup_widget (GTK_WIDGET (button), "YourMainWindowName"); dlg = create_YourDialogName (); gtk_window_set_position (GTK_WINDOW (dlg), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_modal (GTK_WINDOW (dlg), TRUE); gtk_window_set_transient_for (GTK_WINDOW (dlg), GTK_WINDOW (parent)); gtk_widget_show (dlg);
Of course, all this provided that you're using glade generated code.
Cheers _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list