[Tkabber-dev] r966 - trunk/tkabber/ifacetk

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Fri Feb 23 23:08:42 MSK 2007


Author: sergei
Date: 2007-02-23 23:08:40 +0300 (Fri, 23 Feb 2007)
New Revision: 966

Modified:
   trunk/tkabber/ifacetk/systray.tcl
Log:
	* One more fix


Modified: trunk/tkabber/ifacetk/systray.tcl
===================================================================
--- trunk/tkabber/ifacetk/systray.tcl	2007-02-23 19:54:32 UTC (rev 965)
+++ trunk/tkabber/ifacetk/systray.tcl	2007-02-23 20:08:40 UTC (rev 966)
@@ -185,14 +185,22 @@
 
 # De-withdraws the main Tkabber window:
 proc systray::reshow {} {
+    variable saved_state
     variable saved_geometry
 
     if {![cequal [wm state .] withdrawn]} return
 
-    if {[info exists saved_geometry]} {
-	wm geometry . $saved_geometry
+    if {[info exists saved_state]} {
+	if {$saved_state != "zoomed" && [info exists saved_geometry]} {
+	    wm geometry . $saved_geometry
+	}
+	wm state . $saved_state
+    } else {
+	if {[info exists saved_geometry]} {
+	    wm geometry . $saved_geometry
+	}
+	wm state . normal
     }
-    wm state . normal
     wm deiconify .
 }
 
@@ -209,9 +217,6 @@
 }
 
 proc systray::toggle_state {} {
-    variable saved_state
-    variable saved_geometry
-
     switch -- [wm state .] {
 	zoomed -
         normal {
@@ -219,19 +224,10 @@
         }
 
 	iconic -
-	withdrawn {
+	withdrawn -
+	default {
 	    restore
 	}
-
-	default {
-	    if {[info exists saved_state]} {
-		if {$saved_state != "zoomed" && [info exists saved_geometry]} {
-		    wm geometry . $saved_geometry
-		}
-		wm state . $saved_state
-	    }
-            wm deiconify .
-        }
     }
 }
 



More information about the Tkabber-dev mailing list