[Tkabber-dev] r874 - in trunk/tkabber: . plugins/general

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Jan 16 00:02:47 MSK 2007


Author: sergei
Date: 2007-01-16 00:02:43 +0300 (Tue, 16 Jan 2007)
New Revision: 874

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/general/autoaway.tcl
Log:
	* plugins/general/autoaway.tcl: Fixed bug with restoring status
	  and status message on disconnect in autoaway state.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-01-14 19:22:48 UTC (rev 873)
+++ trunk/tkabber/ChangeLog	2007-01-15 21:02:43 UTC (rev 874)
@@ -1,3 +1,8 @@
+2007-01-15  Sergei Golovan  <sgolovan at nes.ru>
+
+	* plugins/general/autoaway.tcl: Fixed bug with restoring status
+	  and status message on disconnect in autoaway state.
+
 2007-01-14  Sergei Golovan  <sgolovan at nes.ru>
 
 	* plugins/unix/ispell.tcl: Changed option, which enables ispell to

Modified: trunk/tkabber/plugins/general/autoaway.tcl
===================================================================
--- trunk/tkabber/plugins/general/autoaway.tcl	2007-01-14 19:22:48 UTC (rev 873)
+++ trunk/tkabber/plugins/general/autoaway.tcl	2007-01-15 21:02:43 UTC (rev 874)
@@ -71,19 +71,36 @@
 }
 
 
-proc autoaway::after_idle {args} {
+proc autoaway::after_idle {connid} {
     after cancel [namespace current]::after_idle
     after_idle_aux
     if {$::aquaP} {
         set msec 1000
     } else {
-        set msec 100
+        set msec 250
     }
     after $msec [namespace current]::after_idle
 }
 
-proc autoaway::after_idle_cancel {args} {
+proc autoaway::after_idle_cancel {connid} {
+    variable options
+    variable savestatus
+    variable savetext
+    variable savepriority
+    global userstatus textstatus userpriority
+
     if {[jlib::connections] == {}} {
+        if {![cequal $savestatus ""]} {
+	    if {$options(drop_priority) && ($userpriority >= 0)} {
+		set userpriority $savepriority
+	    }
+	    set savepriority 0
+	    set textstatus $savetext
+	    set savetext ""
+            set userstatus $savestatus
+            set savestatus ""
+        }
+	
 	after cancel [namespace current]::after_idle
     }
 }
@@ -94,8 +111,7 @@
     variable savetext
     variable savepriority
     global idle_command
-    global userstatus textstatus
-    global userpriority
+    global userstatus textstatus userpriority
 
     if {($options(awaytime) <= 0) && ($options(xatime) <= 0)} {
         return



More information about the Tkabber-dev mailing list