From 966a6f7a4948ca07acd9778954e7ebec951155a9 Mon Sep 17 00:00:00 2001
From: Julien Pivotto <roidelapluie@esquimaux.be>
Date: Tue, 26 Jun 2007 10:33:51 +0000
Subject: [PATCH] Fix a bug with closing tabs if GTK version >= 2.10.0 (don't
 disconnect tab DnD)

---
 src/message_window.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/message_window.py b/src/message_window.py
index cb4fc30b81..ab03df0ac5 100644
--- a/src/message_window.py
+++ b/src/message_window.py
@@ -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()
-- 
GitLab