X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fqt-console%2Fstorage%2Fstorage.cpp;h=8d5fd055ebf4416f42b8ee6fc4ee4e661d32e346;hb=637c52b00e3ddd50913d44a613e23a4093a658eb;hp=089b64817d4a621457679bb9f69a6c04f08c3a95;hpb=d322953d5d73db82c0000eb8d4ddc9c3a8bf638d;p=bacula%2Fbacula diff --git a/bacula/src/qt-console/storage/storage.cpp b/bacula/src/qt-console/storage/storage.cpp index 089b64817d..8d5fd055eb 100644 --- a/bacula/src/qt-console/storage/storage.cpp +++ b/bacula/src/qt-console/storage/storage.cpp @@ -6,7 +6,7 @@ The main author of Bacula is Kern Sibbald, with contributions from 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 + modify it under the terms of version three of the GNU Affero General Public License as published by the Free Software Foundation and included in the file LICENSE. @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -39,12 +39,13 @@ #include #include #include "storage.h" +#include "content.h" #include "label/label.h" #include "mount/mount.h" #include "status/storstat.h" #include "util/fmtwidgetitem.h" -Storage::Storage() +Storage::Storage() : Pages() { setupUi(this); pgInitialize(tr("Storage")); @@ -60,7 +61,6 @@ Storage::Storage() /* add context sensitive menu items specific to this classto the page * selector tree. m_contextActions is QList of QActions */ m_contextActions.append(actionRefreshStorage); - dockPage(); } Storage::~Storage() @@ -234,6 +234,9 @@ void Storage::PgSeltreeWidgetClicked() populateTree(); createContextMenu(); } + if (!isOnceDocked()) { + dockPage(); + } } /* @@ -326,6 +329,17 @@ void Storage::createContextMenu() SLOT(consoleRelease())); connect(actionStatusStorageWindow, SIGNAL(triggered()), this, SLOT(statusStorageWindow())); + connect(mp_treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), + this, SLOT(contentWindow())); + +} + +void Storage::contentWindow() +{ + if (m_currentStorage != "" && m_currentAutoChanger) { + QTreeWidgetItem *parentItem = mainWin->getFromHash(this); + new Content(m_currentStorage, parentItem); + } } /*