*
* Main frame
*
- * Nicolas Boichat, April 2004
+ * Nicolas Boichat, July 2004
*
+ * Version $Id$
*/
/*
Copyright (C) 2004 Kern Sibbald and John Walker
consoleSizer->AddGrowableCol(0);
consoleSizer->AddGrowableRow(0);
- typeCtrl = new wxTextCtrl(consolePanel,TypeText,"",wxDefaultPosition,wxSize(200,20), wxTE_PROCESS_ENTER);
+ typeCtrl = new wxbHistoryTextCtrl(consolePanel,TypeText,"",wxDefaultPosition,wxSize(200,20));
sendButton = new wxButton(consolePanel, SendButton, "Send");
wxFlexGridSizer *typeSizer = new wxFlexGridSizer(1, 3, 0, 0);
wxYES_NO | wxICON_QUESTION, this);
if (answer == wxYES) {
wxConfigBase::Get()->Write("/ConfigFile", configfile);
+ wxConfigBase::Get()->Flush();
StartConsoleThread("");
return;
}
{
lockedbyconsole = true;
DisablePanels();
+ typeCtrl->HistoryAdd(typeCtrl->GetValue());
wxString str = typeCtrl->GetValue() + "\n";
Send(str);
}
consoleCtrl->AppendText(consoleBuffer);
consoleBuffer = "";
SetStatusText("Console thread terminated.");
+ consoleCtrl->ScrollLines(3);
ct = NULL;
DisablePanels();
int answer = wxMessageBox("Connection to the director lost. Quit program?", "Connection lost",
if (status == CS_DISCONNECTED) {
consoleCtrl->AppendText(consoleBuffer);
consoleBuffer = "";
+ consoleCtrl->ScrollLines(3);
SetStatusText("Disconnected of the director.");
DisablePanels();
return;
Send("\n");
}
else {
- Send(wxString() << numbers[res] << "\n");
+ if (promptparser->isNumericalChoice()) {
+ Send(wxString() << numbers[res] << "\n");
+ }
+ else {
+ Send(wxString() << choices[res] << "\n");
+ }
}
}
else {
if (status == CS_DEBUG) {
consoleCtrl->AppendText(consoleBuffer);
consoleBuffer = "";
+ consoleCtrl->ScrollLines(3);
consoleCtrl->SetDefaultStyle(wxTextAttr(wxColour(0, 128, 0)));
}
else {
firePrintEvent("", status);
}
}
-