15-07-2004 :
+ - wxbMainFrame : When an unexpected question is in this format 
+    (***? (yes/mod/no):), a list is shown to choose one of these 
+    possibilities.
+ - wxbRestorePanel : Fixed crash when there is no backup available
+     (fresh install) 
  - wxbHistoryTextCtrl : Created a new text control that keep an history
      of typed commands.
 
 
 general : Show nice messages boxes when errors occurs.
 
-wxbRestorePanel : Crashing when there is no backup to show (fresh install)
-
-GTK2 : The console control is not scrolled correctly
+GTK2 : The console control is not scrolled correctly (wxGTK bug)
 
 Win32 : Crash when quitting while trying to connect
 
   (see commented out code in wxbrestorepanel (marked with EVTQUEUE))
 
 wxbMainFrame : When exiting using menu, a messagebox is shown to ask the
-  user if he want to quit because the connection is lost.
+  user if he want to quit because the connection is lost. (doesn't
+  happen on Linux)
 
 wxbUtils : add clients, jobs, filesets, pools... list, merge patch file (wxbnewutils.patch)
 
 
 wxbMainFrame : Implement command completion (tab)
 
-wxbMainFrame : When an unexpected question is in this format (***? (yes/mod/no):),
-   show a list to choose one of these possibilities.
-
 wxbConfigFileEditor : create a more precise editor, with something like
    a tree structure
 
   to parent' parent, and correct bad actual implementation.
    (remove handler parameter in wxTreeCtrl/wxListCtrl constructor)
 
-general : find out why I had to modify string.cpp and string.h
+Win32 : find out why I had to modify string.cpp and string.h
   + In include/wx/string.h, replace line 195 by
       #if defined(__VISUALC__) // && defined(_MT) && !defined(_DLL)
   + In src/common/string.cpp, replace line 167 by
 
                Send("\n");
             }
             else {
-               Send(wxString() << numbers[res] << "\n");
+               if (promptparser->isNumericalChoice()) {
+                  Send(wxString() << numbers[res] << "\n");
+               }
+               else {
+                  Send(wxString() << choices[res] << "\n");
+               }
             }
          }
          else {
 
  *
  *   wxbPanel for restoring files
  *
- *    Nicolas Boichat, April-May 2004
+ *    Nicolas Boichat, April-July 2004
  *
  */
 /*
       configPanel->ClearRowChoices("Before");
       wxbUtils::WaitForPrompt("query\n");
       wxbUtils::WaitForPrompt("6\n");
-      wxbTableParser* tableparser = wxbUtils::CreateAndWaitForParser(configPanel->GetRowString("Client") + "\n");
+      wxbTableParser* tableparser = new wxbTableParser();
+      wxbDataTokenizer* dt = wxbUtils::WaitForEnd(configPanel->GetRowString("Client") + "\n", true);
+
+      if (!tableparser->hasFinished()) {
+         for (int i = 0; i < dt->Count(); i++) {
+            if ((*dt)[i].Index("No results to list.") == 0) {
+               configPanel->AddRowChoice("Before", "No backup found for this client.");
+               configPanel->SetRowSelection("Before", 0);
+               configPanel->EnableApply(true); // Enabling the not existing apply button disables the ok button.
+               delete tableparser;
+               delete dt;
+               return;
+            }
+         }
+      }
+      
+      while (!tableparser->hasFinished()) {
+         wxTheApp->Yield(true);
+         ::wxUsleep(100);
+      }
+      
+      delete dt;
 
       for (int i = tableparser->GetCount()-1; i > -1; i--) {
          wxString str = (*tableparser)[i][3];
          jobChoice->Append("Invalid");
          }*/
       }
-      
+           
       delete tableparser;
 
       configPanel->SetRowSelection("Before", 0);
+      configPanel->EnableApply(false); // Disabling the not existing apply button enables the ok button.
    }
 }
 
 
  *
  *   wxbDataParser, class that receives and analyses data
  *
- *    Nicolas Boichat, April 2004
+ *    Nicolas Boichat, April-July 2004
  *
  */
 /*
    prompt = false;
    introStr = "";
    choices = NULL;
+   numerical = false;
    questionStr = "";
 }
 
          if (choices) {
             delete choices;
             choices = NULL;
+            numerical = false;
          }
          questionStr = "";
          introStr = "";
          if (!choices) {
             choices = new wxArrayString();
             choices->Add(""); /* index 0 is never used by multiple choice questions */
+            numerical = true;
          }
          
          if ((long)choices->GetCount() != num) { /* new choice has begun */
             delete choices;
-            choices = new wxArrayString(num);
+            choices = new wxArrayString();
             choices->Add("", num); /* fill until this number */
+            numerical = true;
          }
          
          choices->Add(str.Mid(i+2).RemoveLast());
    else {
       finished = ((status == CS_PROMPT) || (status == CS_END) || (status == CS_DISCONNECTED));
       if (prompt = ((status == CS_PROMPT) && (questionStr != "$ "))) { // && (str.Find(": ") == str.Length())
+         if (introStr.Last() == '\n') {
+            introStr.RemoveLast();
+         }
          if ((introStr != "") && (questionStr == "")) {
             questionStr = introStr;
             introStr = "";
          }
-         if (introStr.Last() == '\n') {
-            introStr.RemoveLast();
+         
+         if ((!choices) && (questionStr.Find("(yes/mod/no)") > -1)) {
+            choices = new wxArrayString();
+            choices->Add("yes");
+            choices->Add("mod");
+            choices->Add("no");
+            numerical = false;
          }
+         
          return true;
       }
       else { /* ended or (dis)connected */
          if (choices) {
             delete choices;
             choices = NULL;
+            numerical = false;
          }
          questionStr = "";
          introStr = "";
    return questionStr;
 }
 
-/* Return a wxArrayString containing the indexed choices we have
+/* Returns a wxArrayString containing the indexed choices we have
  * to answer the question, or NULL if this question is not a multiple
  * choice one. */
 wxArrayString* wxbPromptParser::getChoices() {
    return choices;
 }
+
+/* Returns true if the expected answer to the choice list is a number,
+ * false if it is a string (for example yes/mod/no). */
+bool wxbPromptParser::isNumericalChoice() {
+   return numerical;
+}
+
 
  *   wxbDataParser, class that receives and analyses data
  *   wxbPanel, main frame's notebook panels
  *
- *    Nicolas Boichat, April 2004
+ *    Nicolas Boichat, April-July 2004
  *
  */
 /*
       /* Returns question string */
       wxString getQuestionString();
       
-      /* Return a wxArrayString containing the indexed choices we have
+      /* Returns a wxArrayString containing the indexed choices we have
        * to answer the question, or NULL if this question is not a multiple
        * choice one. */
       wxArrayString* getChoices();
       
-      
+      /* Returns true if the expected answer to the choice list is a number,
+       * false if it is a string (for example yes/mod/no). */
+      bool isNumericalChoice();
       
    private:
       bool finished;
       bool prompt;
+      bool numerical;      
       wxString introStr;
       wxArrayString* choices;
       wxString questionStr;