[Tkabber-dev] r1688 - in trunk/tkabber-plugins: . attline

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Feb 24 00:19:23 MSK 2009


Author: sergei
Date: 2009-02-24 00:19:23 +0300 (Tue, 24 Feb 2009)
New Revision: 1688

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/attline/attline.tcl
Log:
	* attline/attline.tcl: Also, changed
	  attention line color definition to match dark themes as well, and
	  adapted the plugin to Tcl/Tk 8.3.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2009-02-23 20:53:20 UTC (rev 1687)
+++ trunk/tkabber-plugins/ChangeLog	2009-02-23 21:19:23 UTC (rev 1688)
@@ -8,7 +8,9 @@
 	  Sondermann).
 
 	* attline/attline.tcl: Removed reconfiguring attention line script from
-	  <Configure> event in chatlog windows on plugin unload.
+	  <Configure> event in chatlog windows on plugin unload. Also, changed
+	  attention line color definition to match dark themes as well, and
+	  adapted the plugin to Tcl/Tk 8.3.
 
 2009-02-20  Sergei Golovan <sgolovan at nes.ru>
 

Modified: trunk/tkabber-plugins/attline/attline.tcl
===================================================================
--- trunk/tkabber-plugins/attline/attline.tcl	2009-02-23 20:53:20 UTC (rev 1687)
+++ trunk/tkabber-plugins/attline/attline.tcl	2009-02-23 21:19:23 UTC (rev 1688)
@@ -19,11 +19,17 @@
 	return
     }
 
-    option add *Chat.attentionLineHeight        1     widgetDefault
-    option add *Chat.attentionLineColor         black widgetDefault
-    option add *Chat.attentionLinePadX          5     widgetDefault
-    option add *Chat.attentionLinePadY          0     widgetDefault
+    frame .fakeframe -class Chat
+    text .fakeframe.faketext
 
+    option add *Chat.attentionLineHeight 1 widgetDefault
+    option add *Chat.attentionLineColor	 [get_conf .fakeframe.faketext -foreground] \
+					 widgetDefault
+    option add *Chat.attentionLinePadX   5 widgetDefault
+    option add *Chat.attentionLinePadY   0 widgetDefault
+
+    destroy .fakeframe
+
     variable state
     variable options
 
@@ -31,7 +37,7 @@
 	return [uplevel 1 namespace current]::$what
     }
     proc mycmd args {
-	lset args 0 [uplevel 1 namespace current]::[lindex $args 0]
+	lreplace $args 0 0 [uplevel 1 namespace current]::[lindex $args 0]
     }
 
     custom::defgroup Plugins [::msgcat::mc "Plugins options."] -group Tkabber
@@ -94,7 +100,9 @@
 	    bind $cw <Configure> [join [lreplace $script $idx $idx] \n]
 	}
 
-	delete_attention_line $cw
+	if {[drawn $cw]} {
+	    delete_attention_line $cw
+	}
 	cleanup $chatid
     }
 



More information about the Tkabber-dev mailing list