]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix command completion bug.
authorNicolas Boichat <nicolas@boichat.ch>
Mon, 7 Nov 2005 17:40:07 +0000 (17:40 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Mon, 7 Nov 2005 17:40:07 +0000 (17:40 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2558 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/wx-console/wxbmainframe.cpp

index a94a6e8e1fc42304fa61976aacf13644b515d1c5..0ffa691c85afb429ec43297c35491b2b93775bdf 100644 (file)
@@ -605,14 +605,18 @@ void wxbMainFrame::Print(wxString str, int status)
    if (status == CS_CONNECTED) {
       SetStatusText(_("Connected to the director."));
       typeCtrl->ClearCommandList();
-      wxbDataTokenizer* dt = wxbUtils::WaitForEnd(wxT(".help"), true);
-      int i, j;
-      wxString str;
-      for (i = 0; i < (int)dt->GetCount(); i++) {
-         str = (*dt)[i];
-         str.RemoveLast();
-         if ((j = str.Find(' ')) > -1) {
-            typeCtrl->AddCommand(str.Mid(0, j), str.Mid(j+1));
+      bool parsed = false;
+      while (!parsed) {
+         wxbDataTokenizer* dt = wxbUtils::WaitForEnd(wxT(".help"), true);
+         int i, j;
+         wxString str;
+         for (i = 0; i < (int)dt->GetCount(); i++) {
+            str = (*dt)[i];
+            str.RemoveLast();
+            if ((j = str.Find(' ')) > -1) {
+               typeCtrl->AddCommand(str.Mid(0, j), str.Mid(j+1));
+               parsed = true;
+            }
          }
       }
       EnablePanels();