]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/pages.cpp
Only use the svg files for the generation of the png files.
[bacula/bacula] / bacula / src / qt-console / pages.cpp
index 1e57794d39bee8a644711055ad9385c4a41549a3..5baff9d4c7ee18704f5b730402709102d456f1b2 100644 (file)
@@ -7,8 +7,8 @@
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
    modify it under the terms of version two of the GNU General Public
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -26,7 +26,7 @@
    Switzerland, email:ftf@fsfeurope.org.
 */
 /*
- *   Version $Id: batstack.cpp 4230 2007-02-21 20:07:37Z kerns $
+ *   Version $Id$
  *
  *   Dirk Bartley, March 2007
  */
@@ -205,20 +205,27 @@ void Pages::treeWidgetName(QString &name)
  */
 void Pages::consoleCommand(QString &command)
 {
-   if (!m_console->is_connectedGui())
+   /*if (!m_console->is_connectedGui())
+       return;*/
+   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();
-#ifdef xxdebugcode
-   m_console->display_text("Context sensitive command :\n\n");
-   m_console->display_text("****    ");
-#endif
-   m_console->display_text(command);
+   QString displayhtml("<font color=\"blue\">");
+   displayhtml += command + "</font>\n";
+   m_console->display_html(displayhtml);
    m_console->display_text("\n");
-#ifdef xxdebugcode
-   m_console->display_text("    ****\n");
-   m_console->display_text("Director Response :\n\n");
-#endif
    m_console->write_dir(command.toUtf8().data());
    m_console->displayToPrompt();
 }