case BNET_TEXT_INPUT:
if (mainWin->m_commDebug) Pmsg4(000, "conn %i TEXT_INPUT at_prompt=%d m_in_select=%d notify=%d\n",
m_conn, m_at_prompt, m_in_select, is_notify_enabled());
- //if (!m_in_select && is_notify_enabled()) {
- if (!m_in_select) {
- mainWin->waitExit();
+ if (!m_in_select && is_notify_enabled()) {
new textInputDialog(m_console, m_conn);
- } else {
if (mainWin->m_commDebug) Pmsg0(000, "!m_in_select && is_notify_enabled\n");
m_at_prompt = true;
m_at_main_prompt = false;
void Pages::consoleCommand(QString &command, bool setCurrent)
{
int conn;
- bool donotify = false;
- if (m_console->getDirComm(conn)) {
- if (m_console->is_notify_enabled(conn)) {
- donotify = true;
- m_console->notify(conn, false);
- }
- consoleCommand(command, conn, setCurrent);
- if (donotify) { m_console->notify(conn, true); }
+ if (m_console->getDirComm(conn)) {
+ consoleCommand(command, conn, setCurrent, true);
}
}
-void Pages::consoleCommand(QString &command, int conn)
-{
- consoleCommand(command, conn, true);
-}
-
-void Pages::consoleCommand(QString &command, int conn, bool setCurrent)
+/*
+ * Lowest level of console command method.
+ * "notify" parameter default is set to true by higher level console command call.
+ * In most cases "notify" parameter should be set to true value because after console
+ * command sent, notifier should be always enabled for catch all Director responses.
+ */
+void Pages::consoleCommand(QString &command, int conn, bool setCurrent, bool notify)
{
+ if (notify) {
+ m_console->notify(conn, true);
+ }
/* Bring this director's console to the front of the stack */
if (setCurrent) { setConsoleCurrent(); }
QString displayhtml("<font color=\"blue\">");
void setContextMenuDockText();
void setTreeWidgetItemDockColor();
void consoleCommand(QString &);
- void consoleCommand(QString &, int conn);
void consoleCommand(QString &, bool setCurrent);
- void consoleCommand(QString &, int conn, bool setCurrent);
+ void consoleCommand(QString &, int conn, bool setCurrent=true, bool notify=true);
QString &name() { return m_name; };
void getVolumeList(QStringList &);
void getStatusList(QStringList &);
Pmsg1(000, "command : %s\n", cmd.toUtf8().data());
}
- consoleCommand(cmd, m_conn);
+ consoleCommand(cmd, m_conn, true, true);
m_console->notify(m_conn, true);
closeStackPage();
mainWin->resetFocus();
m_console->notify(conn, false);
fill();
- m_console->discardToPrompt(m_conn);
connect(okButton, SIGNAL(pressed()), this, SLOT(okButtonPushed()));
connect(cancelButton, SIGNAL(pressed()), this, SLOT(cancelButtonPushed()));
void runCmdPage::cancelButtonPushed()
{
- m_console->displayToPrompt(m_conn);
- m_console->write_dir(".");
- m_console->displayToPrompt(m_conn);
- mainWin->set_status(tr(" Canceled"));
this->hide();
+ m_console->write_dir(m_conn, "no");
+ m_console->displayToPrompt(m_conn);
m_console->notify(m_conn, true);
+ mainWin->set_status(tr(" Canceled"));
closeStackPage();
mainWin->resetFocus();
}