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

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Jan 5 17:56:20 MSK 2008


Author: sergei
Date: 2008-01-05 17:56:18 +0300 (Sat, 05 Jan 2008)
New Revision: 1345

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/ifacetk/iroster.tcl
Log:
	* ifacetk/iroster.tcl: Made roster filter case insensitive, added
	  Escape binding which clears filter string.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2008-01-05 14:02:34 UTC (rev 1344)
+++ trunk/tkabber/ChangeLog	2008-01-05 14:56:18 UTC (rev 1345)
@@ -1,7 +1,10 @@
 2008-01-05  Sergei Golovan  <sgolovan at nes.ru>
 
-	* iface.tcl, iroster.tcl: Added simple roster filter.
+	* ifacetk/iface.tcl, ifacetk/iroster.tcl: Added simple roster filter.
 
+	* ifacetk/iroster.tcl: Made roster filter case insensitive, added
+	  Escape binding which clears filter string.
+
 2008-01-03  Sergei Golovan  <sgolovan at nes.ru>
 
 	* chats.tcl: Fixed raising tab in case when a user clicks on "Open new

Modified: trunk/tkabber/ifacetk/iroster.tcl
===================================================================
--- trunk/tkabber/ifacetk/iroster.tcl	2008-01-05 14:02:34 UTC (rev 1344)
+++ trunk/tkabber/ifacetk/iroster.tcl	2008-01-05 14:56:18 UTC (rev 1345)
@@ -234,6 +234,8 @@
 proc roster::create_filter_entry {} {
     entry .roster_filter -textvariable [namespace current]::options(filter) \
 			 -width 1
+    bind .roster_filter <Escape> \
+	 [list set [namespace current]::options(filter) ""]
     pack_filter_entry
 }
 
@@ -368,9 +370,11 @@
 	array unset groupsundergroup
 	foreach jid [::roster::get_jids $connid] {
 	    if {$options(use_filter) && $options(filter) != ""} {
-		if {[string first $options(filter) [::roster::get_label $connid $jid]] < 0} {
+		if {[string first [string tolower $options(filter)] \
+				  [string tolower [::roster::get_label $connid $jid]]] < 0} {
 		    if {!$options(match_jids) || \
-			    [string first $options(filter) $jid] < 0} {
+			    [string first [string tolower $options(filter)] \
+					  [string tolower $jid]] < 0} {
 			continue
 		    }
 		}



More information about the Tkabber-dev mailing list