add advanced option to put the roster on the right in single window mode. Fixes #4679
This commit is contained in:
parent
a0d9d6cf2a
commit
b74fdf1c8b
|
@ -164,6 +164,7 @@ class Config:
|
|||
'roster_width': [ opt_int, 200 ],
|
||||
'roster_height': [ opt_int, 400 ],
|
||||
'roster_hpaned_position': [opt_int, 200],
|
||||
'roster_on_the_right': [opt_bool, False, _('Place the roster on the right in single window mode'), True],
|
||||
'history_window_width': [ opt_int, 650 ],
|
||||
'history_window_height': [ opt_int, 450 ],
|
||||
'history_window_x-position': [ opt_int, 0 ],
|
||||
|
|
|
@ -86,8 +86,16 @@ class MessageWindow(object):
|
|||
self.parent_paned = parent_paned
|
||||
old_parent = self.notebook.get_parent()
|
||||
old_parent.remove(self.notebook)
|
||||
self.parent_paned.add(self.notebook)
|
||||
self.parent_paned.pack2(self.notebook, resize=True, shrink=True)
|
||||
if gajim.config.get('roster_on_the_right'):
|
||||
child1 = self.parent_paned.get_child1()
|
||||
self.parent_paned.remove(child1)
|
||||
self.parent_paned.add(self.notebook)
|
||||
self.parent_paned.pack1(self.notebook, resize=False,
|
||||
shrink=True)
|
||||
self.parent_paned.pack2(child1, resize=True, shrink=True)
|
||||
else:
|
||||
self.parent_paned.add(self.notebook)
|
||||
self.parent_paned.pack2(self.notebook, resize=True, shrink=True)
|
||||
gajim.interface.roster.xml.get_object('show_roster_menuitem').\
|
||||
set_sensitive(True)
|
||||
orig_window.destroy()
|
||||
|
|
Loading…
Reference in New Issue