From 9240230c60650e45805b6f6e0ecd18bc5f22c48a Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Wed, 22 Sep 2010 10:39:55 +0400 Subject: Removed 'apply' button. Changes are applied when closing the Options window. --- set_location/config_dialog.ui | 70 +------------------------------------------ set_location/set_location.py | 12 ++++---- 2 files changed, 7 insertions(+), 75 deletions(-) (limited to 'set_location') diff --git a/set_location/config_dialog.ui b/set_location/config_dialog.ui index 4f71c45..06b22e0 100644 --- a/set_location/config_dialog.ui +++ b/set_location/config_dialog.ui @@ -7,7 +7,7 @@ True 6 - 17 + 16 2 7 5 @@ -197,7 +197,6 @@ True Altitude in meters above or below sea level - 1 @@ -210,7 +209,6 @@ True A named area such as a campus or neighborhood - 1 @@ -225,7 +223,6 @@ True A specific building on a street or in an area - 1 @@ -240,7 +237,6 @@ True The nation where the user is located - 1 @@ -255,7 +251,6 @@ True The ISO 3166 two-letter country code - 1 @@ -270,7 +265,6 @@ True A natural-language name for or description of the location - 1 @@ -285,7 +279,6 @@ True A particular floor in a building - 1 @@ -300,7 +293,6 @@ True A locality within the administrative region, such as a town or city - 1 @@ -315,7 +307,6 @@ True Latitude in decimal degrees North - 1 @@ -330,7 +321,6 @@ True Longitude in decimal degrees East - 1 @@ -345,7 +335,6 @@ True A code used for postal delivery - 1 @@ -360,7 +349,6 @@ True An administrative region of the nation, such as a state or province - 1 @@ -375,7 +363,6 @@ True A particular room in a building - 1 @@ -390,7 +377,6 @@ True A thoroughfare within the locality, or a crossing of two thoroughfares - 1 @@ -405,7 +391,6 @@ True A catch-all element that captures any other information about the location - 1 @@ -420,7 +405,6 @@ True A URI or URL pointing to information about the location - 1 @@ -429,58 +413,6 @@ 16 - - - True - 0 - none - 1 - - - True - True - True - False - 1 - - - - True - - - True - gtk-apply - - - 0 - - - - - True - Apply - - - 1 - - - - - - - - - 1 - 2 - 16 - 17 - GTK_FILL - - - - - - diff --git a/set_location/set_location.py b/set_location/set_location.py index ca12e49..32fb0df 100644 --- a/set_location/set_location.py +++ b/set_location/set_location.py @@ -76,15 +76,15 @@ class SetLocationPluginConfigDialog(GajimPluginConfigDialog): config_table = self.xml.get_object('config_table') self.child.pack_start(config_table) self.xml.connect_signals(self) + self.connect('hide', self.on_hide) def on_run(self): for name in self.plugin.config_default_values: widget = self.xml.get_object(name) widget.set_text(str(self.plugin.config[name])) - def changed(self, entry): - name = gtk.Buildable.get_name(entry) - self.plugin.config[name] = entry.get_text() - - def on_apply_clicked(self, widget): - self.plugin.activate() + def on_hide(self, widget): + for name in self.plugin.config_default_values: + widget = self.xml.get_object(name) + self.plugin.config[name] = widget.get_text() + self.plugin.activate() -- cgit v1.2.3