Commit 0acafbb1 authored by Yann Leboulanger's avatar Yann Leboulanger

fix single message behaviour

parent 51c9c190
......@@ -21,6 +21,7 @@
<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="delete_event" handler="on_single_message_window_delete_event" last_modification_time="Mon, 17 Oct 2005 15:32:50 GMT"/>
<signal name="destroy" handler="on_single_message_window_destroy"/>
<child>
<widget class="GtkVBox" id="vbox97">
......@@ -544,5 +545,4 @@
</widget>
</child>
</widget>
</glade-interface>
......@@ -1481,8 +1481,11 @@ class SingleMessageWindow:
singled message depending on action argument which can be 'send'
or 'receive'.
'''
# Keep a reference on windows so garbage collector don't restroy them
instances = []
def __init__(self, account, to = '', action = '', from_whom = '',
subject = '', message = '', resource = ''):
self.instances.append(self)
self.account = account
self.action = action
......@@ -1581,6 +1584,9 @@ class SingleMessageWindow:
gajim.config.get('single-msg-height'))
self.window.show_all()
def on_single_message_window_destroy(self, widget):
self.instances.remove(self)
def set_cursor_to_end(self):
end_iter = self.message_tv_buffer.get_end_iter()
self.message_tv_buffer.place_cursor(end_iter)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment