[Tkabber-dev] r1700 - in trunk/tkabber: . plugins/richtext

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Mar 2 09:04:25 MSK 2009


Author: sergei
Date: 2009-03-02 09:04:25 +0300 (Mon, 02 Mar 2009)
New Revision: 1700

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/richtext/emoticons.tcl
Log:
	* plugins/richtext/emoticons.tcl: Reload images on theme change
	  unconditionally.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2009-03-02 06:02:13 UTC (rev 1699)
+++ trunk/tkabber/ChangeLog	2009-03-02 06:04:25 UTC (rev 1700)
@@ -1,3 +1,8 @@
+2009-03-02  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/richtext/emoticons.tcl: Reload images on theme change
+	  unconditionally.
+
 2009-02-28  Sergei Golovan  <sgolovan at nes.ru>
 
 	* disco.tcl: Allowed extra handlers to return empty lists.

Modified: trunk/tkabber/plugins/richtext/emoticons.tcl
===================================================================
--- trunk/tkabber/plugins/richtext/emoticons.tcl	2009-03-02 06:02:13 UTC (rev 1699)
+++ trunk/tkabber/plugins/richtext/emoticons.tcl	2009-03-02 06:04:25 UTC (rev 1700)
@@ -30,8 +30,7 @@
 	-command [namespace current]::toggle_emoticons
 
     set options(no_theme) [::msgcat::mc "None"]
-    set options(active_theme) $options(no_theme)
-	
+
     custom::defvar options(theme) "" \
 	[::msgcat::mc "Tkabber emoticons theme. To make new theme visible\
 		       for Tkabber put it to some subdirectory of %s." \
@@ -270,7 +269,7 @@
 	    break
 	}
     }
-	
+
     create_image $iname [file join $dir $graphic]
 
     set images($iname) 0 ;# Initial refcount is zero since it'll bumped by successive [add]s:
@@ -382,7 +381,7 @@
     switch -- [$iw get "insert - 1 chars"] {
 	"" - " " - "\n" {}
 
-	default         { 
+	default         {
 	    if {![cequal [$iw index "insert -1 chars"] 1.0]} {
 		set p " "
 	    }
@@ -569,10 +568,8 @@
 proc emoticons::on_theme_changed {args} {
     variable options
 
-    if {$options(active_theme) != $options(theme)} {
-	clean
-	load_dir $options(theme)
-    }
+    clean
+    load_dir $options(theme)
 }
 
 proc emoticons::find_themes {} {
@@ -666,7 +663,6 @@
 	-parser [namespace current]::process_emoticons \
 	-renderer [namespace current]::render_emoticon \
 	-parser-priority 70
-	
 }
 
 # vim:ts=8:sts=4:sw=4:noet



More information about the Tkabber-dev mailing list