/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2007 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 = "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);
/* The media's Status */
- QStringList statusList = (QStringList() << "Full" << "Used" << "Append" << "Error" << "Purged" << "Recycled");
+ QStringList statusList = (QStringList() << "Full" << "Used" << "Append"
+ << "Error" << "Purged" << "Recycle" << "Read-Only" << "Cleaning");
statusCombo->addItems(statusList);
/* Set up the query for the default values */
i += 1;
}
query += " FROM Media"
- " LEFT OUTER JOIN Pool ON (Media.PoolId=Pool.PoolId)"
+ " JOIN Pool ON (Media.PoolId=Pool.PoolId)"
" LEFT OUTER JOIN Pool AS Pol ON (Media.recyclepoolid=Pol.PoolId)"
- " WHERE Media.MediaId='" + mediaId + "'"
- " ORDER BY Pool.Name";
+ " WHERE Media.MediaId='" + mediaId + "'";
if (mainWin->m_sqlDebug) {
Pmsg1(000, "MediaList query cmd : %s\n",query.toUtf8().data());
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 = recyclePoolCombo->findText(m_recyclePool, Qt::MatchExactly);
- }
- if (index != -1) {
- recyclePoolCombo->setCurrentIndex(index);
+ index = 0;
}
+ recyclePoolCombo->setCurrentIndex(index);
} else {
- QMessageBox::warning(this, "No Volume name", "No Volume name given",
+ QMessageBox::warning(this, tr("No Volume name"), tr("No Volume name given"),
QMessageBox::Ok, QMessageBox::Ok);
return;
}
docmd = true;
}
if (m_recyclePool != recyclePoolCombo->currentText()) {
- scmd += " recyclepool=\"" + recyclePoolCombo->currentText() + "\"";
+ scmd += " recyclepool=\"";
+ if (recyclePoolCombo->currentText() != "*None*") {
+ scmd += recyclePoolCombo->currentText();
+ }
+ scmd += "\"";
docmd = true;
}
if (docmd) {