]> git.sur5r.net Git - bacula/bacula/commitdiff
Create a prune page. Populate it from medialist and clients.
authorDirk H Bartley <dbartley@schupan.com>
Mon, 28 May 2007 11:51:53 +0000 (11:51 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Mon, 28 May 2007 11:51:53 +0000 (11:51 +0000)
move m_contextActions.append from currentStackItem to constructor.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4923 91ce42f0-d328-0410-95d8-f526ca767f89

12 files changed:
bacula/src/qt-console/bat.pro.in
bacula/src/qt-console/clients/clients.cpp
bacula/src/qt-console/clients/clients.h
bacula/src/qt-console/clients/clients.ui
bacula/src/qt-console/fileset/fileset.cpp
bacula/src/qt-console/medialist/medialist.cpp
bacula/src/qt-console/medialist/medialist.h
bacula/src/qt-console/medialist/medialist.ui
bacula/src/qt-console/run/prune.cpp [new file with mode: 0644]
bacula/src/qt-console/run/prune.ui [new file with mode: 0644]
bacula/src/qt-console/run/run.h
bacula/src/qt-console/storage/storage.cpp

index 587cb9d6ae36e69c818c2f19143b5a842dc9c990..7dc375575a23376c28bda36027f1985be02d856a 100644 (file)
@@ -35,7 +35,7 @@ FORMS += relabel/relabel.ui
 FORMS += mount/mount.ui
 FORMS += console/console.ui
 FORMS += restore/restore.ui restore/prerestore.ui restore/brestore.ui
-FORMS += run/run.ui run/runcmd.ui run/estimate.ui
+FORMS += run/run.ui run/runcmd.ui run/estimate.ui run/prune.ui
 FORMS += select/select.ui
 FORMS += medialist/medialist.ui mediaedit/mediaedit.ui joblist/joblist.ui
 FORMS += clients/clients.ui storage/storage.ui fileset/fileset.ui
@@ -67,7 +67,7 @@ SOURCES += mount/mount.cpp
 
 # Run dialog
 HEADERS += run/run.h
-SOURCES += run/run.cpp run/runcmd.cpp run/estimate.cpp
+SOURCES += run/run.cpp run/runcmd.cpp run/estimate.cpp run/prune.cpp
 
 # Select dialog
 HEADERS += select/select.h
index 3e7b5889115905172c9d22ec79ae6f92d75f751e..81ec330bf79535c3d4e8016e78d9e78d12e1be74 100644 (file)
@@ -39,6 +39,7 @@
 #include <QMenu>
 #include "bat.h"
 #include "clients/clients.h"
+#include "run/run.h"
 
 Clients::Clients()
 {
@@ -52,6 +53,9 @@ Clients::Clients()
    m_populated = false;
    m_checkcurwidget = true;
    m_closeable = false;
+   /* add context sensitive menu items specific to this classto the page
+    * selector tree. m_contextActions is QList of QActions */
+   m_contextActions.append(actionRefreshClients);
 }
 
 Clients::~Clients()
@@ -159,6 +163,7 @@ void Clients::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetIte
             mp_treeWidget->removeAction(actionListJobsofClient);
             mp_treeWidget->removeAction(actionStatusClientInConsole);
             mp_treeWidget->removeAction(actionPurgeJobs);
+            mp_treeWidget->removeAction(actionPrune);
          }
       }
 
@@ -170,6 +175,7 @@ void Clients::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetIte
          mp_treeWidget->addAction(actionListJobsofClient);
          mp_treeWidget->addAction(actionStatusClientInConsole);
          mp_treeWidget->addAction(actionPurgeJobs);
+         mp_treeWidget->addAction(actionPrune);
       }
    }
 }
@@ -195,6 +201,8 @@ void Clients::createContextMenu()
                 SLOT(consoleStatusClient()));
    connect(actionPurgeJobs, SIGNAL(triggered()), this,
                 SLOT(consolePurgeJobs()));
+   connect(actionPrune, SIGNAL(triggered()), this,
+                SLOT(prune()));
 }
 
 /*
@@ -226,10 +234,6 @@ void Clients::currentStackItem()
 {
    if(!m_populated) {
       populateTree();
-      /* add context sensitive menu items specific to this classto the page
-       * selector tree. m_contextActions is QList of QActions, so this is 
-       * only done once with the first population. */
-      m_contextActions.append(actionRefreshClients);
       /* Create the context menu for the client tree */
       createContextMenu();
       m_populated=true;
@@ -260,3 +264,11 @@ void Clients::consolePurgeJobs()
    consoleCommand(cmd);
 }
 
+/*
+ * Function responding to actionPrune
+ */
+void Clients::prune()
+{
+   new prunePage("", m_currentlyselected);
+}
+
index ea07fb03d8d479ec3fefc51af597335852ebdb05..3b10f7f12e8bef112e5db7f5fbd9debb85d8ce42 100644 (file)
@@ -37,7 +37,6 @@
 #include "ui_clients.h"
 #include "console.h"
 #include "pages.h"
-//#include <qstringlist.h>
 
 class Clients : public Pages, public Ui::ClientForm
 {
@@ -57,6 +56,7 @@ private slots:
    void showJobs();
    void consoleStatusClient();
    void consolePurgeJobs();
+   void prune();
 
 private:
    void createContextMenu();
index 8311bc39538d7208adfa64c1d21ac9a0bffff2d6..11edc4c1d2e1ffcf6df934877a8d71aa43c8c5cb 100644 (file)
@@ -25,7 +25,7 @@
   </layout>
   <action name="actionRefreshClients" >
    <property name="icon" >
-    <iconset>../../../../../../../:images/run.png</iconset>
+    <iconset>images/run.png</iconset>
    </property>
    <property name="text" >
     <string>Refresh Client List</string>
   </action>
   <action name="actionListJobsofClient" >
    <property name="icon" >
-    <iconset>../../../../../../../:images/unmark.png</iconset>
+    <iconset>images/unmark.png</iconset>
    </property>
    <property name="text" >
     <string>List Jobs of Client</string>
    </property>
+   <property name="statusTip" >
+    <string>Open a joblist page selecting this client.</string>
+   </property>
   </action>
   <action name="actionStatusClientInConsole" >
    <property name="icon" >
-    <iconset>../../../../../../../:images/status.png</iconset>
+    <iconset>images/status.png</iconset>
    </property>
    <property name="text" >
     <string>Status Client In Console</string>
    </property>
+   <property name="statusTip" >
+    <string>Execute status client in console.</string>
+   </property>
   </action>
   <action name="actionPurgeJobs" >
+   <property name="icon" >
+    <iconset>images/unmark.png</iconset>
+   </property>
    <property name="text" >
     <string>Purge Jobs</string>
    </property>
+   <property name="statusTip" >
+    <string>Purge jobs peformed from this client.</string>
+   </property>
+  </action>
+  <action name="actionPrune" >
+   <property name="icon" >
+    <iconset>images/unmark.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Prune Jobs</string>
+   </property>
+   <property name="statusTip" >
+    <string>Open the diaolog to prune for this client.</string>
+   </property>
   </action>
  </widget>
  <resources/>
index c9b10c63fc48ad14d192877eec6b433baf8dd16c..e346760c9a78775c263a8916b447eb29487e2ca9 100644 (file)
@@ -53,6 +53,9 @@ FileSet::FileSet()
    m_checkcurwidget = true;
    m_closeable = false;
    readSettings();
+   /* add context sensitive menu items specific to this classto the page
+    * selector tree. m_contextActions is QList of QActions */
+   m_contextActions.append(actionRefreshFileSet);
 }
 
 FileSet::~FileSet()
@@ -211,10 +214,6 @@ void FileSet::currentStackItem()
 {
    if(!m_populated) {
       populateTree();
-      /* add context sensitive menu items specific to this classto the page
-       * selector tree. m_contextActions is QList of QActions, so this is 
-       * only done once with the first population. */
-      m_contextActions.append(actionRefreshFileSet);
       /* Create the context menu for the fileset tree */
       createContextMenu();
       m_populated=true;
index 9da7cc9055d4ceffe9ffe745296e403830570a75..f5585726276c9f5310b81957511787fa003efd8a 100644 (file)
@@ -42,6 +42,7 @@
 #include "mediaedit/mediaedit.h"
 #include "joblist/joblist.h"
 #include "relabel/relabel.h"
+#include "run/run.h"
 
 MediaList::MediaList()
 {
@@ -55,6 +56,9 @@ MediaList::MediaList()
    m_populated = false;
    m_checkcurwidget = true;
    m_closeable = false;
+   /* add context sensitive menu items specific to this classto the page
+    * selector tree. m_contextActions is QList of QActions */
+   m_contextActions.append(actionRefreshMediaList);
 }
 
 MediaList::~MediaList()
@@ -202,6 +206,7 @@ void MediaList::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetI
             mp_treeWidget->removeAction(actionEditVolume);
             mp_treeWidget->removeAction(actionListJobsOnVolume);
             mp_treeWidget->removeAction(actionDeleteVolume);
+            mp_treeWidget->removeAction(actionPruneVolume);
             mp_treeWidget->removeAction(actionPurgeVolume);
             mp_treeWidget->removeAction(actionRelabelVolume);
          }
@@ -214,6 +219,7 @@ void MediaList::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetI
          mp_treeWidget->addAction(actionEditVolume);
          mp_treeWidget->addAction(actionListJobsOnVolume);
          mp_treeWidget->addAction(actionDeleteVolume);
+         mp_treeWidget->addAction(actionPruneVolume);
          mp_treeWidget->addAction(actionPurgeVolume);
          mp_treeWidget->addAction(actionRelabelVolume);
       }
@@ -233,6 +239,7 @@ void MediaList::createContextMenu()
    connect(actionListJobsOnVolume, SIGNAL(triggered()), this, SLOT(showJobs()));
    connect(actionDeleteVolume, SIGNAL(triggered()), this, SLOT(deleteVolume()));
    connect(actionPurgeVolume, SIGNAL(triggered()), this, SLOT(purgeVolume()));
+   connect(actionPruneVolume, SIGNAL(triggered()), this, SLOT(pruneVolume()));
    connect(actionRelabelVolume, SIGNAL(triggered()), this, SLOT(relabelVolume()));
    connect(mp_treeWidget, SIGNAL(
            currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
@@ -249,10 +256,6 @@ void MediaList::currentStackItem()
 {
    if(!m_populated) {
       populateTree();
-      /* add context sensitive menu items specific to this classto the page
-       * selector tree. m_contextActions is QList of QActions, so this is 
-       * only done once with the first population. */
-      m_contextActions.append(actionRefreshMediaList);
       /* Create the context menu for the medialist tree */
       createContextMenu();
       m_populated=true;
@@ -260,7 +263,7 @@ void MediaList::currentStackItem()
 }
 
 /*
- * Called from the signal of the context sensitive menu!
+ * Called from the signal of the context sensitive menu to delete a volume!
  */
 void MediaList::deleteVolume()
 {
@@ -280,8 +283,9 @@ void MediaList::deleteVolume()
    cmd += m_currentVolumeName;
    consoleCommand(cmd);
 }
+
 /*
- * Called from the signal of the context sensitive menu!
+ * Called from the signal of the context sensitive menu to purge!
  */
 void MediaList::purgeVolume()
 {
@@ -302,8 +306,17 @@ void MediaList::purgeVolume()
    consoleCommand(cmd);
    populateTree();
 }
+
 /*
- * Called from the signal of the context sensitive menu!
+ * Called from the signal of the context sensitive menu to prune!
+ */
+void MediaList::pruneVolume()
+{
+   new prunePage(m_currentVolumeName, "");
+}
+
+/*
+ * Called from the signal of the context sensitive menu to relabel!
  */
 void MediaList::relabelVolume()
 {
index 52a6ca69be58a30b4ac8d1b5122e931fe4327324..143e83a3adc0e69f1fa738be94b6aeb2c6b69ea3 100644 (file)
@@ -57,6 +57,7 @@ private slots:
    void editVolume();
    void deleteVolume();
    void purgeVolume();
+   void pruneVolume();
    void relabelVolume();
 
 private:
index 69e45d0e481a02a045c962925c23fb7bb5c249e9..71b8383dd95a63574c7a1b1ee711d9092e2a2e5b 100644 (file)
     <string>Delete Volume</string>
    </property>
   </action>
+  <action name="actionPruneVolume" >
+   <property name="icon" >
+    <iconset>:images/unmark.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Prune Volume</string>
+   </property>
+  </action>
   <action name="actionPurgeVolume" >
    <property name="icon" >
     <iconset>:images/unmark.png</iconset>
@@ -68,7 +76,7 @@
   </action>
   <action name="actionRelabelVolume" >
    <property name="icon" >
-    <iconset>../images/unmark.png</iconset>
+    <iconset>:images/unmark.png</iconset>
    </property>
    <property name="text" >
     <string>Relabel Volume</string>
diff --git a/bacula/src/qt-console/run/prune.cpp b/bacula/src/qt-console/run/prune.cpp
new file mode 100644 (file)
index 0000000..b64bd58
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2007-2007 Free Software Foundation Europe e.V.
+
+   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
+   License as published by the Free Software Foundation plus additions
+   that are listed 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
+   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
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ *  Run Dialog class
+ *
+ *   Kern Sibbald, February MMVII
+ *
+ *  $Id: prune.cpp 4856 2007-05-20 15:28:43Z bartleyd2 $
+ */ 
+
+#include "bat.h"
+#include "run.h"
+
+/*
+ * Setup all the combo boxes and display the dialog
+ */
+prunePage::prunePage(const QString &volume, const QString &client)
+{
+   QDateTime dt;
+
+   m_name = "Prune";
+   pgInitialize();
+   setupUi(this);
+   m_console->notify(false);
+
+   QString query("SELECT VolumeName AS Media FROM Media ORDER BY Media");
+   if (mainWin->m_sqlDebug) {
+      Pmsg1(000, "Query cmd : %s\n",query.toUtf8().data());
+   }
+   QStringList results, volumeList;
+   if (m_console->sql_cmd(query, results)) {
+      QString field;
+      QStringList fieldlist;
+      /* Iterate through the lines of results. */
+      foreach (QString resultline, results) {
+         fieldlist = resultline.split("\t");
+         volumeList.append(fieldlist[0]);
+      } /* foreach resultline */
+   } /* if results from query */
+
+   volumeCombo->addItem("Any");
+   volumeCombo->addItems(volumeList);
+   clientCombo->addItem("Any");
+   clientCombo->addItems(m_console->client_list);
+   connect(okButton, SIGNAL(pressed()), this, SLOT(okButtonPushed()));
+   connect(cancelButton, SIGNAL(pressed()), this, SLOT(cancelButtonPushed()));
+   filesCheckBox->setCheckState(Qt::Checked);
+   jobsCheckBox->setCheckState(Qt::Checked);
+   volumeCheckBox->setCheckState(Qt::Checked);
+   connect(filesCheckBox, SIGNAL(stateChanged(int)), this, SLOT(checkStateChanged()));
+   connect(jobsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(checkStateChanged()));
+   connect(volumeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(checkStateChanged()));
+   if (clientCombo->findText(client, Qt::MatchExactly) != -1)
+      clientCombo->setCurrentIndex(clientCombo->findText(client, Qt::MatchExactly));
+   else
+      clientCombo->setCurrentIndex(0);
+   if (volumeCombo->findText(volume, Qt::MatchExactly) != -1)
+      volumeCombo->setCurrentIndex(volumeCombo->findText(volume, Qt::MatchExactly));
+   else
+      volumeCombo->setCurrentIndex(0);
+   connect(volumeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(volumeChanged()));
+   connect(clientCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(clientChanged()));
+
+   dockPage();
+   setCurrent();
+   this->show();
+}
+
+void prunePage::okButtonPushed()
+{
+   this->hide();
+   QString cmd("prune");
+   if (filesCheckBox->checkState() == Qt::Checked) {
+      cmd += " files";
+   }
+   if (jobsCheckBox->checkState() == Qt::Checked) {
+      cmd += " jobs";
+   }
+   if (filesCheckBox->checkState() == Qt::Checked) {
+      cmd += " volume";
+   }
+   if (volumeCombo->currentText() != "Any") {
+      cmd += " volume=\"" + volumeCombo->currentText() + "\"";
+   }
+   if (clientCombo->currentText() != "Any") {
+      cmd += " client=\"" + clientCombo->currentText() + "\"";
+   }
+   cmd += " yes";
+
+   if (mainWin->m_commandDebug) {
+      Pmsg1(000, "command : %s\n", cmd.toUtf8().data());
+   }
+
+   consoleCommand(cmd);
+   m_console->notify(true);
+   closeStackPage();
+   mainWin->resetFocus();
+}
+
+
+void prunePage::cancelButtonPushed()
+{
+   mainWin->set_status(" Canceled");
+   this->hide();
+   m_console->notify(true);
+   closeStackPage();
+   mainWin->resetFocus();
+}
+
+void prunePage::checkStateChanged()
+{
+   if ((filesCheckBox->checkState() == Qt::Unchecked) &&
+       (jobsCheckBox->checkState() == Qt::Unchecked) &&
+       (volumeCheckBox->checkState() == Qt::Unchecked)) {
+      filesCheckBox->setCheckState(Qt::Checked);
+   }
+}
+
+void prunePage::volumeChanged()
+{
+   if ((volumeCombo->currentText() == "Any") && (clientCombo->currentText() == "Any")) {
+      clientCombo->setCurrentIndex(1);
+   }
+}
+
+void prunePage::clientChanged()
+{
+   if ((volumeCombo->currentText() == "Any") && (clientCombo->currentText() == "Any")) {
+      volumeCombo->setCurrentIndex(1);
+   }
+}
diff --git a/bacula/src/qt-console/run/prune.ui b/bacula/src/qt-console/run/prune.ui
new file mode 100644 (file)
index 0000000..6a1f29f
--- /dev/null
@@ -0,0 +1,311 @@
+<ui version="4.0" >
+ <class>pruneForm</class>
+ <widget class="QWidget" name="pruneForm" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>501</width>
+    <height>326</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="1" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="1" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>351</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="1" >
+    <layout class="QGridLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item row="1" column="1" >
+      <widget class="QComboBox" name="clientCombo" />
+     </item>
+     <item row="5" column="0" colspan="2" >
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <widget class="QCheckBox" name="volumeCheckBox" >
+         <property name="layoutDirection" >
+          <enum>Qt::RightToLeft</enum>
+         </property>
+         <property name="text" >
+          <string>Prune Volumes</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+     <item row="0" column="0" colspan="2" >
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>71</width>
+           <height>21</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="run" >
+         <property name="maximumSize" >
+          <size>
+           <width>16777215</width>
+           <height>30</height>
+          </size>
+         </property>
+         <property name="text" >
+          <string>&lt;h3>Prune Files/Jobs/Volumes&lt;/h3></string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>81</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+     <item row="6" column="0" colspan="2" >
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QPushButton" name="okButton" >
+         <property name="text" >
+          <string>OK</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="cancelButton" >
+         <property name="text" >
+          <string>Cancel</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="4" column="0" colspan="2" >
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <widget class="QCheckBox" name="jobsCheckBox" >
+         <property name="layoutDirection" >
+          <enum>Qt::RightToLeft</enum>
+         </property>
+         <property name="text" >
+          <string>Prune Jobs</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+     <item row="2" column="1" >
+      <widget class="QComboBox" name="volumeCombo" />
+     </item>
+     <item row="1" column="0" >
+      <widget class="QLabel" name="label_6" >
+       <property name="maximumSize" >
+        <size>
+         <width>65</width>
+         <height>16777215</height>
+        </size>
+       </property>
+       <property name="text" >
+        <string>Client:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>clientCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="0" colspan="2" >
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <widget class="QCheckBox" name="filesCheckBox" >
+         <property name="layoutDirection" >
+          <enum>Qt::RightToLeft</enum>
+         </property>
+         <property name="text" >
+          <string>Prune Files</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+     <item row="2" column="0" >
+      <widget class="QLabel" name="label_8" >
+       <property name="text" >
+        <string>Volume:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>volumeCombo</cstring>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="2" column="1" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>351</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index f077d4e4f64ad2022bbebbf7ae696a53bad76bf3..41232daac70b7e815012b60f13b66728b5099079 100644 (file)
@@ -6,6 +6,7 @@
 #include "ui_run.h"
 #include "ui_runcmd.h"
 #include "ui_estimate.h"
+#include "ui_prune.h"
 #include "console.h"
 
 class runPage : public Pages, public Ui::runForm
@@ -53,4 +54,21 @@ public slots:
 private:
 };
 
+class prunePage : public Pages, public Ui::pruneForm
+{
+   Q_OBJECT 
+
+public:
+   prunePage(const QString &volume, const QString &client);
+
+public slots:
+   void okButtonPushed();
+   void cancelButtonPushed();
+   void checkStateChanged();
+   void volumeChanged();
+   void clientChanged();
+
+private:
+};
+
 #endif /* _RUN_H_ */
index 0069a589a6e48107bb72d2eac81538ae58f931e6..153319ac9314a04cd5b110f5987940d2c4b9c319 100644 (file)
@@ -55,6 +55,9 @@ Storage::Storage()
    m_checkcurwidget = true;
    m_closeable = false;
    m_currentStorage = "";
+   /* add context sensitive menu items specific to this classto the page
+    * selector tree. m_contextActions is QList of QActions */
+   m_contextActions.append(actionRefreshStorage);
 }
 
 Storage::~Storage()
@@ -220,10 +223,6 @@ void Storage::currentStackItem()
 {
    if(!m_populated) {
       populateTree();
-      /* add context sensitive menu items specific to this classto the page
-       * selector tree. m_contextActions is QList of QActions, so this is 
-       * only done once with the first population. */
-      m_contextActions.append(actionRefreshStorage);
       /* Create the context menu for the storage tree */
       createContextMenu();
       m_populated=true;