[Tkabber-dev] r160 - trunk/plugins/snoopstatus

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Mon Nov 17 16:20:13 MSK 2008


Author: kostix
Date: 2008-11-17 16:20:12 +0300 (Mon, 17 Nov 2008)
New Revision: 160

Modified:
   trunk/plugins/snoopstatus/snoopstatus.tcl
Log:
snoopstatus/snoopstatus.tcl: Added session support.


Modified: trunk/plugins/snoopstatus/snoopstatus.tcl
===================================================================
--- trunk/plugins/snoopstatus/snoopstatus.tcl	2008-10-21 15:59:22 UTC (rev 159)
+++ trunk/plugins/snoopstatus/snoopstatus.tcl	2008-11-17 13:20:12 UTC (rev 160)
@@ -13,6 +13,9 @@
 	[namespace current]::install_menu_item
     hook::add set_status_hook \
 	[namespace current]::process_status
+
+    hook::add save_session_hook \
+	[namespace current]::save_session
 }
 
 proc snoopstatus::install_menu_item {} {
@@ -81,6 +84,14 @@
 	[double% [list [namespace current]::open_search_panel $text $sf]]
 }
 
-####
+proc snoopstatus::save_session sessionVar {
+    upvar 2 $sessionVar session
 
+    lappend session [list 0 {} {} {} [namespace code restore_session]]
+}
+
+proc snoopstatus::restore_session args {
+    snoop_status_messages
+}
+
 # vim:ts=8:sw=4:sts=4:noet



More information about the Tkabber-dev mailing list