From: Max Usachev Date: Thu, 17 Jun 2010 08:56:20 +0000 (+0300) Subject: fixed bug with update widgets X-Git-Url: https://vcs.maemo.org/git/?p=meabook;a=commitdiff_plain;h=2377550e295d8739898e9f99551559a2129ae6a1 fixed bug with update widgets --- diff --git a/ui/hildon_ui.py b/ui/hildon_ui.py index 99a00d2..ea9fd76 100644 --- a/ui/hildon_ui.py +++ b/ui/hildon_ui.py @@ -114,8 +114,9 @@ class HildonMeabook(MeabookUI): def show_settings_dialog(widget, parent, func1, func2, entry_id): dialog = ConfigurationDialog(self.controller, self.config) - getattr(dialog, func1)(None, parent) - func2(parent, entry_id) + response = getattr(dialog, func1)(None, parent) + if response == gtk.RESPONSE_OK: + func2(parent, entry_id) def update_entry(window, entry_id): # create widgets @@ -326,6 +327,7 @@ class ConfigurationDialog: self.config.set_fields(selected_items) self._update_value(widget, selected_items) dialog.destroy() + return response def show_order_settings_cb(self, widget, parent): """Shows dialog for setting fields order.""" @@ -370,3 +372,4 @@ class ConfigurationDialog: self.config.set_order(fields) self._update_value(widget, fields) dialog.destroy() + return response