save single message window size and position when it is destroyed

This commit is contained in:
Yann Leboulanger 2005-10-17 08:25:05 +00:00
parent c1d334c25d
commit 9e629e71f9
2 changed files with 11 additions and 0 deletions

View File

@ -1020,6 +1020,16 @@ class SingleMessageWindow:
gajim.config.get('single-height'))
self.window.show_all()
def on_single_message_window_destroy(self, window):
if gajim.config.get('saveposition'):
# save the window size and position
x, y = self.window.get_position()
gajim.config.set('single-x-position', x)
gajim.config.set('single-y-position', y)
width, height = self.window.get_size()
gajim.config.set('single-width', width)
gajim.config.set('single-height', height)
def prepare_widgets_for(self, action):
our_jid = gajim.config.get_per('accounts', self.account, 'name') + '@' + \
gajim.config.get_per('accounts', self.account, 'hostname')

View File

@ -16968,6 +16968,7 @@ Last Message</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<signal name="key_press_event" handler="on_single_message_window_key_press_event" last_modification_time="Tue, 05 Jul 2005 22:02:15 GMT"/>
<signal name="destroy" handler="on_single_message_window_destroy" last_modification_time="Mon, 17 Oct 2005 08:22:51 GMT"/>
<child>
<widget class="GtkVBox" id="vbox97">