[Tkabber-dev] r1123 - trunk/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Apr 22 10:46:45 MSD 2007


Author: sergei
Date: 2007-04-22 10:46:44 +0400 (Sun, 22 Apr 2007)
New Revision: 1123

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/configdir.tcl
   trunk/tkabber/splash.tcl
   trunk/tkabber/tkabber.tcl
Log:
	* configdir.tcl, splash.tcl, tkabber.tcl: Fixed bug when Tkabber
	  couldn't show message dialogs during config directory transfer
	  because the main window was withdrawn (thanks to Konstantin
	  Khomoutov).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-04-21 20:26:12 UTC (rev 1122)
+++ trunk/tkabber/ChangeLog	2007-04-22 06:46:44 UTC (rev 1123)
@@ -1,3 +1,10 @@
+2007-04-22  Sergei Golovan  <sgolovan at nes.ru>
+
+	* configdir.tcl, splash.tcl, tkabber.tcl: Fixed bug when Tkabber
+	  couldn't show message dialogs during config directory transfer
+	  because the main window was withdrawn (thanks to Konstantin
+	  Khomoutov).
+
 2007-04-21  Sergei Golovan  <sgolovan at nes.ru>
 
 	* ifacetk/iface.tcl: Quickfixed bug with "bad window path name

Modified: trunk/tkabber/configdir.tcl
===================================================================
--- trunk/tkabber/configdir.tcl	2007-04-21 20:26:12 UTC (rev 1122)
+++ trunk/tkabber/configdir.tcl	2007-04-22 06:46:44 UTC (rev 1123)
@@ -30,29 +30,17 @@
 # * $to MUST NOT exist.
 # Returns true if copying succeeded, false otherwise.
 proc config::transfer_dir {from to} {
-    set w .configdirtransfer
-
-    Dialog $w -title [::msgcat::mc "Please stand by..."] \
-	-separator 1 -anchor e -default 0 -cancel 0 -modal none
-
-    $w add -text [::msgcat::mc "Close"] \
-	-state disabled \
-	-command [list destroy $w]
-
-    set f [$w getframe]
-
-    pack [message $f.msg -aspect 50000 \
+    wm withdraw .
+    wm title . [::msgcat::mc "Attention"]
+    pack [message .msg -aspect 50000 \
 	-text [::msgcat::mc "Please, be patient while Tkabber\
 	    configuration directory is being transferred\
-	    to the new location"]]
+	    to the new location"]] -fill both -expand yes
+    #::tk::PlaceWindow .
+    wm deiconify .
 
-    $w draw
-    grab $w
-    update ;# for win9x (only?)
-
     set failed [catch {file copy $from $to} err]
 
-    catch {destroy $w}
     if {$failed} {
 	tk_messageBox -icon error \
 	    -title [::msgcat::mc "Attention"] \
@@ -69,6 +57,8 @@
 		    $to $from]
     }
 
+    destroy .msg
+
     expr {!$failed}
 }
 

Modified: trunk/tkabber/splash.tcl
===================================================================
--- trunk/tkabber/splash.tcl	2007-04-21 20:26:12 UTC (rev 1122)
+++ trunk/tkabber/splash.tcl	2007-04-22 06:46:44 UTC (rev 1123)
@@ -91,6 +91,8 @@
         wmdock              [::msgcat::mc "wmaker"]                \
     ]
 
+    wm withdraw .
+
     set w [toplevel .splash -relief $::tk_relief -borderwidth $::tk_borderwidth]
 
     wm withdraw $w

Modified: trunk/tkabber/tkabber.tcl
===================================================================
--- trunk/tkabber/tkabber.tcl	2007-04-21 20:26:12 UTC (rev 1122)
+++ trunk/tkabber/tkabber.tcl	2007-04-22 06:46:44 UTC (rev 1123)
@@ -7,8 +7,6 @@
 set interface tk
 namespace eval ifacetk {}
 
-wm withdraw .
-
 set aquaP 0
 catch {
     switch -- [tk windowingsystem] {



More information about the Tkabber-dev mailing list