From 16fd31ca37c732860ed7aaac4d03ba3f8703db9b Mon Sep 17 00:00:00 2001 From: lovetox Date: Mon, 3 Oct 2016 22:43:17 +0200 Subject: [PATCH] Restore correct window size in single window mode --- src/message_window.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/message_window.py b/src/message_window.py index 42976b75e..c20faa18b 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -996,19 +996,16 @@ class MessageWindowMgr(GObject.GObject): """ Resizes window according to config settings """ + hpaned = gajim.config.get('roster_hpaned_position') if self.mode in (self.ONE_MSG_WINDOW_ALWAYS, - self.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER): + self.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER): size = (gajim.config.get('msgwin-width'), gajim.config.get('msgwin-height')) if self.mode == self.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER: - parent_size = win.window.get_size() # Need to add the size of the now visible paned handle, otherwise # the saved width of the message window decreases by this amount - s = GObject.Value() - s.init(GObject.TYPE_INT) - win.parent_paned.style_get_property('handle-size', s) - handle_size = s.get_int() - size = (parent_size[0] + size[0] + handle_size, size[1]) + handle_size = win.parent_paned.style_get_property('handle-size') + size = (hpaned + size[0] + handle_size, size[1]) 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')) @@ -1022,7 +1019,7 @@ class MessageWindowMgr(GObject.GObject): return win.resize(size[0], size[1]) if win.parent_paned: - win.parent_paned.set_position(gajim.config.get('roster_hpaned_position')) + win.parent_paned.set_position(hpaned) def _position_window(self, win, acct, type_): """