From: Eric Bollengier Date: Tue, 20 Oct 2009 19:56:33 +0000 (+0000) Subject: bat: cleanup MediaView X-Git-Tag: Release-7.0.0~2599^2~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3602a311bcfe8d5a2e9a62c36739f158858cdfb5;p=bacula%2Fbacula bat: cleanup MediaView --- diff --git a/bacula/src/qt-console/medialist/mediaview.cpp b/bacula/src/qt-console/medialist/mediaview.cpp index e56601a70a..f470a00207 100644 --- a/bacula/src/qt-console/medialist/mediaview.cpp +++ b/bacula/src/qt-console/medialist/mediaview.cpp @@ -91,6 +91,26 @@ void MediaView::editPushed() void MediaView::purgePushed() { + if (QMessageBox::warning(this, "Bat", + tr("Are you sure you want to purge ?? !!!.\n" +"The Purge command will delete associated Catalog database records from Jobs and" +" Volumes without considering the retention period. Purge works only on the" +" Catalog database and does not affect data written to Volumes. This command can" +" be dangerous because you can delete catalog records associated with current" +" backups of files, and we recommend that you do not use it unless you know what" +" you are doing.\n" + "Press OK to proceed with the purge operation?"), + QMessageBox::Ok | QMessageBox::Cancel) + == QMessageBox::Cancel) { return; } + + QStringList lst; + QString cmd; + getSelection(lst); + for(int i=0; isetEditTriggers(QAbstractItemView::NoEditTriggers); } -/* - * Called from the signal of the context sensitive menu! - */ -void MediaView::editVolume() -{ - MediaEdit* edit = new MediaEdit(mainWin->getFromHash(this), m_currentVolumeId); - connect(edit, SIGNAL(destroyed()), this, SLOT(populateTable())); -} - -/* - * Called from the signal of the context sensitive menu! - */ -void MediaView::viewVolume() -{ - QTreeWidgetItem *parentItem = mainWin->getFromHash(this); - MediaInfo* view = new MediaInfo(parentItem, m_currentVolumeName); - connect(view, SIGNAL(destroyed()), this, SLOT(populateTable())); - -} - /* * When the treeWidgetItem in the page selector tree is singleclicked, Make sure * The tree has been populated. @@ -339,68 +341,6 @@ void MediaView::currentStackItem() } } -/* - * Called from the signal of the context sensitive menu to delete a volume! - */ -void MediaView::deleteVolume() -{ - if (QMessageBox::warning(this, "Bat", - tr("Are you sure you want to delete?? !!!.\n" -"This delete command is used to delete a Volume record and all associated catalog" -" records that were created. This command operates only on the Catalog" -" database and has no effect on the actual data written to a Volume. This" -" command can be dangerous and we strongly recommend that you do not use" -" it unless you know what you are doing. All Jobs and all associated" -" records (File and JobMedia) will be deleted from the catalog." - "Press OK to proceed with delete operation.?"), - QMessageBox::Ok | QMessageBox::Cancel) - == QMessageBox::Cancel) { return; } - - QStringList lst; - QString cmd; - getSelection(lst); - for(int i=0; i