=== modified file 'gedit/gedit-tab-label.c'
--- gedit/gedit-tab-label.c	2010-08-25 21:46:36 +0000
+++ gedit/gedit-tab-label.c	2010-08-26 11:22:08 +0000
@@ -118,6 +118,21 @@
 	g_signal_emit (tab_label, signals[CLOSE_CLICKED], 0, NULL);
 }
 
+static gboolean
+ebox_button_release_event_cb (GtkWidget     *widget,
+			GdkEventButton *event,
+			GeditTabLabel *tab_label)
+{
+	if (2 == event->button)
+	{
+		/* Middle click */
+		g_signal_emit (tab_label, signals[CLOSE_CLICKED], 0, NULL);
+		return TRUE;
+	}
+	
+	return FALSE;
+}
+
 static void
 sync_tip (GeditTab *tab, GeditTabLabel *tab_label)
 {
@@ -291,6 +306,11 @@
 			  G_CALLBACK (close_button_clicked_cb),
 			  tab_label);
 
+	g_signal_connect (ebox,
+			  "button-release-event",
+			  G_CALLBACK (ebox_button_release_event_cb),
+			  tab_label);
+    
 #ifdef BUILD_SPINNER
 	spinner = gedit_spinner_new ();
 	gedit_spinner_set_size (GEDIT_SPINNER (spinner), GTK_ICON_SIZE_MENU);

