Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2014-03-23 19:24:59 +0400
committerYann Leboulanger <asterix@lagaule.org>2014-03-23 19:24:59 +0400
commit6176e5c41f8ec09025bb82aad75a0f557172a55a (patch)
tree417c3c5ca197c2d8706f75ee70caa63d0cdd0cc1
parentf36dddc8efab1bc3c9e3af4eeb6d54c7f06ddb38 (diff)
better way to handle close button in about dialog
-rw-r--r--src/dialogs.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/dialogs.py b/src/dialogs.py
index d540a0ead..bec33f23f 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -1344,12 +1344,14 @@ class AboutDialog:
artists_text = a_file.read()
artists = artists_text.split('\n')
dlg.set_artists(artists)
- # connect close button to destroy() function
- for button in dlg.action_area.get_children():
- if button.get_property('label') == "_Close":
- button.connect('clicked', lambda x:dlg.destroy())
+
+ dlg.connect('response', self.on_response)
dlg.show_all()
+ def on_response(self, dialog, response_id):
+ if response_id == Gtk.ResponseType.CANCEL:
+ dialog.destroy()
+
def tuple2str(self, tuple_):
str_ = ''
for num in tuple_: