SingleMessageWindow size/position fixes for #1505

This commit is contained in:
Travis Shirk 2006-02-04 01:08:37 +00:00
parent 2525fef3a8
commit 029d4838b8

View file

@ -5,14 +5,12 @@
## - Nikos Kouremenos <kourem@gmail.com> ## - Nikos Kouremenos <kourem@gmail.com>
## - Dimitur Kirov <dkirov@gmail.com> ## - Dimitur Kirov <dkirov@gmail.com>
## ##
## Copyright (C) 2003-2004 Yann Le Boulanger <asterix@lagaule.org> ## Copyright (C) 2003-2006 Yann Le Boulanger <asterix@lagaule.org>
## Vincent Hanquez <tab@snarc.org> ## Copyright (C) 2003-2004 Vincent Hanquez <tab@snarc.org>
## Copyright (C) 2005 Yann Le Boulanger <asterix@lagaule.org> ## Copyright (C) 2005 Nikos Kouremenos <nkour@jabber.org>
## Vincent Hanquez <tab@snarc.org> ## Copyright (C) 2005 Dimitur Kirov <dkirov@gmail.com>
## Nikos Kouremenos <nkour@jabber.org> ## Copyright (C) 2005-2006 Travis Shirk <travis@pobox.com>
## Dimitur Kirov <dkirov@gmail.com> ## Copyright (C) 2005 Norman Rasmussen <norman@rasmussen.co.za>
## Travis Shirk <travis@pobox.com>
## Norman Rasmussen <norman@rasmussen.co.za>
## ##
## This program is free software; you can redistribute it and/or modify ## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published ## it under the terms of the GNU General Public License as published
@ -1109,11 +1107,11 @@ class SingleMessageWindow:
if gajim.config.get('saveposition'): if gajim.config.get('saveposition'):
# get window position and size from config # get window position and size from config
gtkgui_helpers.move_window(self.window, gtkgui_helpers.move_window(self.window,
gajim.config.get('single_msg-x-position'), gajim.config.get('single-msg-x-position'),
gajim.config.get('single_msg-y-position')) gajim.config.get('single-msg-y-position'))
gtkgui_helpers.resize_window(self.window, gtkgui_helpers.resize_window(self.window,
gajim.config.get('single_msg-width'), gajim.config.get('single-msg-width'),
gajim.config.get('single_msg-height')) gajim.config.get('single-msg-height'))
self.window.show_all() self.window.show_all()
def set_cursor_to_end(self): def set_cursor_to_end(self):
@ -1124,11 +1122,12 @@ class SingleMessageWindow:
if gajim.config.get('saveposition'): if gajim.config.get('saveposition'):
# save the window size and position # save the window size and position
x, y = self.window.get_position() x, y = self.window.get_position()
gajim.config.set('single_msg-x-position', x) gajim.config.set('single-msg-x-position', x)
gajim.config.set('single_msg-y-position', y) gajim.config.set('single-msg-y-position', y)
width, height = self.window.get_size() width, height = self.window.get_size()
gajim.config.set('single_msg-width', width) gajim.config.set('single-msg-width', width)
gajim.config.set('single_msg-height', height) gajim.config.set('single-msg-height', height)
gajim.interface.save_config()
def on_single_message_window_delete_event(self, window, ev): def on_single_message_window_delete_event(self, window, ev):
self.save_pos() self.save_pos()