]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/pages.cpp
Fix bat bug that consumes connections + add braces on ifs + rename subroutines
[bacula/bacula] / bacula / src / qt-console / pages.cpp
index 293bf70758f63e1ccc3e727c474abdcf63027ee1..de0f2d3926d248192974ba713641f6c3e868f33e 100644 (file)
@@ -87,10 +87,10 @@ void Pages::dockPage()
 
    /* Set docked flag */
    m_docked = true;
+   m_onceDocked = true;
    mainWin->tabWidget->setCurrentWidget(this);
    /* lets set the page selectors action for docking or undocking */
    setContextMenuDockText();
-
 }
 
 /*
@@ -140,6 +140,17 @@ bool Pages::isDocked()
    return m_docked;
 }
 
+/*
+ * This function is because after the tabbed widget was added I could not tell
+ * from is docked if it had been docked yet.  To prevent status pages from requesting
+ * status from the director
+ */
+bool Pages::isOnceDocked()
+{
+   return m_onceDocked;
+}
+
+
 /*
  * To keep m_closeable protected as well
  */
@@ -221,6 +232,7 @@ void Pages::pgInitialize(const QString &name)
 void Pages::pgInitialize(const QString &tname, QTreeWidgetItem *parentTreeWidgetItem)
 {
    m_docked = false;
+   m_onceDocked = false;
    if (tname.size()) {
       m_name = tname;
    }
@@ -260,7 +272,7 @@ void Pages::consoleCommand(QString &command, bool setCurrent)
 {
    int conn;
    bool donotify = false;
-   if (m_console->availableDirComm(conn))  {
+   if (m_console->getDirComm(conn))  {
       if (m_console->is_notify_enabled(conn)) {
          donotify = true;
          m_console->notify(conn, false);