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

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Fomin <fominde@gmail.com>2010-09-30 14:51:51 +0400
committerDenis Fomin <fominde@gmail.com>2010-09-30 14:51:51 +0400
commit0e010f9b7d7d7ba7d4e1f611b6f79a90d98e68d1 (patch)
tree6d1818ad33f35aaabeda208789226595c0d17b1b /set_location
parent47155e3beca17567640b66d933a6c710ec7c0e4a (diff)
set_location.Do not add an existing preset
Diffstat (limited to 'set_location')
-rw-r--r--set_location/set_location.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/set_location/set_location.py b/set_location/set_location.py
index ec530be..8adec88 100644
--- a/set_location/set_location.py
+++ b/set_location/set_location.py
@@ -207,12 +207,13 @@ class SetLocationPluginConfigDialog(GajimPluginConfigDialog):
continue
widget = self.xml.get_object(name)
preset[name] = widget.get_text()
+ if preset_name not in self.plugin.config['presets'].keys():
+ iter_ = self.preset_liststore.append((preset_name,))
+ self.preset_combo.set_active_iter(iter_)
preset = {preset_name: preset}
presets = dict(self.plugin.config['presets'].items() + \
preset.items())
self.plugin.config['presets'] = presets
- iter_ = self.preset_liststore.append((preset_name,))
- self.preset_combo.set_active_iter(iter_)
self.set_modal(False)
InputDialog(_('Save as Preset'), _('Please type a name for this preset'),
is_modal=True, ok_handler=on_ok)