[Tkabber-dev] r1115 - in branches/tkabber-tabbar: . ifacetk

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Apr 17 23:02:58 MSD 2007


Author: sergei
Date: 2007-04-17 23:02:57 +0400 (Tue, 17 Apr 2007)
New Revision: 1115

Modified:
   branches/tkabber-tabbar/ChangeLog
   branches/tkabber-tabbar/ifacetk/buttonbar.tcl
Log:
	* ifacetk/buttonbar.tcl: Restored reconfiguring button text on
	  <Configure> event but ensure that it happens only once.


Modified: branches/tkabber-tabbar/ChangeLog
===================================================================
--- branches/tkabber-tabbar/ChangeLog	2007-04-15 13:00:55 UTC (rev 1114)
+++ branches/tkabber-tabbar/ChangeLog	2007-04-17 19:02:57 UTC (rev 1115)
@@ -1,3 +1,8 @@
+2007-04-17  Sergei Golovan  <sgolovan at nes.ru>
+
+	* ifacetk/buttonbar.tcl: Restored reconfiguring button text on
+	  <Configure> event but ensure that it happens only once.
+
 2007-02-24  Sergei Golovan  <sgolovan at nes.ru>
 
 	* ifacetk/buttonbar.tcl: Truncate long tab titles. Also made tabs

Modified: branches/tkabber-tabbar/ifacetk/buttonbar.tcl
===================================================================
--- branches/tkabber-tabbar/ifacetk/buttonbar.tcl	2007-04-15 13:00:55 UTC (rev 1114)
+++ branches/tkabber-tabbar/ifacetk/buttonbar.tcl	2007-04-17 19:02:57 UTC (rev 1115)
@@ -123,7 +123,7 @@
 
     _calc_text $path $name
 
-    #bind $but <Configure> [list [namespace current]::_itemconfigure $path $name]
+    bind $but <Configure> [list [namespace current]::_itemconfigure $path $name]
 
     foreach {event script} $data(bindtabs) {
 	bind $but $event [linsert $script end $name]
@@ -323,6 +323,8 @@
     variable $path
     upvar 0  $path data
 
+    array unset data configured,*
+
     set num [llength $data(buttons)]
 
     if {$num == 0} return
@@ -397,9 +399,6 @@
 	    }
 	}
     }
-    foreach name $data(buttons) {
-	_itemconfigure $path $name
-    }
 }
 
 
@@ -490,6 +489,10 @@
     variable $path
     upvar 0  $path data
 
+    if {[info exists data(configured,$name)]} return
+
+    set data(configured,$name) 1
+
     set but [_but $path $name]
     set w [winfo width $but]
 



More information about the Tkabber-dev mailing list