fix undefined variables in handle_event()
This commit is contained in:
parent
1d745c1c9d
commit
16c7dfca91
src
|
@ -2240,11 +2240,14 @@ class Interface:
|
|||
|
||||
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 @@ class Interface:
|
|||
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 @@ class Interface:
|
|||
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':
|
||||
|
|
Loading…
Reference in New Issue