[gimp] plug-ins: gfig, do cancel stuff when the dialog is closed



commit d03d804b92d57bffc496da3597718d484c2da647
Author: Mikael Magnusson <mikachu src gnome org>
Date:   Thu Mar 31 18:09:05 2011 +0200

    plug-ins: gfig, do cancel stuff when the dialog is closed

 plug-ins/gfig/gfig-dialog.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/gfig/gfig-dialog.c b/plug-ins/gfig/gfig-dialog.c
index 3c1507d..91783bf 100644
--- a/plug-ins/gfig/gfig-dialog.c
+++ b/plug-ins/gfig/gfig-dialog.c
@@ -141,6 +141,8 @@ static GtkWidget      *fill_type_notebook;
 static GtkActionGroup *gfig_actions    = NULL;
 
 
+static void       gfig_destroy               (GtkWidget *widget,
+                                              gpointer   data);
 static void       gfig_response              (GtkWidget *widget,
                                               gint       response_id,
                                               gpointer   data);
@@ -300,7 +302,7 @@ gfig_dialog (void)
                     G_CALLBACK (gfig_response),
                     top_level_dlg);
   g_signal_connect (top_level_dlg, "destroy",
-                    G_CALLBACK (gtk_main_quit),
+                    G_CALLBACK (gfig_destroy),
                     NULL);
 
   /* build the menu */
@@ -541,6 +543,14 @@ gfig_dialog (void)
 }
 
 static void
+gfig_destroy (GtkWidget *widget,
+              gpointer data)
+{
+  gfig_response (widget, GTK_RESPONSE_CANCEL, data);
+  gtk_main_quit ();
+}
+
+static void
 gfig_response (GtkWidget *widget,
                gint       response_id,
                gpointer   data)



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