don't autoconnect signal on a widget than can be hidden (loh_history_checkbutton in vcard window)

This commit is contained in:
Yann Leboulanger 2005-12-07 21:06:43 +00:00
parent 5cf9141777
commit c158ffe2d4
2 changed files with 5 additions and 3 deletions

View File

@ -6769,7 +6769,6 @@ Custom</property>
<property name="active">True</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_log_history_checkbutton_toggled" last_modification_time="Wed, 07 Dec 2005 14:24:05 GMT"/>
</widget>
<packing>
<property name="left_attach">0</property>

View File

@ -101,7 +101,7 @@ class VcardWindow:
self.xml.signal_autoconnect(self)
self.window.show_all()
def on_vcard_information_window_destroy(self, widget = None):
def on_vcard_information_window_destroy(self, widget):
del gajim.interface.instances[self.account]['infos'][self.jid]
def on_vcard_information_window_key_press_event(self, widget, event):
@ -304,7 +304,10 @@ class VcardWindow:
if self.contact.jid in gajim.config.get_per('accounts', self.account,
'no_log_for').split(' '):
log = False
self.xml.get_widget('log_history_checkbutton').set_active(log)
checkbutton = self.xml.get_widget('log_history_checkbutton')
checkbutton.set_active(log)
checkbutton.connect('toggled', self.on_log_history_checkbutton_toggled)
resources = '%s (%s)' % (self.contact.resource, unicode(
self.contact.priority))
uf_resources = self.contact.resource + _(' resource with priority ')\