Blob Blame History Raw
commit d1920ecd9cbcbd9c486f9fe79a5379ab7cfb10d3
Author: Stefano Facchini <stefano.facchini@gmail.com>
Date:   Mon Aug 26 18:34:35 2013 +0200

    Quit on delete event
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706821

diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py
index 40c108d..b02d84a 100644
--- a/Alacarte/MainWindow.py
+++ b/Alacarte/MainWindow.py
@@ -232,6 +232,9 @@ class MainWindow(object):
 
             self.item_store.append((show, icon, name, item))
 
+    def on_delete_event(self, widget, event):
+        self.quit()
+
     def on_new_menu_button_clicked(self, button):
         menu_tree = self.tree.get_object('menu_tree')
         menus, iter = menu_tree.get_selection().get_selected()
diff --git a/data/alacarte.ui b/data/alacarte.ui
index cf918a1..e09ae88 100644
--- a/data/alacarte.ui
+++ b/data/alacarte.ui
@@ -39,6 +39,7 @@
     <property name="window_position">center</property>
     <property name="default_width">675</property>
     <property name="default_height">530</property>
+    <signal name="delete_event" handler="on_delete_event" swapped="no"/>
     <child>
       <object class="GtkVBox" id="dialog-vbox5">
         <property name="visible">True</property>