Fix up, look sharp
This commit is contained in:
parent
a6bdc39d5d
commit
2a794ba19e
4 changed files with 17 additions and 12 deletions
|
@ -965,7 +965,7 @@ class Interface:
|
|||
'''SIGNED_IN event is emitted when we sign in, so handle it'''
|
||||
# join already open groupchats
|
||||
for gc_control in gajim.interface.msg_win_mgr.get_controls(message_control.TYPE_GC):
|
||||
room_jid = gc_control.contact.jid
|
||||
room_jid = gc_control.room_jid
|
||||
if gajim.gc_connected[account][room_jid]:
|
||||
continue
|
||||
room, server = gajim.get_room_name_and_server_from_room_jid(room_jid)
|
||||
|
|
|
@ -497,7 +497,10 @@ class MessageWindowMgr:
|
|||
return self.get_window(jid)
|
||||
|
||||
def one_window_opened(self, contact, acct, type):
|
||||
try:
|
||||
return self._windows[self._mode_to_key(contact, acct, type)] != None
|
||||
except KeyError:
|
||||
return False
|
||||
|
||||
def _size_window(self, win, acct, type):
|
||||
'''Returns the size tuple: (width, height)'''
|
||||
|
@ -566,11 +569,13 @@ class MessageWindowMgr:
|
|||
win = self._windows[key]
|
||||
except KeyError:
|
||||
win = self._new_window(win_acct, win_type)
|
||||
self._windows[key] = win
|
||||
|
||||
# Postion and size window based on saved state and window mode
|
||||
if not self.one_window_opened(contact, acct, type):
|
||||
self._position_window(win, acct, type)
|
||||
self._size_window(win, acct, type)
|
||||
|
||||
self._windows[key] = win
|
||||
return win
|
||||
|
||||
def _on_window_delete(self, win, event):
|
||||
|
|
|
@ -244,7 +244,7 @@ class NotificationAreaTooltip(BaseTooltip, StatusTable):
|
|||
for acct in gajim.connections:
|
||||
# we count unread chat/pm messages
|
||||
for ctl in gajim.interface.msg_win_mgr.controls():
|
||||
c = gajim.contacts.get_first_contact_from_jid(acct, jid)
|
||||
c = gajim.contacts.get_first_contact_from_jid(acct, ctl.contact.jid)
|
||||
if c:
|
||||
unread_chat += ctl.nb_unread
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue