]> git.sur5r.net Git - bacula/bacula/commitdiff
This version fixes an issue where the console window would start out not docked....
authorDirk H Bartley <dirk@rustyloon.net>
Sat, 20 Feb 2010 08:01:00 +0000 (09:01 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 2 Aug 2010 14:49:33 +0000 (16:49 +0200)
17 files changed:
bacula/src/qt-console/job/job.cpp
bacula/src/qt-console/jobgraphs/jobplot.cpp
bacula/src/qt-console/joblog/joblog.cpp
bacula/src/qt-console/label/label.cpp
bacula/src/qt-console/mainwin.cpp
bacula/src/qt-console/mediaedit/mediaedit.cpp
bacula/src/qt-console/mediainfo/mediainfo.cpp
bacula/src/qt-console/pages.cpp
bacula/src/qt-console/pages.h
bacula/src/qt-console/restore/brestore.cpp
bacula/src/qt-console/restore/prerestore.cpp
bacula/src/qt-console/restore/restore.cpp
bacula/src/qt-console/restore/restoretree.cpp
bacula/src/qt-console/status/clientstat.cpp
bacula/src/qt-console/status/dirstat.cpp
bacula/src/qt-console/status/storstat.cpp
bacula/src/qt-console/storage/content.cpp

index f78bfd8c4ea15d3574623e78dd987c451de5655b..9fe7ba1b6706c07c00614d195c03bc187c927722 100644 (file)
@@ -35,7 +35,6 @@
 Job::Job(QString &jobId, QTreeWidgetItem *parentTreeWidgetItem)
 {
    setupUi(this);
-   m_closeable = true;
    pgInitialize(tr("Job"), parentTreeWidgetItem);
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/joblog.png")));
index f2b56735c1609241f4bd86fb17464730bf3dd5ef..86c8a88fb1925fbccbac5797e4903ba923fa6501 100644 (file)
@@ -85,7 +85,6 @@ JobPlot::JobPlot(QTreeWidgetItem *parentTreeWidgetItem, JobPlotPass &passVals)
 
    /* this invokes the pass values = operator function */
    m_pass = passVals;
-   m_closeable = true;
    dockPage();
    /* If the values of the controls are predetermined (from joblist), then set
     * this class as current window at the front of the stack */
index dad1dfacaadc43f8c1eb0e1f398375f068e21851..0e1182f8f1d057ea04dec2738e74671e07ee1995 100644 (file)
@@ -41,7 +41,6 @@
 JobLog::JobLog(QString &jobId, QTreeWidgetItem *parentTreeWidgetItem)
 {
    setupUi(this);
-   m_closeable = true;
    pgInitialize(tr("JobLog"), parentTreeWidgetItem);
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/joblog.png")));
index 446da44e4f140d9787411dd22d016e0f6ebb74c4..4834f4926abe71960653abb91c4fb94431251865 100644 (file)
@@ -50,7 +50,6 @@ labelPage::labelPage()
  */
 labelPage::labelPage(QString &defString)
 {
-   m_closeable = true;
    showPage(defString);
 }
 
index 6bb7519e59024c535e2fd01a02fa53f5ed24af22..10cccd0bf1f08ddb4f0b615e0c31ff9fdb3f7c33 100644 (file)
@@ -98,7 +98,7 @@ MainWin::MainWin(QWidget *parent) : QMainWindow(parent)
       console->connect_dir();
    }
    m_currentConsole = (Console*)getFromHash(m_firstItem);
-   QTimer::singleShot(5000, this, SLOT(popLists()));
+   QTimer::singleShot(2000, this, SLOT(popLists()));
    if (m_miscDebug) {
       QString directoryResourceName;
       m_currentConsole->getDirResName(directoryResourceName);
@@ -151,6 +151,7 @@ void MainWin::createPages()
 
       /* insert the cosole and tree widget item into the hashes */
       hashInsert(item, m_currentConsole);
+      m_currentConsole->dockPage();
 
       /* Set Color of treeWidgetItem for the console
       * It will be set to green in the console class if the connection is made.
@@ -183,8 +184,6 @@ void MainWin::createPages()
 
       treeWidget->expandItem(topItem);
       tabWidget->setCurrentWidget(m_currentConsole);
-      m_currentConsole->undockPage();
-      m_currentConsole->dockPage();
    }
    UnlockRes();
 }
index f38ae472d07fd17c1b04e32b56d0cb1dacd6009d..565f0bd0afaf77fec869cfb539274d3675bc0b4d 100644 (file)
@@ -46,7 +46,6 @@ MediaEdit::MediaEdit(QTreeWidgetItem *parentWidget, QString &mediaId)
    pgInitialize(tr("Media Edit"), parentWidget);
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/cartridge-edit.png")));
-   m_closeable = true;
    dockPage();
    setCurrent();
 
index 77163346c0c30ceafc56043376845706a9ef59a6..1f11f12c4f09780e9db8b54db8c0d7ad64c6baa8 100644 (file)
@@ -53,7 +53,6 @@ MediaInfo::MediaInfo(QTreeWidgetItem *parentWidget, QString &mediaName)
    connect(pbEdit, SIGNAL(clicked()), this, SLOT(editVol()));
    connect(tableJob, SIGNAL(itemDoubleClicked(QTableWidgetItem*)), this, SLOT(showInfoForJob(QTableWidgetItem *)));
    
-   m_closeable = true;
    dockPage();
    setCurrent();
    populateForm();
index de0f2d3926d248192974ba713641f6c3e868f33e..e99ad6d7a3cdf50c6058174f12f89b9d8a72ba38 100644 (file)
@@ -51,6 +51,14 @@ bool isWin32Path(QString &fullPath)
    return toret;
 }
 
+/* Need to initialize variables here */
+Pages::Pages()
+{
+   m_docked = false;
+   m_onceDocked = false;
+   m_closeable = true;
+}
+
 /*
  * dockPage
  * This function is intended to be called from within the Pages class to pull
index 4cdacc9aea84ae892ee0dd53edb52bacf56fd153..b938465b99403b6088f883d9ddcc1ecb87f11352 100644 (file)
@@ -55,6 +55,7 @@ class Console;
 class Pages : public QWidget
 {
 public:
+   Pages();
    void dockPage();
    void undockPage();
    void togglePageDocking();
index d6a643712e3613af56b6ccd3bb6ca676fc7f5a49..8e491468d66ce69697ac191bff40b37f7ead127c 100644 (file)
@@ -43,7 +43,6 @@ bRestore::bRestore()
    m_name = "bRestore";
    setupUi(this);
    pgInitialize();
-   m_closeable = true;
    dockPage();
 }
 
index d09469d84f4abf1b9c1f27f72601c8ee048b0f69..2244bffdebc05c8d98752cd0eb6edc21aa0356cd 100644 (file)
@@ -63,7 +63,6 @@ void prerestorePage::buildPage()
    setupUi(this);
    pgInitialize();
    m_conn = m_console->notifyOff();
-   m_closeable = true;
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/restore.png")));
 
index 28fa4e64f8ad7741c4bb5d85532bed84f97ccec8..f3e875804fe171f935bf232e3caaee5efe29d82a 100644 (file)
@@ -51,7 +51,6 @@ restorePage::restorePage(int conn)
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/restore.png")));
 
    m_console->notify(m_conn, false);          /* this should already be off */
-   m_closeable = true;
 
    connect(fileWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), 
            this, SLOT(fileDoubleClicked(QTreeWidgetItem *, int)));
index dbcbb6ac24dd10f733f0b691af8e92d4e7249fd0..41a688045479fa0a06fff48f2535d091400fa8b6 100644 (file)
@@ -47,7 +47,6 @@ restoreTree::restoreTree()
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0, QIcon(QString::fromUtf8(":images/browse.png")));
 
-   m_closeable = true;
    m_populated = false;
 
    m_debugCnt = 0;
index 42d2fdba87eb167cb44abf3bead0ec9d2cdfba60..07e444bae3586cd222968cd1abd49f4b9a276c08 100644 (file)
@@ -43,7 +43,6 @@ ClientStat::ClientStat(QString &client, QTreeWidgetItem *parentTreeWidgetItem)
 {
    m_client = client;
    setupUi(this);
-   m_closeable = true;
    pgInitialize(tr("Client Status %1").arg(m_client), parentTreeWidgetItem);
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/status.png")));
index f8eb3176453e32c1efe1153485721e4765ffe0e1..d20bc7b6231e6aeead9b964c1c62e5fcbeadc3be 100644 (file)
@@ -43,7 +43,6 @@ DirStat::DirStat()
 {
    setupUi(this);
    m_name = tr("Director Status");
-   m_closeable = true;
    pgInitialize();
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/status.png")));
index a6a6e7df10059fb1aea569d69603ca63fee35cf8..3615c2c17ac826007b714132c2ed11865b1860ec 100644 (file)
@@ -59,7 +59,6 @@ StorStat::StorStat(QString &storage, QTreeWidgetItem *parentTreeWidgetItem)
 {
    m_storage = storage;
    setupUi(this);
-   m_closeable = true;
    pgInitialize(tr("Storage Status %1").arg(m_storage), parentTreeWidgetItem);
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/status.png")));
index 93e779f4a8ff1958eb23d413cf233e79e5a8ce63..2c87ebbd00e6cc8f0eaff2578c5031de77f34af0 100644 (file)
@@ -52,7 +52,6 @@ Content::Content(QString storage, QTreeWidgetItem *parentWidget)
    m_populated = false;
    m_firstpopulation = true;
    m_checkcurwidget = true;
-   m_closeable = true;
    m_currentStorage = storage;
 
    connect(pbUpdate, SIGNAL(clicked()), this,