]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/medialist/medialist.cpp
bat: cleanup MediaView
[bacula/bacula] / bacula / src / qt-console / medialist / medialist.cpp
index c3315e9a181368f48958ae352daa0bc6ee1e3e59..96b9f1ee4b0ee6bd483c0ee911e72f5e419e4294 100644 (file)
@@ -50,7 +50,7 @@
 MediaList::MediaList()
 {
    setupUi(this);
-   m_name = tr("Media");
+   m_name = tr("Pools");
    pgInitialize();
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
    thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/cartridge.png")));
@@ -87,7 +87,7 @@ void MediaList::populateTree()
       << tr("Jobs") << tr("Retention") << tr("Media Type") << tr("Slot") << tr("Use Duration")
       << tr("Max Jobs") << tr("Max Files") << tr("Max Bytes") << tr("Recycle")
       << tr("Last Written") << tr("First Written") << tr("Read Time")
-      << tr("Write Time") << tr("Recycle Count") << tr("Recycle Pool") << tr("Scratch Pool"));
+      << tr("Write Time") << tr("Recycle Count") << tr("Recycle Pool"));
 
    m_checkcurwidget = false;
    mp_treeWidget->clear();
@@ -133,11 +133,10 @@ void MediaList::populateTree()
          " Media.FirstWritten AS FirstWritten,"
          " (VolReadTime/1000000) AS ReadTime, (VolWriteTime/1000000) AS WriteTime,"
          " RecycleCount AS ReCyCount,"
-         " RecPool.Name AS RecyclePool, ScrPool.Name AS ScratchPool"
+         " RecPool.Name AS RecyclePool"
          " FROM Media"
          " JOIN Pool ON (Media.PoolId=Pool.PoolId)"
          " LEFT OUTER JOIN Pool AS RecPool ON (Media.RecyclePoolId=RecPool.PoolId)"
-         " LEFT OUTER JOIN Pool AS ScrPool ON (Media.ScratchPoolId=ScrPool.PoolId)"
          " WHERE ";
       query += " Pool.Name IN (" + pool_comsep + ")";
       query += " ORDER BY Pool.Name, Media";
@@ -248,9 +247,6 @@ void MediaList::populateTree()
             /* recycle pool */
             mediaitem.setTextFld(index++, fld.next()); 
 
-            /* Scratch pool */
-            mediaitem.setTextFld(index++, fld.next()); 
-
          } /* foreach resultline */
          counter += 1;
       } /* if results from query */
@@ -285,7 +281,8 @@ void MediaList::showJobs()
  */
 void MediaList::viewVolume()
 {
-   MediaInfo* view = new MediaInfo(mainWin->getFromHash(this), m_currentVolumeId);
+   QTreeWidgetItem *parentItem = mainWin->getFromHash(this);
+   MediaInfo* view = new MediaInfo(parentItem, m_currentVolumeName);
    connect(view, SIGNAL(destroyed()), this, SLOT(populateTree()));
 
 }