[Tkabber-dev] r1723 - in trunk/tkabber-plugins: . georoster

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Mar 13 20:20:47 MSK 2009


Author: sergei
Date: 2009-03-13 20:20:47 +0300 (Fri, 13 Mar 2009)
New Revision: 1723

Modified:
   trunk/tkabber-plugins/ChangeLog
   trunk/tkabber-plugins/georoster/georoster.tcl
Log:
	* georoster/georoster.tcl: Fixed reloading the plugin.


Modified: trunk/tkabber-plugins/ChangeLog
===================================================================
--- trunk/tkabber-plugins/ChangeLog	2009-03-13 17:03:35 UTC (rev 1722)
+++ trunk/tkabber-plugins/ChangeLog	2009-03-13 17:20:47 UTC (rev 1723)
@@ -11,6 +11,8 @@
 	  floatinglog/floatinglog.tcl, georoster/georoster.tcl: Made plugins
 	  unloadable.
 
+	* georoster/georoster.tcl: Fixed reloading the plugin.
+
 2009-03-12  Sergei Golovan <sgolovan at nes.ru>
 
 	* whiteboard/svgrender.tcl, whiteboard/whiteboard.tcl: Switched to

Modified: trunk/tkabber-plugins/georoster/georoster.tcl
===================================================================
--- trunk/tkabber-plugins/georoster/georoster.tcl	2009-03-13 17:03:35 UTC (rev 1722)
+++ trunk/tkabber-plugins/georoster/georoster.tcl	2009-03-13 17:20:47 UTC (rev 1723)
@@ -102,8 +102,6 @@
 	-values $opt2label_list -command [namespace current]::set_showcities
 
     variable showcities $opt2label($options(showcities))
-    trace variable [namespace current]::showcities w \
-		   [namespace current]::set_option_showcities
 }
 
 package require http 2
@@ -116,6 +114,8 @@
     hook::add connected_hook [namespace current]::retrieve
     hook::add save_session_hook [namespace current]::save_session
 
+    trace variable [namespace current]::showcities w \
+		   [namespace current]::set_option_showcities
     setup
 
     foreach xlib [connections] {
@@ -131,6 +131,8 @@
     hook::remove connected_hook [namespace current]::retrieve
     hook::remove save_session_hook [namespace current]::save_session
 
+    trace vdelete [namespace current]::showcities w \
+		  [namespace current]::set_option_showcities
     catch {
 	set m [.mainframe getmenu roster]
 	set idx [$m index [::msgcat::mc "Georoster"]]
@@ -145,9 +147,11 @@
     variable geo3166
     variable move
     variable cities
+    variable options
 
     image delete $mapimage
 
+    catch {unset options(mapfile)}
     catch {unset mapimage}
     catch {unset georoster}
     catch {unset status}
@@ -164,6 +168,8 @@
     variable opt2label
 
     set showcities $opt2label($options(showcities))
+
+    redraw .georoster.c
 }
 
 ###############################################################################
@@ -247,9 +253,6 @@
     pack $tb.cities -side right
 
 
-    trace variable [namespace current]::options(showcities) w \
-	"[list [namespace current]::redraw $c] ; #"
-
     $c create image 0 0 -image $mapimage -anchor nw -tags map
     $w.c configure -scrollregion [$w.c bbox all]
 



More information about the Tkabber-dev mailing list