]> git.sur5r.net Git - bacula/bacula/commitdiff
- wxbMainFrame : If the connection drops unexpectedly, it should say it lost the...
authorNicolas Boichat <nicolas@boichat.ch>
Sat, 1 May 2004 10:06:55 +0000 (10:06 +0000)
committerNicolas Boichat <nicolas@boichat.ch>
Sat, 1 May 2004 10:06:55 +0000 (10:06 +0000)
 - wxbMainFrame : corrected segmentation faults when exiting (to be verified)
 - wxbMainFrame : the user can quit however the state is

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

bacula/src/wx-console/CHANGELOG
bacula/src/wx-console/TODO
bacula/src/wx-console/console_thread.cpp
bacula/src/wx-console/wxbmainframe.cpp

index c7e4eca3f653f2e152efb1158ed93b8adfc16ad8..6f706d5b45dc4e6f30f92dfa2414ab2052585e1a 100644 (file)
@@ -1,3 +1,11 @@
+31-04-2004 :
+ - wxbMainFrame : If the connection drops unexpectedly, it should say 
+   it lost the connection to the Director and then wait for you to
+   either manually exit or (when it becomes possible) reconnect.
+ - wxbMainFrame : corrected segmentation faults when exiting
+     (to be verified)
+ - wxbMainFrame : the user can quit however the state is
+
 30-04-2004 :
  - wxbRestorePanel : Added "Cancel" button to cancel restore at
      all state of restore process.
index 22d419336b36099c4ac76e38da98ccd55fc32a53..90ce28fc1bd1231d8477f8ada3435db51a427df8 100644 (file)
@@ -3,24 +3,23 @@ FEATURES
 
 wxbRestorePanel : Reconsider start button's labels.
 
-wxbRestorePanel : Add titles to configuration panel
+wxbRestorePanel : Add titles to configuration panels
 
 wxbRestorePanel : When cancelling, check for commands results
 
 general : Show nice messages boxes when errors occurs.
 
-general : Allow the user to quit however the state is (kill thread if necessary)
-
-general : correct segmentation faults when exiting
-
 [postponed to July:]
 
-wxbRestorePanel : Add a way to cancel restore when building tree (needs director modifications)
+wxbRestorePanel : Add a way to cancel restore when building tree
+   (needs director modifications)
 
 wxbMainFrame : set focus to type control when clicking on console
 
 global : create a general class which keeps clients, jobs, filesets, pools... list.
 
+wxbConfigPanel : Create a dialog for selecting dates and paths.
+
 wxbMainFrame : use more often status text
 
 wxbRestorePanel : Ask Kern for a dot command which gives restore
index 6db894be028e38f03edc78863f10461e9c0f24fa..c7ecc338fe71e6823626a205ba43959747647eda 100644 (file)
@@ -193,5 +193,8 @@ void console_thread::Delete() {
       bnet_sig(UA_sock, BNET_TERMINATE); /* send EOF */
       bnet_close(UA_sock);
       UA_sock = NULL;
+      csprint(NULL, CS_END);
+      csprint(NULL, CS_DISCONNECTED);
+      csprint(NULL, CS_TERMINATED);
    }
 }
index 4a6623495d762e216f380138f81b9632bda8cf29..4399a3a5e929bb68bc66b645134ab61cee151cdd 100644 (file)
@@ -308,7 +308,11 @@ void wxbMainFrame::Unregister(wxbDataParser* dp) {
 
 void wxbMainFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 {
-   // TRUE is to force the frame to close
+   Print("Quitting.\n", CS_DEBUG);
+   if (ct != NULL) {
+      ct->Delete();
+      ct = NULL;
+   }
    Close(TRUE);
 }
 
@@ -352,6 +356,11 @@ void wxbMainFrame::Print(wxString str, int status)
       SetStatusText("Console thread terminated.");
       ct = NULL;
       DisablePanels();
+      int answer = wxMessageBox("Connection to the director lost. Quit program?", "Connection lost",
+                        wxYES_NO | wxICON_EXCLAMATION, this);
+      if (answer == wxYES) {
+         Close(true);
+      }
       return;
    }
    
@@ -513,6 +522,7 @@ void wxbMainFrame::DisablePanels(void* except) {
 /* Enable or disable console typing */
 void wxbMainFrame::EnableConsole(bool enable) {
    typeCtrl->Enable(enable);
+   sendButton->Enable(enable);
    if (enable) {
       typeCtrl->SetFocus();
    }