wxbMainFrame : Add some text in front of the command window such as 
    "Command: " so that the user knows he can type into the 
-   command window (or command line)
+   command line
    
-wxbRestorePanel : Select the first client when clicked on start button.
-
 wxbRestorePanel : Reconsider start button's labels.
 
 general : Show nice messages when errors occurs.
 
-wxbMainFrame : use more often status text
+wxbMainFrame : set focus to type control when clicking on console
 
 wxbRestorePanel : Add a Cancel Restore button
    (may need to implement BNET_BREAK to break current command)
 
-wxbRestorePanel : However, if one double clicks on a directory X in the left 
-     "tree" window when the directory is not yet open, instead of 
-     selecting the directory and everything below, it opens the 
-     directory and nothing is selected.
-     
-wxbRestorePanel : abort restore if there's no client.
-
 general : Allow the user to quit however the state is (kill thread if necessary)
 
 VC++ : crashing when there's no configuration file, or server is unreachable
+       (on every error ?)
 
 [postponed to July:]
 
+wxbMainFrame : use more often status text
+
+wxbRestorePanel : Ask Kern for a dot command which gives restore
+  dates for a client (with an interval, last 20 for example, or last
+  40 excluding last 20).
+
 wxbRestorePanel : Add buttons to mark/unmark directories/files.
 
 wxbRestorePanel : Add a button to force to refresh the whole tree
 
 console_thread : Allow the user to choose his config file.
 
+console_thread : Allow the user to choose his director when there's multiple
+    directors.
+
 wxbDataParser : Add a boolean in the constructor to avoid storing data is 
     will not be used.
 
 
 #endif // wxUSE_MENUS
 
 #if wxUSE_STATUSBAR
-   // create a status bar just for fun (by default with 1 pane only)
-   CreateStatusBar(2);
-   SetStatusText(_T("Welcome to Bacula wx-console!"));
+   CreateStatusBar(1);
+   SetStatusText(wxString("Welcome to bacula wx-console ") << VERSION << " (" << BDATE << ")!\n");
 #endif // wxUSE_STATUSBAR
 
    wxPanel* global = new wxPanel(this, -1);
    ct = new console_thread();
    ct->Create();
    ct->Run();
+   SetStatusText("Connecting to the director...");
 }
 
 /* Register a new wxbDataParser */
 void wxbMainFrame::Print(wxString str, int status)
 {
    if (status == CS_CONNECTED) {
+      SetStatusText("Connected to the director.");
       EnablePanels();
       return;
    }
    if (status == CS_DISCONNECTED) {
+      SetStatusText("Disconnected of the director.");
       DisablePanels();
       return;
    }
 
 
    working = false;
    SetCursor(*wxSTANDARD_CURSOR);
+
+   markWhenListingDone = false;
 }
 
 /*
 void wxbRestorePanel::CmdStart() {
    unsigned int i;
    if (status == activable) {
+      wxbMainFrame::GetInstance()->SetStatusText("Getting clients and filesets list.");
       wxbDataTokenizer* dt = WaitForEnd(".clients\n", true, false);
       wxString str;
 
       clientChoice->Clear();
       cfgClient->Clear();
+      
+      if (dt->GetCount() == 0) {
+         wxbMainFrame::GetInstance()->SetStatusText("Error : no clients returned by the director.");
+         return;
+      }
+      
       for (i = 0; i < dt->GetCount(); i++) {
          str = (*dt)[i];
          str.RemoveLast();
       dt = WaitForEnd(".filesets\n", true, false);
 
       cfgFileset->Clear();
+      
+      if (dt->GetCount() == 0) {
+         wxbMainFrame::GetInstance()->SetStatusText("Error : no filesets returned by the director.");
+         return;
+      }
+      
       for (i = 0; i < dt->GetCount(); i++) {
          str = (*dt)[i];
          str.RemoveLast();
       delete dt;
 
       SetStatus(entered);
+      
+      clientChoice->Enable(false);
+      jobChoice->Enable(false);      
+      clientChoice->SetSelection(0);
+      CmdListJobs();
+      jobChoice->Enable(true);
+      clientChoice->Enable(true);
+      
+      wxbMainFrame::GetInstance()->SetStatusText("Please select a client and a date at which the files you'll select were backed up.");
    }
    else if (status == entered) {
-      if (jobChoice->GetStringSelection().Length() < 1) {
+      if (clientChoice->GetStringSelection().Length() < 1) {
          wxbMainFrame::GetInstance()->SetStatusText("Please select a client.");
          return;
       }
+      if (jobChoice->GetStringSelection().Length() < 1) {
+         wxbMainFrame::GetInstance()->SetStatusText("Please select a restore date.");
+         return;
+      }
+      wxbMainFrame::GetInstance()->SetStatusText("Building restore tree...");
+      
       WaitForPrompt("restore\n");
       WaitForPrompt("6\n");
       wxbPromptParser *pp = WaitForPrompt(wxString() << jobChoice->GetStringSelection() << "\n", true);
       long l;
       wxString str;
       
-      unsigned int i;
       for (i = 0; i < tableparser->size(); i++) {
          str = (*tableparser)[i][2];
          str.Replace(",", "");
                if (((*dt)[lastindex].Find("Building directory tree for JobId ") == 0) && 
                      ((i = (*dt)[lastindex].Find(" ...")) > 0)) {
                   str = (*dt)[lastindex].Mid(34, i-34);
-                  for (unsigned int i = 0; i < tableparser->size(); i++) {
+                  for (i = 0; i < tableparser->size(); i++) {
                      if (str == (*tableparser)[i][0]) {
                         str = (*tableparser)[i][2];
                         str.Replace(",", "");
          }
          wxTheApp->Yield(true);
       }
-      
+
+      gauge->SetValue(tot);
+      wxTheApp->Yield();
       gauge->SetValue(0);
       
       delete dt;
    }
    else if (status == choosing) {
       SetStatus(configuring);
-      
-      wxbMainFrame::GetInstance()->SetStatusText("Please configure your restore...");
-      
+           
       EnableConfig(false);
       
       totfilemessages = 0;
       dt = new wxbDataTokenizer(true);
       WaitForPrompt("done\n");
 
-      for (unsigned int i = 0; i < dt->GetCount(); i++) {
+      for (i = 0; i < dt->GetCount(); i++) {
          if ((j = (*dt)[i].Find(" files selected to be restored.")) > -1) {
             (*dt)[i].Mid(0, j).ToLong(&totfilemessages);
             break;
          }
       }
       
+      wxbMainFrame::GetInstance()->SetStatusText(
+         wxString("Please configure your restore (") 
+            << totfilemessages <<  " files selected to be restored)...");
+      
       UpdateConfig(dt);
       
       delete dt;
 void wxbRestorePanel::CmdConfigApply() {
    if (cfgUpdated == 0) return;
    
+   wxbMainFrame::GetInstance()->SetStatusText("Applying restore configuration changes...");
+   
    EnableConfig(false);
    
    wxbDataTokenizer* dt = NULL;
    UpdateConfig(dt); /* TODO: Check result */
    
    EnableConfig(true);
-   
+
+   wxbMainFrame::GetInstance()->SetStatusText("Restore configuration changes were applied.");
+
    delete dt;
 }
 
       return;
    }
    SetCursor(*wxHOURGLASS_CURSOR);
+   markWhenListingDone = false;
    working = true;
    CmdList(event.GetItem());
+   if (markWhenListingDone) {
+      CmdMark(event.GetItem(), -1);
+      tree->Refresh();
+   }
    working = false;
    SetCursor(*wxSTANDARD_CURSOR);
 }
 
 void wxbRestorePanel::OnTreeMarked(wxbTreeMarkedEvent& event) {
    if (working) {
-      //event.Skip();
+      if (tree->GetSelection() == event.GetItem()) {
+         markWhenListingDone = !markWhenListingDone;
+      }
       return;
    }
    SetCursor(*wxHOURGLASS_CURSOR);