[Webfunds-commits] java/webfunds/client/util Backup.java

Ian Grigg iang@cypherpunks.ai
Sat, 14 Apr 2001 13:50:29 -0400 (AST)


iang        01/04/14 13:50:29

  Modified:    webfunds/client/util Backup.java
  Log:
  some better words in messages

Revision  Changes    Path
1.3       +16 -6     java/webfunds/client/util/Backup.java

Index: Backup.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/util/Backup.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Backup.java	2001/03/20 23:33:08	1.2
+++ Backup.java	2001/04/14 17:50:29	1.3
@@ -1,5 +1,5 @@
 /*
- * $Id: Backup.java,v 1.2 2001/03/20 23:33:08 iang Exp $
+ * $Id: Backup.java,v 1.3 2001/04/14 17:50:29 iang Exp $
  *
  * Copyright (C) 2000 Systemics Inc. on behalf of 
  * the WebFunds Development Team. All rights reserved.
@@ -48,7 +48,7 @@
         File targetDir = null;
         while (!ok)
         {
-            int res = fc.showDialog(new JFrame(), "Select Dir for Backup");
+            int res = fc.showDialog(new JFrame(), "Save Backup Now");
             if (res != JFileChooser.APPROVE_OPTION)
                 return ;
 
@@ -128,7 +128,8 @@
     {
         JFileChooser fc = new JFileChooser();
         fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
-        fc.setDialogTitle("Select Directory where you wish to Recover from");
+        fc.setDialogTitle("Select Directory " +
+                          BACKUP_DIR + "... to Recover from");
 
         String userName = targetDir.getName();
         //
@@ -138,12 +139,21 @@
         File backupDir = null;
         File parent;
         File child = null;
+        
         while (child == null)
         {
-            int res = fc.showDialog(new JFrame(), "Select Backup " +
-                                                  BACKUP_DIR + "...");
-            if (res != JFileChooser.APPROVE_OPTION)
+            int res = fc.showDialog(new JFrame(), "Continue Recovery");
+            if (res == JFileChooser.CANCEL_OPTION)
+            {
+                // wierd.  if no file is entered, it returns CANCEL !
+                logmsg("Recovery cancelled.");
                 return false;
+            }
+            if (res != JFileChooser.APPROVE_OPTION)
+            {
+                logmsg("no file selected?");
+                continue ;
+            }
 
             File choice = fc.getSelectedFile();