From 93f76ce6ee053e5190ec1f563ad5918cffbee78a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 1 Mar 2008 13:26:23 +0000 Subject: [PATCH] make configure button sensitive only when a service is selected in pep window. fixes #3750 --- src/config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/config.py b/src/config.py index e82d02774..0078af24f 100644 --- a/src/config.py +++ b/src/config.py @@ -3671,10 +3671,13 @@ class ManagePEPServicesWindow: self.xml = gtkgui_helpers.get_glade('manage_pep_services_window.glade') self.window = self.xml.get_widget('manage_pep_services_window') self.window.set_transient_for(gajim.interface.roster.window) + self.xml.get_widget('configure_button').set_sensitive(False) self.xml.signal_autoconnect(self) self.account = account self.init_services() + self.xml.get_widget('services_treeview').get_selection().connect( + 'changed', self.on_services_selection_changed) self.window.show_all() def on_manage_pep_services_window_destroy(self, widget): @@ -3684,6 +3687,9 @@ class ManagePEPServicesWindow: def on_close_button_clicked(self, widget): self.window.destroy() + def on_services_selection_changed(self, sel): + self.xml.get_widget('configure_button').set_sensitive(True) + def init_services(self): self.treeview = self.xml.get_widget('services_treeview') # service, access_model, group