[Tkabber-dev] r1276 - in trunk/tkabber: . plugins/windows

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Oct 18 12:34:24 MSD 2007


Author: sergei
Date: 2007-10-18 12:34:22 +0400 (Thu, 18 Oct 2007)
New Revision: 1276

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/windows/taskbar.tcl
Log:
	* plugins/windows/taskbar.tcl: Added window icons to all Tkabber
	  windows (thanks to Konstantin Khomoutov).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-10-15 11:39:56 UTC (rev 1275)
+++ trunk/tkabber/ChangeLog	2007-10-18 08:34:22 UTC (rev 1276)
@@ -1,3 +1,8 @@
+2007-10-18  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/windows/taskbar.tcl: Added window icons to all Tkabber
+	  windows (thanks to Konstantin Khomoutov).
+
 2007-10-15  Sergei Golovan  <sgolovan at nes.ru>
 
 	* ifacetk/buttonbar.tcl: Replaced ... by \u2026 at the end of trimmed

Modified: trunk/tkabber/plugins/windows/taskbar.tcl
===================================================================
--- trunk/tkabber/plugins/windows/taskbar.tcl	2007-10-15 11:39:56 UTC (rev 1275)
+++ trunk/tkabber/plugins/windows/taskbar.tcl	2007-10-18 08:34:22 UTC (rev 1276)
@@ -143,24 +143,22 @@
 
     trace variable ::curuserstatus w [namespace code update]
 
-    foreach tag [list Toplevel Chat JDisco] {
-	bind $tag <Map> \
-	     [list [namespace code win_icon_setup] %W $tag]
-    }
+    bind all <Map> +[namespace code {
+	if {[string equal [winfo toplevel %W] %W]} { win_icon_setup %W }
+    }]
 }
 
 hook::add finload_hook [namespace current]::taskbar::win_icons
 
 ##########################################################################
 
-proc taskbar::win_icon_setup {w tag} {
+proc taskbar::win_icon_setup {w} {
     variable icon
     variable s2p
 
     if {[cequal $icon ""]} return
-    if {[winfo toplevel $w] != $w} return
 
-    switch -- $tag {
+    switch -- [winfo class $w] {
 	Chat {
 	    winico setwindow $w $icon small $s2p(group)
 	    winico setwindow $w $icon big $s2p(group32)



More information about the Tkabber-dev mailing list