Fix a bug with closing tabs if GTK version >= 2.10.0 (don't disconnect

tab DnD)
This commit is contained in:
Julien Pivotto 2007-06-26 10:33:51 +00:00
parent 7be506e3f5
commit 966a6f7a49
1 changed files with 5 additions and 3 deletions

View File

@ -103,8 +103,7 @@ class MessageWindow:
self.notebook.set_show_tabs(False)
self.notebook.set_show_border(gajim.config.get('tabs_border'))
# set up DnD
# If GTK+ version < 2.10, use OUR way to reorder tabs
# set up DnD if GTK+ version < 2.10, use OUR way to reorder tabs
if gtk.pygtk_version < (2, 10, 0) or gtk.gtk_version < (2, 10, 0):
self.hid = self.notebook.connect('drag_data_received',
self.on_tab_label_drag_data_received_cb)
@ -330,7 +329,10 @@ class MessageWindow:
types = ['printed_msg', 'chat', 'gc_msg'])
del gajim.last_message_time[ctrl.account][ctrl.get_full_jid()]
self.disconnect_tab_dnd(ctrl.widget)
# Disconnect tab DnD only if GTK version < 2.10
if gtk.pygtk_version < (2, 10, 0) or gtk.gtk_version < (2, 10, 0):
self.disconnect_tab_dnd(ctrl.widget)
self.notebook.remove_page(self.notebook.page_num(ctrl.widget))
fjid = ctrl.get_full_jid()