From da6a42ae382c1fca01cd420fe9ed313f2d4265b1 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Thu, 10 Dec 1998 02:57:11 +0000 Subject: Use gnome_dialog_set_parent. ditto ditto. 1998-12-09 Miguel de Icaza * gncal-todo.c (simple_todo_editor): Use gnome_dialog_set_parent. * goto.c (goto_dialog): ditto * prop.c (properties): ditto. svn path=/trunk/; revision=522 --- calendar/ChangeLog | 6 ++++++ calendar/gncal-todo.c | 2 +- calendar/goto.c | 3 ++- calendar/gui/gncal-todo.c | 2 +- calendar/gui/goto.c | 3 ++- calendar/gui/main.c | 8 +++++++- calendar/gui/main.h | 2 +- calendar/gui/prop.c | 5 +++-- calendar/main.c | 8 +++++++- calendar/main.h | 2 +- calendar/prop.c | 5 +++-- 11 files changed, 34 insertions(+), 12 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 64297b4305..d5bceb8711 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +1998-12-09 Miguel de Icaza + + * gncal-todo.c (simple_todo_editor): Use gnome_dialog_set_parent. + * goto.c (goto_dialog): ditto + * prop.c (properties): ditto. + 1998-11-23 Miguel de Icaza * eventedit.c (ee_rp_init_exceptions): Update GtkClist usage. diff --git a/calendar/gncal-todo.c b/calendar/gncal-todo.c index eae0e556ca..33e596b203 100644 --- a/calendar/gncal-todo.c +++ b/calendar/gncal-todo.c @@ -99,7 +99,7 @@ simple_todo_editor (GncalTodo *todo, iCalObject *ico) GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); - + gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (todo->calendar)); hbox = gtk_hbox_new (FALSE, 4); gtk_container_border_width (GTK_CONTAINER (hbox), 4); gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0); diff --git a/calendar/goto.c b/calendar/goto.c index b645f02b6b..0e065f63c3 100644 --- a/calendar/goto.c +++ b/calendar/goto.c @@ -264,7 +264,8 @@ goto_dialog (GnomeCalendar *gcal) goto_win = gnome_dialog_new (_("Go to date"), GNOME_STOCK_BUTTON_CANCEL, NULL); - + gnome_dialog_set_parent (GNOME_DIALOG (goto_win), GTK_WINDOW (gcal)); + vbox = GNOME_DIALOG (goto_win)->vbox; /* Instructions */ diff --git a/calendar/gui/gncal-todo.c b/calendar/gui/gncal-todo.c index eae0e556ca..33e596b203 100644 --- a/calendar/gui/gncal-todo.c +++ b/calendar/gui/gncal-todo.c @@ -99,7 +99,7 @@ simple_todo_editor (GncalTodo *todo, iCalObject *ico) GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); - + gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (todo->calendar)); hbox = gtk_hbox_new (FALSE, 4); gtk_container_border_width (GTK_CONTAINER (hbox), 4); gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0); diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c index b645f02b6b..0e065f63c3 100644 --- a/calendar/gui/goto.c +++ b/calendar/gui/goto.c @@ -264,7 +264,8 @@ goto_dialog (GnomeCalendar *gcal) goto_win = gnome_dialog_new (_("Go to date"), GNOME_STOCK_BUTTON_CANCEL, NULL); - + gnome_dialog_set_parent (GNOME_DIALOG (goto_win), GTK_WINDOW (gcal)); + vbox = GNOME_DIALOG (goto_win)->vbox; /* Instructions */ diff --git a/calendar/gui/main.c b/calendar/gui/main.c index e41c2b2ce2..ea7b5efdb9 100644 --- a/calendar/gui/main.c +++ b/calendar/gui/main.c @@ -380,6 +380,12 @@ save_as_calendar_cmd (GtkWidget *widget, void *data) gtk_widget_destroy (GTK_WIDGET (fs)); } +static void +properties_cmd (GtkWidget *widget, GtkWidget *gcal) +{ + properties (gcal); +} + static void save_calendar_cmd (GtkWidget *widget, void *data) { @@ -403,7 +409,7 @@ static GnomeUIInfo gnome_cal_file_menu [] = { GNOMEUIINFO_SEPARATOR, - { GNOME_APP_UI_ITEM, N_("P_references..."), NULL, properties, NULL, NULL, + { GNOME_APP_UI_ITEM, N_("P_references..."), NULL, properties_cmd, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_PREF, 0, 0, NULL }, GNOMEUIINFO_SEPARATOR, diff --git a/calendar/gui/main.h b/calendar/gui/main.h index 9b3557a99f..615b372acf 100644 --- a/calendar/gui/main.h +++ b/calendar/gui/main.h @@ -32,7 +32,7 @@ struct color_prop { extern struct color_prop color_props[]; /* Creates and runs the preferences dialog box */ -void properties (void); +void properties (GtkWidget *toplevel); /* Asks for all the time-related displays to be updated when the user changes the time format * preferences. diff --git a/calendar/gui/prop.c b/calendar/gui/prop.c index 9f2fdfbdc4..4ae7359f06 100644 --- a/calendar/gui/prop.c +++ b/calendar/gui/prop.c @@ -496,14 +496,15 @@ create_colors_page (void) /* Creates and displays the preferences dialog for the whole application */ void -properties (void) +properties (GtkWidget *toplevel) { if (prop_win) return; prop_win = gnome_property_box_new (); gtk_window_set_title (GTK_WINDOW (prop_win), _("Preferences")); - + gnome_dialog_set_parent (GNOME_DIALOG (prop_win), GTK_WINDOW (toplevel)); + create_time_display_page (); create_colors_page (); diff --git a/calendar/main.c b/calendar/main.c index e41c2b2ce2..ea7b5efdb9 100644 --- a/calendar/main.c +++ b/calendar/main.c @@ -380,6 +380,12 @@ save_as_calendar_cmd (GtkWidget *widget, void *data) gtk_widget_destroy (GTK_WIDGET (fs)); } +static void +properties_cmd (GtkWidget *widget, GtkWidget *gcal) +{ + properties (gcal); +} + static void save_calendar_cmd (GtkWidget *widget, void *data) { @@ -403,7 +409,7 @@ static GnomeUIInfo gnome_cal_file_menu [] = { GNOMEUIINFO_SEPARATOR, - { GNOME_APP_UI_ITEM, N_("P_references..."), NULL, properties, NULL, NULL, + { GNOME_APP_UI_ITEM, N_("P_references..."), NULL, properties_cmd, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_PREF, 0, 0, NULL }, GNOMEUIINFO_SEPARATOR, diff --git a/calendar/main.h b/calendar/main.h index 9b3557a99f..615b372acf 100644 --- a/calendar/main.h +++ b/calendar/main.h @@ -32,7 +32,7 @@ struct color_prop { extern struct color_prop color_props[]; /* Creates and runs the preferences dialog box */ -void properties (void); +void properties (GtkWidget *toplevel); /* Asks for all the time-related displays to be updated when the user changes the time format * preferences. diff --git a/calendar/prop.c b/calendar/prop.c index 9f2fdfbdc4..4ae7359f06 100644 --- a/calendar/prop.c +++ b/calendar/prop.c @@ -496,14 +496,15 @@ create_colors_page (void) /* Creates and displays the preferences dialog for the whole application */ void -properties (void) +properties (GtkWidget *toplevel) { if (prop_win) return; prop_win = gnome_property_box_new (); gtk_window_set_title (GTK_WINDOW (prop_win), _("Preferences")); - + gnome_dialog_set_parent (GNOME_DIALOG (prop_win), GTK_WINDOW (toplevel)); + create_time_display_page (); create_colors_page (); -- cgit v1.2.3