[Tkabber-dev] r823 - in trunk/tkabber: . ifacetk

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Wed Dec 6 22:55:37 MSK 2006


Author: sergei
Date: 2006-12-06 22:55:35 +0300 (Wed, 06 Dec 2006)
New Revision: 823

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/ifacetk/iface.tcl
Log:
	* ifacetk/iface.tcl: Close tab with middle button click on the tab
	  header.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2006-12-05 20:06:21 UTC (rev 822)
+++ trunk/tkabber/ChangeLog	2006-12-06 19:55:35 UTC (rev 823)
@@ -1,3 +1,8 @@
+2006-12-06  Sergei Golovan  <sgolovan at nes.ru>
+
+	* ifacetk/iface.tcl: Close tab with middle button click on the tab
+	  header.
+
 2006-12-05  Sergei Golovan  <sgolovan at nes.ru>
 
 	* gpgme.tcl: Fixed bug with incorrect call of signed:Label.

Modified: trunk/tkabber/ifacetk/iface.tcl
===================================================================
--- trunk/tkabber/ifacetk/iface.tcl	2006-12-05 20:06:21 UTC (rev 822)
+++ trunk/tkabber/ifacetk/iface.tcl	2006-12-06 19:55:35 UTC (rev 823)
@@ -775,6 +775,7 @@
 	    }
 
 	.nb bindtabs <3> [list [namespace current]::tab_menu %X %Y]
+	.nb bindtabs <2> [list [namespace current]::destroy_tab]
 	.nb bindtabs <<ScrollUp>> [list [namespace current]::tab_move .nb -1]
 	.nb bindtabs <<ScrollDown>> [list [namespace current]::tab_move .nb 1]
 
@@ -814,6 +815,14 @@
     update idletasks
 }
 
+proc ifacetk::destroy_tab {page} {
+    if {[.nb raise] != ""} {
+	eval destroy [pack slaves [.nb getframe $page]]
+	.nb delete $page 1
+	ifacetk::tab_move .nb 0
+    }
+}
+
 proc ifacetk::draginitcmd {target x y top} {
     set c .nb.c
 



More information about the Tkabber-dev mailing list