[latexila] Templates dialogs: destroy with parent



commit 9c6f05ae80f0a44afaf1f9a176394db29ac99059
Author: SÃbastien Wilmet <swilmet src gnome org>
Date:   Thu Jul 19 00:43:15 2012 +0200

    Templates dialogs: destroy with parent

 src/templates_dialogs.vala |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/templates_dialogs.vala b/src/templates_dialogs.vala
index 49efff6..58d09c9 100644
--- a/src/templates_dialogs.vala
+++ b/src/templates_dialogs.vala
@@ -31,10 +31,11 @@ public class OpenTemplateDialog
     {
         _main_window = main_window;
 
-        _dialog = new Dialog.with_buttons (_("New File..."), main_window, 0,
+        _dialog = new Dialog.with_buttons (_("New File..."), main_window,
+            DialogFlags.DESTROY_WITH_PARENT,
             Stock.CANCEL, ResponseType.REJECT,
-            Stock.OK, ResponseType.ACCEPT,
-            null);
+            Stock.OK, ResponseType.ACCEPT
+        );
 
         Box content_area = _dialog.get_content_area () as Box;
 
@@ -172,6 +173,7 @@ public class CreateTemplateDialog : Dialog
 
         title = _("New Template...");
         set_transient_for (parent);
+        destroy_with_parent = true;
         add_button (Stock.CANCEL, ResponseType.REJECT);
         add_button (Stock.OK, ResponseType.ACCEPT);
 
@@ -242,6 +244,7 @@ public class DeleteTemplateDialog : Dialog
         add_button (Stock.DELETE, ResponseType.ACCEPT);
         add_button (Stock.CLOSE, ResponseType.REJECT);
         set_transient_for (parent);
+        destroy_with_parent = true;
 
         /* List of the personal templates */
 



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