/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2009 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.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula® is a registered trademark of Kern Sibbald.
The licensor of Bacula is the Free Software Foundation Europe
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
* Dirk Bartley, March 2007
*/
+#include "bat.h"
#include <QAbstractEventDispatcher>
#include <QTableWidgetItem>
#include <QMessageBox>
-#include "bat.h"
#include "mediaedit.h"
-#include <inttypes.h>
/*
* A constructor
MediaEdit::MediaEdit(QTreeWidgetItem *parentWidget, QString &mediaId)
{
setupUi(this);
- m_name = tr("Media Edit");
- pgInitialize(parentWidget);
+ pgInitialize(tr("Media Edit"), parentWidget);
QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/cartridge-edit.png")));
m_closeable = true;
m_status = "";
m_slot = 0;
- if (!m_console->preventInUseConnect())
- return;
-
/* The media's pool */
poolCombo->addItems(m_console->pool_list);
else enabledCheck->setCheckState(Qt::Unchecked);
/* default for recycle pool */
recyclePoolCombo->addItems(m_console->pool_list);
+ recyclePoolCombo->insertItem(0, "*None*");
index = recyclePoolCombo->findText(m_recyclePool, Qt::MatchExactly);
if (index == -1) {
- recyclePoolCombo->insertItem(0, "");
index = 0;
}
recyclePoolCombo->setCurrentIndex(index);
scmd += " enabled=yes";
docmd = true;
}
- if (m_recyclePool != recyclePoolCombo->currentText() && recyclePoolCombo->currentText() != "") {
- scmd += " recyclepool=\"" + recyclePoolCombo->currentText() + "\"";
+ if (m_recyclePool != recyclePoolCombo->currentText()) {
+ scmd += " recyclepool=\"";
+ if (recyclePoolCombo->currentText() != "*None*") {
+ scmd += recyclePoolCombo->currentText();
+ }
+ scmd += "\"";
docmd = true;
}
if (docmd) {