SetLocationPlugin.rewrite all markers after config dialog showed

This commit is contained in:
Denis Fomin
2013-02-05 20:35:44 +04:00
parent 2e0037bef4
commit 1995f71fb0

View File

@@ -91,6 +91,7 @@ class SetLocationPluginConfigDialog(GajimPluginConfigDialog):
self.get_child().pack_start(hbox, True, True, 0) self.get_child().pack_start(hbox, True, True, 0)
self.xml.connect_signals(self) self.xml.connect_signals(self)
self.connect('hide', self.on_hide) self.connect('hide', self.on_hide)
self.connect('show', self.on_show)
self.is_active = None self.is_active = None
self.preset_combo = self.xml.get_object('preset_combobox') self.preset_combo = self.xml.get_object('preset_combobox')
@@ -171,6 +172,10 @@ class SetLocationPluginConfigDialog(GajimPluginConfigDialog):
self.xml.get_object('lat').connect('changed', self.on_lon_changed) self.xml.get_object('lat').connect('changed', self.on_lon_changed)
self.xml.get_object('lon').connect('changed', self.on_lon_changed) self.xml.get_object('lon').connect('changed', self.on_lon_changed)
self.layer.animate_in_all_markers() self.layer.animate_in_all_markers()
self.contacts_layer = Champlain.MarkerLayer()
def on_show(self, widget):
self.contacts_layer.destroy()
self.show_contacts() self.show_contacts()
def on_hide(self, widget): def on_hide(self, widget):
@@ -239,7 +244,7 @@ class SetLocationPluginConfigDialog(GajimPluginConfigDialog):
if not lat or not lon: if not lat or not lon:
continue continue
name = accounts[account].contacts.get_first_contact_from_jid( name = accounts[account].contacts.get_first_contact_from_jid(
contact).name contact).get_shown_name()
data[contact] = (lat, lon, name) data[contact] = (lat, lon, name)
self.contacts_layer = Champlain.MarkerLayer() self.contacts_layer = Champlain.MarkerLayer()