-25-04-2003 :
+26-04-2004 :
+ - Corrected a bug in Windows which causes wx-console to crash when
+ typing quit before exiting the application.
+
+25-04-2004 :
- general : status text is more often used
- wxbRestorePanel : restore aborted if there's no client or no fileset
- wxbRestorePanel : corrected problem if one double clicks on a
- wxbMainFrame : Automatically scrolling to the bottom of
console text control.
-24-04-2003 :
+24-04-2004 :
- wxbMainFrame : When starting wx-console, the initial key
input focus is set into the command window.
- wxbMainFrame : the user is now prompted when an
- wxbRestorePanel : using dot commands (.clients, .filesets)
- console_thread : implemented prompt and heartbeat messages
-23-04-2003 :
+23-04-2004 :
- general : Don't concatenate lines in csprint, but in wxbDataParser
(necessary for dot commands)
-22-04-2003 :
+22-04-2004 :
- wxbRestorePanel : improved restore appearance
- wxbRestorePanel : configure is allowed to change 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 ?)
+VC++ : crashing when there's no configuration file, when server is unreachable,
+ when connection has been interrupted and wants to quit (on every error ?)
[postponed to July:]
wxbRestorePanel : Add a timeout when waiting for commands results
+bacula-dir : correct director to handle correctly + marked status
+ (In fact there is a bug in the director : If you mark a directory
+ (not a file), and then unmark it, its parents keep the "+" status.)
+
general : make a good documentation with snapshots
BUGS
init_stack_dump();
my_name_is(0, NULL, "wx-console");
- textdomain("bacula-console");
+ //textdomain("bacula-console");
init_msg(NULL, NULL);
/* TODO (#4#): Allow the user to choose his config file. */
csprint("Failed to connect to the director\n");
csprint(NULL, CS_END);
csprint(NULL, CS_DISCONNECTED);
+ csprint(NULL, CS_TERMINATED);
+ Exit();
return NULL;
}
csprint(UA_sock->msg);
csprint(NULL, CS_END);
csprint(NULL, CS_DISCONNECTED);
+ csprint(NULL, CS_TERMINATED);
+ Exit();
return NULL;
}
csprint("Connection terminated\n");
UA_sock = NULL;
+
+ csprint(NULL, CS_TERMINATED);
+
+ Exit();
- return 0;
+ return NULL;
}
void console_thread::Write(const char* str) {
#define CS_CONNECTED 4 /* the socket is now connected */
#define CS_DISCONNECTED 5 /* the socket is now disconnected */
#define CS_DEBUG 10 /* used to print debug messages */
+#define CS_TERMINATED 99 /* used to signal that the thread is terminated */
/* function called by console_thread to send events back to the GUI */
void csprint(char* str, int status=CS_DATA);
*/
wxbMainFrame::~wxbMainFrame()
{
- if ((ct != NULL) && (!ct->IsRunning())) {
+ if (ct != NULL) { // && (!ct->IsRunning())
ct->Delete();
}
}
*/
void wxbMainFrame::Print(wxString str, int status)
{
+ if (status == CS_TERMINATED) {
+ SetStatusText("Console thread terminated.");
+ ct = NULL;
+ DisablePanels();
+ return;
+ }
+
if (status == CS_CONNECTED) {
SetStatusText("Connected to the director.");
EnablePanels();
/* Unregister a wxbDataParser */
void Unregister(wxbDataParser* dp);
+ console_thread* ct; /* thread interacting with the director */
+
private:
/* private constructor, singleton */
wxbMainFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style);
wxbPanel **panels; /* panels array, contained in the notebook */
wxbDataParsers parsers; /* Data parsers, which need to receive director informations */
- console_thread* ct; /* thread interacting with the director */
-
wxbPromptParser* promptparser; /* prompt parser catching uncatched questions */
static wxbMainFrame *frame; /* this */