From 13b2894496fb1485752d97335800c5fdf34baf8c Mon Sep 17 00:00:00 2001 From: EDT 1998 Matthew Wilson Date: Mon, 13 Apr 1998 04:44:43 +0000 Subject: [PATCH] Duh. We have a message_box. Why not use it for the prefs code. Mon Apr 13 00:41:50 EDT 1998 Matthew Wilson * app/command.c: Duh. We have a message_box. Why not use it for the prefs code. --Matt "reinvent the wheel" Wilson --- ChangeLog | 7 ++++- app/actions/help-commands.c | 59 +------------------------------------ app/commands.c | 59 +------------------------------------ app/gui/commands.c | 59 +------------------------------------ app/gui/help-commands.c | 59 +------------------------------------ 5 files changed, 10 insertions(+), 233 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d74c722fc..d6c08c4462 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -Mon Apr 13 00:27:45 EDP 1998 Matthew Wilson +Mon Apr 13 00:41:50 EDT 1998 Matthew Wilson + + * app/command.c: Duh. We have a message_box. Why not use it for + the prefs code. + +Mon Apr 13 00:27:45 EDT 1998 Matthew Wilson * app/gdisplay.c: Set the current tool's gdisplay pointer to NULL when destroying a gdisplay diff --git a/app/actions/help-commands.c b/app/actions/help-commands.c index e026c32c68..6a5c36a2f5 100644 --- a/app/actions/help-commands.c +++ b/app/actions/help-commands.c @@ -600,63 +600,6 @@ file_prefs_ok_callback (GtkWidget *widget, gtk_tooltips_disable (tool_tips); } -static gint -file_prefs_restart_delete_callback (GtkWidget *w, - GdkEvent *e, - gpointer client_data) -{ - return FALSE; -} - -static void -file_prefs_restart_dialog_callback (GtkWidget *w, - gpointer data) -{ - GtkWidget *dlg; - - dlg = (GtkWidget *) data; - - gtk_widget_destroy(dlg); -} - -void -file_prefs_restart_create () -{ - GtkWidget *shell, *vbox, *label; - - ActionAreaItem action_items[1] = - { - { "OK", file_prefs_restart_dialog_callback, NULL, NULL } - }; - - /* The shell and main vbox */ - shell = gtk_dialog_new (); - - gtk_window_set_wmclass (GTK_WINDOW (shell), "restart_notification", "Notice"); - gtk_window_set_title (GTK_WINDOW (shell), "Notice"); - gtk_window_set_policy (GTK_WINDOW (shell), FALSE, TRUE, TRUE); - - vbox = gtk_vbox_new (FALSE, 2); - gtk_container_border_width (GTK_CONTAINER (vbox), 2); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (shell)->vbox), vbox, TRUE, TRUE, 0); - - label = gtk_label_new ("You will need to restart GIMP for these changes to take effect."); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); - gtk_widget_show (label); - - /* handle the window manager trying to close the window */ - gtk_signal_connect (GTK_OBJECT (shell), "delete_event", - GTK_SIGNAL_FUNC (file_prefs_restart_delete_callback), - shell); - - action_items[0].user_data = shell; - build_action_area (GTK_DIALOG (shell), action_items, 1, 0); - - gtk_widget_show (vbox); - gtk_widget_show (shell); -} - - static void file_prefs_save_callback (GtkWidget *widget, GtkWidget *dlg) @@ -809,7 +752,7 @@ file_prefs_save_callback (GtkWidget *widget, gradient_path = save_gradient_path; if (restart_notification) - file_prefs_restart_create(); + message_box("You will need to restart GIMP for these changes to take effect.", NULL, NULL); g_list_free (update); g_list_free (remove); diff --git a/app/commands.c b/app/commands.c index e026c32c68..6a5c36a2f5 100644 --- a/app/commands.c +++ b/app/commands.c @@ -600,63 +600,6 @@ file_prefs_ok_callback (GtkWidget *widget, gtk_tooltips_disable (tool_tips); } -static gint -file_prefs_restart_delete_callback (GtkWidget *w, - GdkEvent *e, - gpointer client_data) -{ - return FALSE; -} - -static void -file_prefs_restart_dialog_callback (GtkWidget *w, - gpointer data) -{ - GtkWidget *dlg; - - dlg = (GtkWidget *) data; - - gtk_widget_destroy(dlg); -} - -void -file_prefs_restart_create () -{ - GtkWidget *shell, *vbox, *label; - - ActionAreaItem action_items[1] = - { - { "OK", file_prefs_restart_dialog_callback, NULL, NULL } - }; - - /* The shell and main vbox */ - shell = gtk_dialog_new (); - - gtk_window_set_wmclass (GTK_WINDOW (shell), "restart_notification", "Notice"); - gtk_window_set_title (GTK_WINDOW (shell), "Notice"); - gtk_window_set_policy (GTK_WINDOW (shell), FALSE, TRUE, TRUE); - - vbox = gtk_vbox_new (FALSE, 2); - gtk_container_border_width (GTK_CONTAINER (vbox), 2); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (shell)->vbox), vbox, TRUE, TRUE, 0); - - label = gtk_label_new ("You will need to restart GIMP for these changes to take effect."); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); - gtk_widget_show (label); - - /* handle the window manager trying to close the window */ - gtk_signal_connect (GTK_OBJECT (shell), "delete_event", - GTK_SIGNAL_FUNC (file_prefs_restart_delete_callback), - shell); - - action_items[0].user_data = shell; - build_action_area (GTK_DIALOG (shell), action_items, 1, 0); - - gtk_widget_show (vbox); - gtk_widget_show (shell); -} - - static void file_prefs_save_callback (GtkWidget *widget, GtkWidget *dlg) @@ -809,7 +752,7 @@ file_prefs_save_callback (GtkWidget *widget, gradient_path = save_gradient_path; if (restart_notification) - file_prefs_restart_create(); + message_box("You will need to restart GIMP for these changes to take effect.", NULL, NULL); g_list_free (update); g_list_free (remove); diff --git a/app/gui/commands.c b/app/gui/commands.c index e026c32c68..6a5c36a2f5 100644 --- a/app/gui/commands.c +++ b/app/gui/commands.c @@ -600,63 +600,6 @@ file_prefs_ok_callback (GtkWidget *widget, gtk_tooltips_disable (tool_tips); } -static gint -file_prefs_restart_delete_callback (GtkWidget *w, - GdkEvent *e, - gpointer client_data) -{ - return FALSE; -} - -static void -file_prefs_restart_dialog_callback (GtkWidget *w, - gpointer data) -{ - GtkWidget *dlg; - - dlg = (GtkWidget *) data; - - gtk_widget_destroy(dlg); -} - -void -file_prefs_restart_create () -{ - GtkWidget *shell, *vbox, *label; - - ActionAreaItem action_items[1] = - { - { "OK", file_prefs_restart_dialog_callback, NULL, NULL } - }; - - /* The shell and main vbox */ - shell = gtk_dialog_new (); - - gtk_window_set_wmclass (GTK_WINDOW (shell), "restart_notification", "Notice"); - gtk_window_set_title (GTK_WINDOW (shell), "Notice"); - gtk_window_set_policy (GTK_WINDOW (shell), FALSE, TRUE, TRUE); - - vbox = gtk_vbox_new (FALSE, 2); - gtk_container_border_width (GTK_CONTAINER (vbox), 2); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (shell)->vbox), vbox, TRUE, TRUE, 0); - - label = gtk_label_new ("You will need to restart GIMP for these changes to take effect."); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); - gtk_widget_show (label); - - /* handle the window manager trying to close the window */ - gtk_signal_connect (GTK_OBJECT (shell), "delete_event", - GTK_SIGNAL_FUNC (file_prefs_restart_delete_callback), - shell); - - action_items[0].user_data = shell; - build_action_area (GTK_DIALOG (shell), action_items, 1, 0); - - gtk_widget_show (vbox); - gtk_widget_show (shell); -} - - static void file_prefs_save_callback (GtkWidget *widget, GtkWidget *dlg) @@ -809,7 +752,7 @@ file_prefs_save_callback (GtkWidget *widget, gradient_path = save_gradient_path; if (restart_notification) - file_prefs_restart_create(); + message_box("You will need to restart GIMP for these changes to take effect.", NULL, NULL); g_list_free (update); g_list_free (remove); diff --git a/app/gui/help-commands.c b/app/gui/help-commands.c index e026c32c68..6a5c36a2f5 100644 --- a/app/gui/help-commands.c +++ b/app/gui/help-commands.c @@ -600,63 +600,6 @@ file_prefs_ok_callback (GtkWidget *widget, gtk_tooltips_disable (tool_tips); } -static gint -file_prefs_restart_delete_callback (GtkWidget *w, - GdkEvent *e, - gpointer client_data) -{ - return FALSE; -} - -static void -file_prefs_restart_dialog_callback (GtkWidget *w, - gpointer data) -{ - GtkWidget *dlg; - - dlg = (GtkWidget *) data; - - gtk_widget_destroy(dlg); -} - -void -file_prefs_restart_create () -{ - GtkWidget *shell, *vbox, *label; - - ActionAreaItem action_items[1] = - { - { "OK", file_prefs_restart_dialog_callback, NULL, NULL } - }; - - /* The shell and main vbox */ - shell = gtk_dialog_new (); - - gtk_window_set_wmclass (GTK_WINDOW (shell), "restart_notification", "Notice"); - gtk_window_set_title (GTK_WINDOW (shell), "Notice"); - gtk_window_set_policy (GTK_WINDOW (shell), FALSE, TRUE, TRUE); - - vbox = gtk_vbox_new (FALSE, 2); - gtk_container_border_width (GTK_CONTAINER (vbox), 2); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (shell)->vbox), vbox, TRUE, TRUE, 0); - - label = gtk_label_new ("You will need to restart GIMP for these changes to take effect."); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); - gtk_widget_show (label); - - /* handle the window manager trying to close the window */ - gtk_signal_connect (GTK_OBJECT (shell), "delete_event", - GTK_SIGNAL_FUNC (file_prefs_restart_delete_callback), - shell); - - action_items[0].user_data = shell; - build_action_area (GTK_DIALOG (shell), action_items, 1, 0); - - gtk_widget_show (vbox); - gtk_widget_show (shell); -} - - static void file_prefs_save_callback (GtkWidget *widget, GtkWidget *dlg) @@ -809,7 +752,7 @@ file_prefs_save_callback (GtkWidget *widget, gradient_path = save_gradient_path; if (restart_notification) - file_prefs_restart_create(); + message_box("You will need to restart GIMP for these changes to take effect.", NULL, NULL); g_list_free (update); g_list_free (remove);