return;
DirComm *dircomm = m_dircommHash.value(conn);
- if (mainWin->m_checkMessages && dircomm->m_at_main_prompt && hasFocus()){
+ if (mainWin->m_checkMessages && dircomm->m_at_main_prompt && hasFocus() && !mainWin->getWaitState()){
messagesPending(true);
dircomm->write(".messages");
displayToPrompt(conn);
return true; /* ***FIXME*** return any command error */
}
-/* Send a command to the Director */
+/*
+ * Overloads for
+ * Sending a command to the Director
+ */
int Console::write_dir(const char *msg)
{
int conn;
return conn;
}
-/* Send a command to the Director */
+int Console::write_dir(const char *msg, bool dowait)
+{
+ int conn;
+ if (availableDirComm(conn))
+ write_dir(conn, msg, dowait);
+ return conn;
+}
+
void Console::write_dir(int conn, const char *msg)
+{
+ write_dir(conn, msg, true);
+}
+
+/*
+ * Send a command to the Director
+ */
+void Console::write_dir(int conn, const char *msg, bool dowait)
{
DirComm *dircomm = m_dircommHash.value(conn);
if (dircomm->m_sock) {
mainWin->set_status(_("Processing command ..."));
- mainWin->waitEnter();
+ if (dowait)
+ mainWin->waitEnter();
dircomm->write(msg);
- mainWin->waitExit();
+ if (dowait)
+ mainWin->waitExit();
} else {
mainWin->set_status( tr(" Director not connected. Click on connect button."));
mainWin->actionConnect->setIcon(QIcon(":images/disconnected.png"));
/* Position cursor to end of screen */
void Console::update_cursor()
{
-// QApplication::restoreOverrideCursor();
m_textEdit->moveCursor(QTextCursor::End);
m_textEdit->ensureCursorVisible();
}