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

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Thu Oct 11 23:28:11 MSD 2007


Author: sergei
Date: 2007-10-11 23:28:10 +0400 (Thu, 11 Oct 2007)
New Revision: 1271

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/ifacetk/iface.tcl
Log:
	* ifacetk/iface.tcl: Fixed binding of <FocusIn> and <FocusOut> to chat
	  windows/tabs (thanks to Konstantin Khomoutov).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-10-10 17:52:44 UTC (rev 1270)
+++ trunk/tkabber/ChangeLog	2007-10-11 19:28:10 UTC (rev 1271)
@@ -1,3 +1,8 @@
+2007-10-11  Sergei Golovan  <sgolovan at nes.ru>
+
+	* ifacetk/iface.tcl: Fixed binding of <FocusIn> and <FocusOut> to chat
+	  windows/tabs (thanks to Konstantin Khomoutov).
+
 2007-10-10  Sergei Golovan  <sgolovan at nes.ru>
 
 	* msgs/de.msg: Updated German translation (thanks to Roger Sondermann).

Modified: trunk/tkabber/ifacetk/iface.tcl
===================================================================
--- trunk/tkabber/ifacetk/iface.tcl	2007-10-10 17:52:44 UTC (rev 1270)
+++ trunk/tkabber/ifacetk/iface.tcl	2007-10-11 19:28:10 UTC (rev 1271)
@@ -958,11 +958,6 @@
 
     wm geometry . $geometry
 
-    if {$usetabbar} {
-	bind . <FocusIn> [list [namespace current]::get_focus .]
-	bind . <FocusOut> [list [namespace current]::loose_focus .]
-    }
-
     define_alert_colors
     update idletasks
 }
@@ -1278,11 +1273,12 @@
 	if {$geometry != ""} {
 	    wm geometry $path $geometry
 	}
-	bind $path <FocusIn>  [list [namespace current]::get_focus $path]
-	bind $path <FocusOut> [list [namespace current]::loose_focus $path]
     }
 }
 
+bind Chat <FocusIn>  [list [namespace current]::ifacetk::get_focus %W]
+bind Chat <FocusOut> [list [namespace current]::ifacetk::loose_focus %W]
+
 proc ifacetk::tab_raise {path command} {
     tab_set_updated $path
     if {$command != ""} {
@@ -1296,8 +1292,6 @@
     variable options
 
     if {![winfo exists $path]} return
-    if {[winfo toplevel $path] != $path} return
-    if {![cequal $path .] && ![info exists chat::chat_id($path)]} return
 
     if {$focused != $path} {
 	if {$after_focused_id != ""} {
@@ -1338,7 +1332,6 @@
     variable after_focused_id
 
     if {![winfo exists $path]} return
-    if {[winfo toplevel $path] != $path} return
 
     if {($focused == $path) && ($after_focused_id != "")} {
 	after cancel $after_focused_id



More information about the Tkabber-dev mailing list