From 5aec18639d36deee32e8e95d6267a01398c125cb Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Fri, 9 Sep 2005 14:56:14 +0000 Subject: [PATCH] don't save position if show_roster_on_start is False and roster is never shown --- src/roster_window.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index eff909d71..aa7e407f2 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1552,12 +1552,15 @@ _('If "%s" accepts this request you will know his status.') %jid) '''When we quit the gtk plugin : tell that to the core and exit gtk''' if gajim.config.get('saveposition'): - x, y = self.window.window.get_root_origin() - gajim.config.set('roster_x-position', x) - gajim.config.set('roster_y-position', y) - width, height = self.window.get_size() - gajim.config.set('roster_width', width) - gajim.config.set('roster_height', height) + # in case show_roster_on_start is False and roster is never shown + # window.window is None + if self.window.window is not None: + x, y = self.window.window.get_root_origin() + gajim.config.set('roster_x-position', x) + gajim.config.set('roster_y-position', y) + width, height = self.window.get_size() + gajim.config.set('roster_width', width) + gajim.config.set('roster_height', height) gajim.config.set('collapsed_rows', '\t'.join(self.collapsed_rows)) self.plugin.save_config()