Commit 8741a133 authored by Alexandru Băluț's avatar Alexandru Băluț

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
parent 13a8fd45
......@@ -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>
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment