Also save width and height separetly for chats and gc when ONE_MSG_WINDOW_NEVER

This commit is contained in:
Jean-Marie Traissard 2006-06-02 21:49:13 +00:00
parent f8e1c59096
commit 5a78e29465
1 changed files with 7 additions and 2 deletions

View File

@ -641,13 +641,13 @@ class MessageWindowMgr:
if not gajim.config.get('saveposition'):
return
if self.mode in (self.ONE_MSG_WINDOW_NEVER, self.ONE_MSG_WINDOW_ALWAYS):
if self.mode == self.ONE_MSG_WINDOW_ALWAYS:
size = (gajim.config.get('msgwin-width'),
gajim.config.get('msgwin-height'))
elif self.mode == self.ONE_MSG_WINDOW_PERACCT:
size = (gajim.config.get_per('accounts', acct, 'msgwin-width'),
gajim.config.get_per('accounts', acct, 'msgwin-height'))
elif self.mode == self.ONE_MSG_WINDOW_PERTYPE:
elif self.mode in (self.ONE_MSG_WINDOW_NEVER, self.ONE_MSG_WINDOW_PERTYPE):
if type == message_control.TYPE_PM:
type = message_control.TYPE_CHAT
opt_width = type + '-msgwin-width'
@ -705,6 +705,7 @@ class MessageWindowMgr:
win_type = type
win_role = type
elif self.mode == self.ONE_MSG_WINDOW_NEVER:
win_type = type
win_role = contact.jid
win = None
@ -792,6 +793,10 @@ class MessageWindowMgr:
pos_y_key = type + '-msgwin-y-position'
size_width_key = type + '-msgwin-width'
size_height_key = type + '-msgwin-height'
elif self.mode == self.ONE_MSG_WINDOW_NEVER:
type = msg_win.type
size_width_key = type + '-msgwin-width'
size_height_key = type + '-msgwin-height'
if acct:
gajim.config.set_per('accounts', acct, size_width_key, width)