Single window mode to any other resulted in the roster being the size of the roster + any chats that were in the orignal window. This fixes that. (#3713)
This commit is contained in:
parent
d1a685c4a7
commit
00fe194744
1 changed files with 11 additions and 2 deletions
|
@ -993,7 +993,6 @@ class MessageWindowMgr(gobject.GObject):
|
||||||
for w in self.windows():
|
for w in self.windows():
|
||||||
self.save_state(w)
|
self.save_state(w)
|
||||||
gajim.interface.save_config()
|
gajim.interface.save_config()
|
||||||
# Map the mode to a int constant for frequent compares
|
|
||||||
mode = gajim.config.get('one_message_window')
|
mode = gajim.config.get('one_message_window')
|
||||||
if self.mode == common.config.opt_one_window_types.index(mode):
|
if self.mode == common.config.opt_one_window_types.index(mode):
|
||||||
# No change
|
# No change
|
||||||
|
@ -1006,13 +1005,20 @@ class MessageWindowMgr(gobject.GObject):
|
||||||
# MessageWindow is embedded.
|
# MessageWindow is embedded.
|
||||||
if not w.parent_paned:
|
if not w.parent_paned:
|
||||||
w.window.hide()
|
w.window.hide()
|
||||||
|
else:
|
||||||
|
# Stash current size so it can be restored if the MessageWindow
|
||||||
|
# is not longer embedded
|
||||||
|
roster_width = w.parent_paned.get_child1().allocation.width
|
||||||
|
gajim.config.set('roster_width', roster_width)
|
||||||
|
|
||||||
while w.notebook.get_n_pages():
|
while w.notebook.get_n_pages():
|
||||||
page = w.notebook.get_nth_page(0)
|
page = w.notebook.get_nth_page(0)
|
||||||
ctrl = w._widget_to_control(page)
|
ctrl = w._widget_to_control(page)
|
||||||
w.notebook.remove_page(0)
|
w.notebook.remove_page(0)
|
||||||
page.unparent()
|
page.unparent()
|
||||||
controls.append(ctrl)
|
controls.append(ctrl)
|
||||||
# Must clear _controls from window to prevent MessageControl.shutdown calls
|
|
||||||
|
# Must clear _controls to prevent MessageControl.shutdown calls
|
||||||
w._controls = {}
|
w._controls = {}
|
||||||
if not w.parent_paned:
|
if not w.parent_paned:
|
||||||
w.window.destroy()
|
w.window.destroy()
|
||||||
|
@ -1020,6 +1026,9 @@ class MessageWindowMgr(gobject.GObject):
|
||||||
# Don't close parent window, just remove the child
|
# Don't close parent window, just remove the child
|
||||||
child = w.parent_paned.get_child2()
|
child = w.parent_paned.get_child2()
|
||||||
w.parent_paned.remove(child)
|
w.parent_paned.remove(child)
|
||||||
|
gtkgui_helpers.resize_window(w.window,
|
||||||
|
gajim.config.get('roster_width'),
|
||||||
|
gajim.config.get('roster_height'))
|
||||||
|
|
||||||
self._windows = {}
|
self._windows = {}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue