]> git.sur5r.net Git - bacula/bacula/commitdiff
Added delete and purge options in medialist. Shorten headings to get more to
authorDirk H Bartley <dbartley@schupan.com>
Sun, 29 Apr 2007 14:27:46 +0000 (14:27 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Sun, 29 Apr 2007 14:27:46 +0000 (14:27 +0000)
show up.  Now I am testing with my companies old DDS3 autochangers.  Added
mount dialog so that if a mount is requested on an autochanger, a dialog asks
the user which slot.

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

15 files changed:
bacula/src/qt-console/TODO
bacula/src/qt-console/bat.pro.in
bacula/src/qt-console/joblist/joblist.cpp
bacula/src/qt-console/label/label.cpp
bacula/src/qt-console/mediaedit/mediaedit.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/mount/mount.cpp [new file with mode: 0644]
bacula/src/qt-console/mount/mount.h [new file with mode: 0644]
bacula/src/qt-console/mount/mount.ui [new file with mode: 0644]
bacula/src/qt-console/pages.cpp
bacula/src/qt-console/pages.h
bacula/src/qt-console/storage/storage.cpp
bacula/src/qt-console/storage/storage.h

index a728b0816330d98f2bf34595f544bad2f7e6d8f5..422082cf78901d4fefc8bd28a1b283930f8d1aea 100644 (file)
@@ -6,13 +6,14 @@ Add context sensitive options for most commands
 status dir on page select director item
 All items with jobid= that I thought could work from joblist are done.
 
+relabel storage=DDS3 oldvolume=ddsvol003 volume=dds3vol003 slot=3 pool=dds3_hope
+in label slot spinner, limit the upper to the value of slots for that storage.
+
 Create list of what does not work.
 
 Ask Kern about bRestore and what to do with it in terms of priorities.  Should
 that be working before an initial release.
 
-Fix bug in myth box not working with .sql query="" command.
-
 Create documentation for any other developers interested in creating
 new classes to add more pages.  Explain how to use the pages class
 and about not populating until the tree widget is clicked etc...
@@ -51,6 +52,9 @@ global one defined in the mainWin class (if I remember right).
 ============================================================
 DONE:
 ============================================================
+Fix bug in myth box not working with .sql query="" command.
+This was a fix in mysql
+
 Figure out how to get tables like Joblist to do the equivalent of double clicking
 on the separating lines between each of the headings.
 Tried the hard way first.  Oops.
index 6371b5d86de233b631fa0e4316d6b06d189362c3..a7ee540f2875e356a966ec1193b4c45aa7b39b35 100644 (file)
@@ -29,7 +29,7 @@ UI_DIR = ui
 
 # Main window
 FORMS += main.ui
-FORMS += label/label.ui
+FORMS += label/label.ui mount/mount.ui
 FORMS += console/console.ui
 FORMS += restore/restore.ui restore/prerestore.ui restore/brestore.ui
 FORMS += run/run.ui run/runcmd.ui
@@ -52,6 +52,10 @@ SOURCES += restore/prerestore.cpp restore/restore.cpp restore/brestore.cpp
 HEADERS += label/label.h
 SOURCES += label/label.cpp
 
+# Mount dialog
+HEADERS += mount/mount.h
+SOURCES += mount/mount.cpp
+
 # Run dialog
 HEADERS += run/run.h
 SOURCES += run/run.cpp run/runcmd.cpp
index 2298d0e562a034eceae487380176171330ebffaf..fc3eabe327f085c681a22d75e202733f0e3dfb0e 100644 (file)
@@ -70,7 +70,7 @@ void JobList::populateTable()
 
    /* Set up query QString and header QStringList */
    QString query("");
-   query += "SELECT Job.Jobid AS Id, Job.Name AS JobName, Client.Name AS Client,"
+   query += "SELECT DISTINCT Job.Jobid AS Id, Job.Name AS JobName, Client.Name AS Client,"
             " Job.Starttime AS JobStart, Job.Type AS JobType,"
             " Job.Level AS BackupLevel, Job.Jobfiles AS FileCount,"
             " Job.JobBytes AS Bytes, Job.JobStatus AS Status"
index f9566f7e73ff14351ebf3748611472f29815b370..9f5556c8c742fcd20864d8b89e67f4f9b1a8fa9f 100644 (file)
@@ -84,6 +84,8 @@ void labelDialog::accept()
                   .arg(poolCombo->currentText())
                   .arg(storageCombo->currentText()) 
                   .arg(slotSpin->value());
+   /* FIXME Make this a user configurable logging action and dont use printf */
+   //printf("sending command : %s\n",scmd.toUtf8().data());
    m_console->write_dir(scmd.toUtf8().data());
    m_console->displayToPrompt();
    m_console->notify(true);
index 851051d482dc4441f71ce1a068c4e8bb91358036..ecd9b6df510f893cfe7dd77e3b7ae0139db11122 100644 (file)
@@ -55,7 +55,7 @@ MediaEdit::MediaEdit(Console *console, QString &mediaId)
    poolCombo->addItems(console->pool_list);
 
    /* The media's Status */
-   QStringList statusList = (QStringList() << "Full" << "Append" << "Error");
+   QStringList statusList = (QStringList() << "Full" << "Append" << "Error" << "Purged" << "Recycled");
    statusCombo->addItems(statusList);
 
    /* Set up the query for the default values */
index 0e3d7d52ceab626753cd736ee01c3bef7dcbff08..53025ac4491e9704efabaa5e095597e1419abb11 100644 (file)
@@ -68,8 +68,8 @@ void MediaList::populateTree()
    QTreeWidgetItem *mediatreeitem, *pooltreeitem, *topItem;
 
    QStringList headerlist = (QStringList()
-      << "Volume Name" << "Media Id" << "Volume Status" << "Enabled"
-      << "Volume Bytes" << "Volume Files" << "Volume Jobs" << "Volume Retention" 
+      << "Volume Name" << "Id" << "Status" << "Enabled"
+      << "Bytes" << "Files" << "Jobs" << "Retention" 
       << "Media Type" << "Slot" << "Last Written");
 
    m_checkcurwidget = false;
@@ -137,9 +137,9 @@ void MediaList::populateTree()
 /*
  * Called from the signal of the context sensitive menu!
  */
-void MediaList::editMedia()
+void MediaList::editVolume()
 {
-   MediaEdit* edit = new MediaEdit(m_console, m_currentlyselected);
+   MediaEdit* edit = new MediaEdit(m_console, m_currentVolumeId);
    connect(edit, SIGNAL(destroyed()), this, SLOT(populateTree()));
 }
 
@@ -150,7 +150,7 @@ void MediaList::showJobs()
 {
    QString emptyclient("");
    QTreeWidgetItem *parentItem = mainWin->getFromHash(this);
-   mainWin->createPageJobList(m_currentlyselected, emptyclient, parentItem);
+   mainWin->createPageJobList(m_currentVolumeName, emptyclient, parentItem);
 }
 
 /*
@@ -180,14 +180,19 @@ void MediaList::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetI
          if (treedepth == 2){
             mp_treeWidget->removeAction(actionEditVolume);
             mp_treeWidget->removeAction(actionListJobsOnVolume);
+            mp_treeWidget->removeAction(actionDeleteVolume);
+            mp_treeWidget->removeAction(actionPurgeVolume);
          }
       }
 
       int treedepth = currentwidgetitem->data(0, Qt::UserRole).toInt();
       if (treedepth == 2){
-         m_currentlyselected=currentwidgetitem->text(1);
+         m_currentVolumeName=currentwidgetitem->text(0);
+         m_currentVolumeId=currentwidgetitem->text(1);
          mp_treeWidget->addAction(actionEditVolume);
          mp_treeWidget->addAction(actionListJobsOnVolume);
+         mp_treeWidget->addAction(actionDeleteVolume);
+         mp_treeWidget->addAction(actionPurgeVolume);
       }
    }
 }
@@ -201,8 +206,10 @@ void MediaList::createContextMenu()
 {
    mp_treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
    mp_treeWidget->addAction(actionRefreshMediaList);
-   connect(actionEditVolume, SIGNAL(triggered()), this, SLOT(editMedia()));
+   connect(actionEditVolume, SIGNAL(triggered()), this, SLOT(editVolume()));
    connect(actionListJobsOnVolume, SIGNAL(triggered()), this, SLOT(showJobs()));
+   connect(actionDeleteVolume, SIGNAL(triggered()), this, SLOT(deleteVolume()));
+   connect(actionPurgeVolume, SIGNAL(triggered()), this, SLOT(purgeVolume()));
    connect(mp_treeWidget, SIGNAL(
            currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
            this, SLOT(treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)));
@@ -227,3 +234,22 @@ void MediaList::currentStackItem()
       m_populated=true;
    }
 }
+
+/*
+ * Called from the signal of the context sensitive menu!
+ */
+void MediaList::deleteVolume()
+{
+   QString cmd("delete volume=");
+   cmd += m_currentVolumeName;
+   consoleCommand(cmd);
+}
+/*
+ * Called from the signal of the context sensitive menu!
+ */
+void MediaList::purgeVolume()
+{
+   QString cmd("purge volume=");
+   cmd += m_currentVolumeName;
+   consoleCommand(cmd);
+}
index a86d22b55501d8b20ac502e7930cd7b18fa79dd9..e484d6752a01923d5a300f5023e361f8cfd020d6 100644 (file)
@@ -54,11 +54,14 @@ public slots:
 private slots:
    void populateTree();
    void showJobs();
-   void editMedia();
+   void editVolume();
+   void deleteVolume();
+   void purgeVolume();
 
 private:
    void createContextMenu();
-   QString m_currentlyselected;
+   QString m_currentVolumeName;
+   QString m_currentVolumeId;
    bool m_populated;
    bool m_checkcurwidget;
 };
index 4531d2939d63e57788667226d7cc8b7b97a4f37a..df0b106bd93c4495620f4a3121eaf8fab7eae955 100644 (file)
     <string>List Jobs On Volume</string>
    </property>
   </action>
+  <action name="actionDeleteVolume" >
+   <property name="icon" >
+    <iconset>../images/unmark.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Delete Volume</string>
+   </property>
+  </action>
+  <action name="actionPurgeVolume" >
+   <property name="icon" >
+    <iconset>../images/unmark.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Purge Volume</string>
+   </property>
+  </action>
  </widget>
  <resources/>
  <connections/>
diff --git a/bacula/src/qt-console/mount/mount.cpp b/bacula/src/qt-console/mount/mount.cpp
new file mode 100644 (file)
index 0000000..53dc9a9
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+   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.
+*/
+/*
+ *  Label Dialog class
+ *
+ *   Kern Sibbald, February MMVII
+ *
+ */ 
+
+#include "bat.h"
+#include "mount/mount.h"
+#include <QMessageBox>
+
+/*
+ * A constructor 
+ */
+mountDialog::mountDialog(Console *console, QString &storageName)
+{
+   m_console = console;
+   m_storageName = storageName;
+   m_console->notify(false);
+   setupUi(this);
+   this->show();
+
+   QString labelText("Storage : ");
+   labelText += storageName;
+   storageLabel->setText(labelText);
+}
+
+void mountDialog::accept()
+{
+   QString scmd;
+   if (m_storageName == "") {
+      QMessageBox::warning(this, "No Storage name", "No Storage name given",
+                           QMessageBox::Ok, QMessageBox::Ok);
+      return;
+   }
+   this->hide();
+   scmd = QString("mount storage=\"%1\" slot=%2")
+                  .arg(m_storageName)
+                  .arg(slotSpin->value());
+   /* FIXME Make this a user configurable logging action and dont use printf */
+   //printf("sending command : %s\n",scmd.toUtf8().data());
+
+   m_console->display_text("Context sensitive command :\n\n");
+   m_console->display_text("****    ");
+   m_console->display_text(scmd + "    ****\n");
+   m_console->display_text("Director Response :\n\n");
+
+   m_console->write_dir(scmd.toUtf8().data());
+   m_console->displayToPrompt();
+   m_console->notify(true);
+   delete this;
+   mainWin->resetFocus();
+}
+
+void mountDialog::reject()
+{
+   this->hide();
+   m_console->notify(true);
+   delete this;
+   mainWin->resetFocus();
+}
diff --git a/bacula/src/qt-console/mount/mount.h b/bacula/src/qt-console/mount/mount.h
new file mode 100644 (file)
index 0000000..4919291
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+   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.
+*/
+/* 
+ * Kern Sibbald, February MMVII
+ */
+
+#ifndef _MOUNT_H_
+#define _MOUNT_H_
+
+#include <QtGui>
+#include "ui_mount.h"
+#include "console.h"
+
+class mountDialog : public QDialog, public Ui::mountForm
+{
+   Q_OBJECT 
+
+public:
+   mountDialog(Console *console, QString &storage);
+
+private slots:
+   void accept();
+   void reject();
+
+private:
+   Console *m_console;
+   QString m_storageName;
+};
+
+#endif /* _MOUNT_H_ */
diff --git a/bacula/src/qt-console/mount/mount.ui b/bacula/src/qt-console/mount/mount.ui
new file mode 100644 (file)
index 0000000..fbd2c51
--- /dev/null
@@ -0,0 +1,199 @@
+<ui version="4.0" >
+ <class>mountForm</class>
+ <widget class="QDialog" name="mountForm" >
+  <property name="windowModality" >
+   <enum>Qt::WindowModal</enum>
+  </property>
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Label</string>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item row="1" column="0" >
+    <widget class="QLabel" name="storageLabel" >
+     <property name="maximumSize" >
+      <size>
+       <width>16777215</width>
+       <height>20</height>
+      </size>
+     </property>
+     <property name="text" >
+      <string>TextLabel</string>
+     </property>
+     <property name="alignment" >
+      <set>Qt::AlignCenter</set>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" >
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="label_4" >
+       <property name="text" >
+        <string>Slot:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>slotSpin</cstring>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QSpinBox" name="slotSpin" >
+       <property name="maximum" >
+        <number>10000</number>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="5" column="0" >
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Maximum</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>21</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="0" >
+    <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="label" >
+       <property name="maximumSize" >
+        <size>
+         <width>16777215</width>
+         <height>30</height>
+        </size>
+       </property>
+       <property name="text" >
+        <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:12pt; font-weight:600;">Mount a Slot&lt;/span>&lt;/p>&lt;/body>&lt;/html></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="2" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Maximum</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>382</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>mountForm</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>mountForm</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index 4076171dea28000d40a234182f6aa3117f9ef5e7..3bb4dc7999d239da1e2440d22a5522fff3a6e081 100644 (file)
@@ -216,7 +216,7 @@ void Pages::consoleCommand(QString &command)
    if (!m_console->is_connectedGui())
        return;
    /* Bring this directors console to the front of the stack */
-   mainWin->treeWidget->setCurrentItem(mainWin->getFromHash(m_console));
+   placeConsoleOnTop();
    m_console->display_text("Context sensitive command :\n\n");
    m_console->display_text("****    ");
    m_console->display_text(command + "    ****\n");
@@ -251,3 +251,11 @@ void Pages::setTitle()
    title += director;
    setWindowTitle(title);
 }
+
+/*
+ * Bring the current directors console window to the top of the stack.
+ */
+void Pages::placeConsoleOnTop()
+{
+   mainWin->treeWidget->setCurrentItem(mainWin->getFromHash(m_console));
+}
index 17718f7ea1a10c688ee4b76c9823a2b008b00313..2294af580cddf05965b1b01d33593e91a2f2c780 100644 (file)
@@ -77,6 +77,7 @@ protected:
    void consoleCommand(QString &);
    virtual void treeWidgetName(QString &);
    virtual void changeEvent(QEvent *event);
+   void placeConsoleOnTop();
    void setTitle();
    bool m_closeable;
    bool m_docked;
index bab484261a09b596db03f72f233f165011514918..b08b53db5679139b9751e36273537bb48830e15b 100644 (file)
@@ -39,6 +39,7 @@
 #include <QMenu>
 #include "bat.h"
 #include "storage/storage.h"
+#include "mount/mount.h"
 
 Storage::Storage()
 {
@@ -90,12 +91,10 @@ void Storage::populateTree()
       storageItem->setExpanded(true);
 
       /* Set up query QString and header QStringList */
-      QString query("");
-      query += "SELECT Name AS StorageName, StorageId AS ID, AutoChanger"
-           " FROM Storage"
-           " WHERE ";
-      query += " Name='" + storageName + "'";
-      query += " ORDER BY Name";
+      QString query("SELECT StorageId AS ID, AutoChanger AS Changer"
+               " FROM Storage WHERE");
+      query += " Name='" + storageName + "'"
+               " ORDER BY Name";
 
       QStringList results;
       /* This could be a log item */
@@ -165,7 +164,8 @@ void Storage::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetIte
       if (treedepth == 1){
          /* set a hold variable to the storage name in case the context sensitive
           * menu is used */
-         m_currentStorage=currentwidgetitem->text(0);
+         m_currentStorage = currentwidgetitem->text(0);
+         m_currentAutoChanger = currentwidgetitem->text(2).toInt();
          mp_treeWidget->addAction(actionStatusStorageInConsole);
          mp_treeWidget->addAction(actionLabelStorage);
          mp_treeWidget->addAction(actionMountStorage);
@@ -241,9 +241,16 @@ void Storage::consoleLabelStorage()
 }
 void Storage::consoleMountStorage()
 {
-   QString cmd("mount storage=");
-   cmd += m_currentStorage;
-   consoleCommand(cmd);
+   if (m_currentAutoChanger == 0){
+      /* no autochanger, just execute the command in the console */
+      QString cmd("mount storage=");
+      cmd += m_currentStorage;
+      consoleCommand(cmd);
+   } else {
+      placeConsoleOnTop();
+      /* if this storage is an autochanger, lets ask for the slot */
+      new mountDialog(m_console, m_currentStorage);
+   }
 }
 void Storage::consoleUnMountStorage()
 {
index 2079a9b1098934d92402c53b34846bb69a8e5d98..b22f196daad10744b5ef9fe490afdc238c4a87e7 100644 (file)
@@ -62,6 +62,7 @@ private slots:
 private:
    void createContextMenu();
    QString m_currentStorage;
+   int m_currentAutoChanger;
    bool m_populated;
    bool m_checkcurwidget;
 };