[pitivi] prefs: Fix dialog not closeable with the x button the first time



commit 8741a1337b27cc73a7eeaf4168983b4fc8b5cfdb
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Thu Jun 30 15:38:05 2016 +0200

    prefs: Fix dialog not closeable with the x button the first time
    
    Fixes https://phabricator.freedesktop.org/T7495
    
    Differential Revision: https://phabricator.freedesktop.org/D1148

 data/ui/preferences.ui  |    7 ++++---
 pitivi/dialogs/prefs.py |    4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/data/ui/preferences.ui b/data/ui/preferences.ui
index 57a0a19..b2f0711 100644
--- a/data/ui/preferences.ui
+++ b/data/ui/preferences.ui
@@ -8,6 +8,7 @@
     <property name="resizable">False</property>
     <property name="type_hint">dialog</property>
     <signal name="configure-event" handler="_configureCb" swapped="no"/>
+    <signal name="response" handler="_response_cb" swapped="no"/>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
@@ -59,7 +60,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <signal name="clicked" handler="_acceptButtonCb" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -182,9 +182,10 @@
       </object>
     </child>
     <action-widgets>
-      <action-widget response="0">resetButton</action-widget>
-      <action-widget response="0">revertButton</action-widget>
       <action-widget response="0">acceptButton</action-widget>
     </action-widgets>
+    <child>
+      <placeholder/>
+    </child>
   </object>
 </interface>
diff --git a/pitivi/dialogs/prefs.py b/pitivi/dialogs/prefs.py
index 2140697..5636e69 100644
--- a/pitivi/dialogs/prefs.py
+++ b/pitivi/dialogs/prefs.py
@@ -229,10 +229,10 @@ class PreferencesDialog(Loggable):
         button.set_sensitive(False)
         self.factory_settings.set_sensitive(self._canReset())
 
-    def _acceptButtonCb(self, unused_button):
+    def _response_cb(self, unused_button, unused_response_id):
         # Disable missing docstring
         # pylint: disable=C0111
-        self.dialog.hide()
+        self.dialog.destroy()
 
     def _valueChangedCb(self, unused_fake_widget, real_widget, attrname):
         # Disable missing docstring


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