Author: bct Date: 2008-06-17 05:27:54 +0200 (Tue, 17 Jun 2008) New Revision: 9813
Modified: trunk/src/gajim.py Log: fix undefined variables in handle_event()
Modified: trunk/src/gajim.py =================================================================== --- trunk/src/gajim.py 2008-06-16 14:12:59 UTC (rev 9812) +++ trunk/src/gajim.py 2008-06-17 03:27:54 UTC (rev 9813) @@ -2240,11 +2240,14 @@
def handle_event(self, account, fjid, type_): w = None + ctrl = None + session = None + resource = gajim.get_resource_from_jid(fjid) jid = gajim.get_jid_without_resource(fjid) + if type_ in ('printed_gc_msg', 'printed_marked_gc_msg', 'gc_msg'): w = self.msg_win_mgr.get_window(jid, account) - ctrl = None if self.minimized_controls[account].has_key(jid): if not w: ctrl = self.minimized_controls[account][jid] @@ -2269,8 +2272,6 @@ ctrl = session.control
if type_ == '' and self.msg_win_mgr.has_window(fjid, account): - # assume that the most recently updated control we have for this party - # is the one that this event was in ctrl = self.msg_win_mgr.get_chat_controls(fjid, account)[0] elif not ctrl: highest_contact = gajim.contacts.get_contact_with_highest_priority( @@ -2305,8 +2306,6 @@ if not event: event = gajim.events.get_first_event(account, jid, type_)
- session = None - if type_ == 'printed_pm': session = event.parameters[0] elif type_ == 'pm':