QString cmdStr = lineEdit->text(); /* Get the text */
lineEdit->clear(); /* clear the lineEdit box */
if (m_currentConsole->is_connected()) {
- m_currentConsole->consoleCommand(cmdStr);
+ /* Use consoleInput to allow typing anything */
+ m_currentConsole->consoleInput(cmdStr);
} else {
set_status("Director not connected. Click on connect button.");
}
{
/*if (!m_console->is_connectedGui())
return;*/
- if (!m_console->preventInUseConnect())
+ if (!m_console->preventInUseConnect()) {
return;
- /* Bring this directors console to the front of the stack */
+ }
+ consoleInput(command);
+}
+
+/*
+ * Function to simplify executing a console command, but does not
+ * check for the connection in use. We need this so that we can
+ * *always* enter command from the command line.
+ */
+void Pages::consoleInput(QString &command)
+{
+ /* Bring this director's console to the front of the stack */
setConsoleCurrent();
QString displayhtml("<font color=\"blue\">");
displayhtml += command + "</font>\n";
void setContextMenuDockText();
void setTreeWidgetItemDockColor();
void consoleCommand(QString &);
+ void consoleInput(QString &);
public slots:
/* closeEvent is a virtual function inherited from QWidget */
/* no need to check for windows drive if unix */
if (m_winRegExpDrive.indexIn(m_cwd, 0) == 0) {
/* this is a windows drive add the base widget */
- QTreeWidgetItem *item = item = new QTreeWidgetItem(directoryTree);
+ QTreeWidgetItem *item = new QTreeWidgetItem(directoryTree);
item->setIcon(0, QIcon(QString::fromUtf8(":images/folder.png")));
item->setText(0, m_cwd);
item->setData(0, Qt::UserRole, QVariant(fullpath));