]> git.sur5r.net Git - bacula/bacula/commitdiff
- Locked configure items until first configuration is received
authorNicolas Boichat <nicolas@boichat.ch>
Mon, 19 Apr 2004 22:18:14 +0000 (22:18 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Mon, 19 Apr 2004 22:18:14 +0000 (22:18 +0000)
- Removed estimate, which slows the restore process

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1254 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/wx-console/CHANGELOG
bacula/src/wx-console/TODO
bacula/src/wx-console/wxbrestorepanel.cpp
bacula/src/wx-console/wxbrestorepanel.h

index ba42871465f9e03631d5571ce2b7a7b2265b4a1a..1a27b360959e741ab56bf11be9f5860f24038c33 100644 (file)
@@ -1,5 +1,12 @@
+19-04-2004 :
+ - wxbRestorePanel : Locked configure items until first 
+   configuration is received
+ - wxbRestorePanel : Removed estimate, which slows the restore
+   process
+
 18-04-2004 :
- - wxbRestorePanel : wxTreeCtrl::GetParent changed in GetItemParent (thanks to Luca Berra)
+ - wxbRestorePanel : wxTreeCtrl::GetParent changed in 
+   GetItemParent (thanks to Luca Berra)
  - wxbRestorePanel : The user can now change a part of restore
     configuration
 
@@ -7,7 +14,7 @@
  - wxbRestorePanel modified to use wxbDataParsers
  - created wxbDataTokenizer, which fetches commands results
  - modified the way data is passed to panel (no Prints anymore,
-    but wxbDataParsers)
+   but wxbDataParsers)
  - win32 : Makefile.in corrected to use ressource file
  - win32 : wx-console is now compatible with MinGW.
  - wxbPanel/wxbMainFrame : Added a locking function (for example, 
index 002a301193420dbd1876d8e5d3d963bed4054e08..de8770be71e9aae3e2788857019aa1f7161aca5d 100644 (file)
@@ -11,9 +11,7 @@ wxbRestorePanel : Check more carefully which job we just have run.
 
 wxbRestorePanel : Check if commands run successfully (cd, mark, mods...).
 
-wxbRestorePanel : Lock configure items until first configuration is received
-
-wxbRestorePanel : Remove estimate, which slows the restore process
+wxbRestorePanel : Allow configure to change client and fileset
 
 GTK : Improve look
 
@@ -22,6 +20,9 @@ general : Don't concatenate lines in csprint, but in wxbDataTokenizer
          
 general : use dot commands
 
+general : Create a more complicated director config file, to check what
+       choices I should give to the user (pools, filesets, ...(?)).
+
 wxbTableParser : Replace wxHashMap by wxArray
 
 console_thread : Allow the user to choose his config file.
@@ -29,6 +30,8 @@ console_thread : Allow the user to choose his config file.
 wxblistctrl/wxbtreectrl : Find why events are not forwarded correctly 
   to parent' parent, and correct bad actual implementation.
    (remove wxbTreeListPanel)
+   
+general : make a good documentation with snapshots
 
 BUGS
 ----
index fcefcacdd6dc0cb07b68c20a636410694e582d8d..f041974e3d5a8c502c29538ce5ad6462dc297b79 100644 (file)
@@ -429,25 +429,30 @@ void wxbRestorePanel::CmdStart() {
    }
    else if (status == choosing) {
       SetStatus(configuring);
-      wxbMainFrame::GetInstance()->SetStatusText("Restoring, please wait...");
-
+      
+      wxbMainFrame::GetInstance()->SetStatusText("Please configure your restore...");
+      
+      EnableConfig(false);
+      
       totfilemessages = 0;
       wxbDataTokenizer* dt;
       
-      dt = WaitForEnd("estimate\n", true);
+      /*dt = WaitForEnd("estimate\n", true);
       
       int j, k;
           
-      for (unsigned int i = 0; i < dt->GetCount(); i++) {
+      for (unsigned int i = 0; i < dt->GetCount(); i++) {*/
          /* 15847 total files; 1 marked to be restored; 1,034 bytes. */
-         if ((j = (*dt)[i].Find(" marked to be restored;")) > -1) {
+/*         if ((j = (*dt)[i].Find(" marked to be restored;")) > -1) {
             k = (*dt)[i].Find("; ");
             (*dt)[i].Mid(k+2, j).ToLong(&totfilemessages);
             break;
          }
       }
       
-      delete dt;
+      delete dt;*/
+      
+      int j;
       
       dt = WaitForEnd("done\n", true);
 
@@ -466,6 +471,8 @@ void wxbRestorePanel::CmdStart() {
       UpdateConfig(dt);
       
       delete dt;
+      
+      EnableConfig(true);
 
       if (totfilemessages == 0) {
          wxbMainFrame::GetInstance()->Print("Restore failed : no file selected.\n", CS_DEBUG);
@@ -475,6 +482,13 @@ void wxbRestorePanel::CmdStart() {
       }
    }
    else if (status == configuring) {
+      EnableConfig(false);
+      cfgOk->Enable(false);
+      cfgApply->Enable(false);
+      cfgCancel->Enable(false);
+    
+      wxbMainFrame::GetInstance()->SetStatusText("Restoring, please wait...");
+    
       wxbDataTokenizer* dt;
     
       SetStatus(restoring);
@@ -576,6 +590,8 @@ void wxbRestorePanel::CmdStart() {
 void wxbRestorePanel::CmdConfigApply() {
    if (cfgUpdated == 0) return;
    
+   EnableConfig(false);
+   
    wxbDataTokenizer* dt = NULL;
    while (cfgUpdated > 0) {
       wxString def; //String to send if can't use our data
@@ -625,7 +641,9 @@ void wxbRestorePanel::CmdConfigApply() {
       }
    }
    UpdateConfig(dt); /* TODO: Check result */
-      
+   
+   EnableConfig(true);
+   
    delete dt;
 }
 
@@ -1240,6 +1258,17 @@ void wxbRestorePanel::SetStatus(status_enum newstatus) {
    status = newstatus;
 }
 
+/*----------------------------------------------------------------------------
+   UI related
+  ----------------------------------------------------------------------------*/
+
+void wxbRestorePanel::EnableConfig(bool enable) {
+   cfgWhere->Enable(enable);
+   cfgReplace->Enable(enable);
+   cfgWhen->Enable(enable);
+   cfgPriority->Enable(enable);
+}
+
 /*----------------------------------------------------------------------------
    Event handling
   ----------------------------------------------------------------------------*/
index 64f97cd960098071a2571ac911a0635c80136109..7ebe34cd3c4e3ac9e05f12552b3a76b6790162d6 100644 (file)
@@ -108,7 +108,7 @@ class wxbRestorePanel : public wxbPanel
       
       /* Update config */
       bool UpdateConfig(wxbDataTokenizer* dt);
-
+      
 /* Status related */
       enum status_enum
       {
@@ -131,6 +131,9 @@ class wxbRestorePanel : public wxbPanel
       bool working; // A command is running, discard GUI events
       wxTreeItemId currentTreeItem; // Currently selected tree item
 
+      /* Enable or disable config controls status */
+      void EnableConfig(bool enable);
+
 /* Event handling */
       void OnStart(wxEvent& WXUNUSED(event));
       void OnTreeChanging(wxTreeEvent& event);