[Tkabber-dev] r1284 - in trunk/tkabber-plugins: . floatinglog

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Oct 27 19:24:16 MSD 2007


Author: sergei
Date: 2007-10-27 19:24:15 +0400 (Sat, 27 Oct 2007)
New Revision: 1284

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/floatinglog/floatinglog.tcl
Log:
	* floatinglog/floatinglog.tcl: Added an option for the height of
	floating log window, and made it ignore IBB file transfer requests
	(thanks to Ruslan Rakhmanin).


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2007-10-26 18:21:28 UTC (rev 1283)
+++ trunk/tkabber-plugins/ChangeLog	2007-10-27 15:24:15 UTC (rev 1284)
@@ -1,3 +1,9 @@
+2007-10-27  Sergei Golovan <sgolovan at nes.ru>
+
+	* floatinglog/floatinglog.tcl: Added an option for the height of
+	floating log window, and made it ignore IBB file transfer requests
+	(thanks to Ruslan Rakhmanin).
+
 2007-10-26  Sergei Golovan <sgolovan at nes.ru>
 
 	* ctcomp/ctcomp.tcl: Fixed definition of word edges (thanks to

Modified: trunk/tkabber-plugins/floatinglog/floatinglog.tcl
===================================================================
--- trunk/tkabber-plugins/floatinglog/floatinglog.tcl	2007-10-26 18:21:28 UTC (rev 1283)
+++ trunk/tkabber-plugins/floatinglog/floatinglog.tcl	2007-10-27 15:24:15 UTC (rev 1284)
@@ -9,6 +9,13 @@
     variable id 0
     variable winname .floatinglog
     variable idlepat [string map {%s *} [::msgcat::mc "Idle for %s"]]
+    set request_from [string map {%s *} [::msgcat::mc "%s request from %s"]]
+    variable iqibbpat [string replace $request_from \
+			[string first * $request_from] \
+			[string first * $request_from] iqibb]
+    variable ibbpat [string replace $request_from \
+			[string first * $request_from] \
+			[string first * $request_from] ibb]
 
     #
     # Options section
@@ -85,6 +92,11 @@
 	-command [list [namespace current]::set_window] \
 	-type string -group {Floating Log Window}
 
+    custom::defvar options(max_height) 700 \
+	[::msgcat::mc "Maximum window height."] \
+	-command [list [namespace current]::set_window] \
+	-type integer -group {Floating Log Window}
+
     custom::defvar options(width) 300 \
 	[::msgcat::mc "Window width."] \
 	-command [list [namespace current]::set_window] \
@@ -293,10 +305,14 @@
 
 proc floatinglog::process_status {text} {
     variable idlepat
+    variable iqibbpat
+    variable ibbpat
     variable options
 
     if {!$options(show_notifications)} return
     if {[string match $idlepat $text]} return
+    if {[string match $iqibbpat $text]} return
+    if {[string match $ibbpat $text]} return
 
     add_text $text
 }
@@ -376,7 +392,7 @@
 	}
     }
     wm minsize $winname $options(width) 10
-    wm maxsize $winname $options(width) 700
+    wm maxsize $winname $options(width) $options(max_height)
     wm geometry $winname $options(position)
 } 
 



More information about the Tkabber-dev mailing list