Re: Glade and dialogs
- From: Carlo Agrusti <carlo-ag libero it>
- To: gtk-app-devel-list gnome org
- Subject: Re: Glade and dialogs
- Date: Wed, 23 Feb 2005 09:34:03 +0100
[ A b h i s h e k ] ha scritto lo scorso 23/02/2005 06:55:
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]