From 8feb8e92d35fb5f1c436c698aff2954d7b42ca2b Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 5 Jul 2008 10:39:06 +0000 Subject: [PATCH] Correct bat restore display of multiple drives. This fixes bug #1117. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7310 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/restore/prerestore.cpp | 20 ++-- bacula/src/qt-console/restore/restore.cpp | 75 +++++++++++---- bacula/src/qt-console/restore/restoretree.cpp | 91 ++++++++++--------- bacula/technotes-2.4 | 2 + 4 files changed, 115 insertions(+), 73 deletions(-) diff --git a/bacula/src/qt-console/restore/prerestore.cpp b/bacula/src/qt-console/restore/prerestore.cpp index 379bf483fb..32adc173d1 100644 --- a/bacula/src/qt-console/restore/prerestore.cpp +++ b/bacula/src/qt-console/restore/prerestore.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2007 Free Software Foundation Europe e.V. + Copyright (C) 2007-20087 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. @@ -59,7 +59,7 @@ prerestorePage::prerestorePage() */ void prerestorePage::buildPage() { - m_name = "Restore"; + m_name = tr("Restore"); setupUi(this); pgInitialize(); m_console->notify(false); @@ -73,7 +73,7 @@ void prerestorePage::buildPage() jobCombo->addItems(m_console->job_list); filesetCombo->addItems(m_console->fileset_list); clientCombo->addItems(m_console->client_list); - poolCombo->addItem("Any"); + poolCombo->addItem(tr("Any")); poolCombo->addItems(m_console->pool_list); storageCombo->addItems(m_console->storage_list); /* current or before . . Start out with current checked */ @@ -85,7 +85,7 @@ void prerestorePage::buildPage() if (m_dataInType == R_NONE) { selectJobRadio->setChecked(true); selectJobIdsRadio->setChecked(false); - jobIdEdit->setText("Comma separted list of jobs id's"); + jobIdEdit->setText(tr("Comma separted list of Job Ids")); jobIdEdit->setEnabled(false); } else if (m_dataInType == R_JOBIDLIST) { selectJobIdsRadio->setChecked(true); @@ -101,7 +101,7 @@ void prerestorePage::buildPage() } else if (m_dataInType == R_JOBDATETIME) { selectJobRadio->setChecked(true); selectJobIdsRadio->setChecked(false); - jobIdEdit->setText("Comma separted list of jobs id's"); + jobIdEdit->setText(tr("Comma separted list of Job Ids")); jobIdEdit->setEnabled(false); recentCheckBox->setCheckState(Qt::Unchecked); jobRadioClicked(true); @@ -191,7 +191,7 @@ void prerestorePage::okButtonPushed() */ void prerestorePage::cancelButtonPushed() { - mainWin->set_status("Canceled"); + mainWin->set_status(tr("Canceled")); this->hide(); m_console->notify(true); closeStackPage(); @@ -269,7 +269,7 @@ bool prerestorePage::checkJobIdList() /* Need to check and make sure the text is a comma separated list of integers */ QString line = jobIdEdit->text(); if (line.contains(" ")) { - QMessageBox::warning(this, tr("Bat"), + QMessageBox::warning(this, "Bat", tr("There can be no spaces in the text for the joblist.\n" "Press OK to continue?"), QMessageBox::Ok ); return false; @@ -301,8 +301,8 @@ bool prerestorePage::checkJobIdList() } } if (!allintokay){ - QMessageBox::warning(this, tr("Bat"), - tr("The string is not a comma separated list if integers.\n" + QMessageBox::warning(this, "Bat", + tr("The string is not a comma separated list of integers.\n" "Press OK to continue?"), QMessageBox::Ok ); return false; } @@ -313,7 +313,7 @@ bool prerestorePage::checkJobIdList() return false; } if (!alljobok){ - QMessageBox::warning(this, tr("Bat"), + QMessageBox::warning(this, "Bat", tr("All jobs in the list must be of the same jobName and same client.\n" "Press OK to continue?"), QMessageBox::Ok ); return false; diff --git a/bacula/src/qt-console/restore/restore.cpp b/bacula/src/qt-console/restore/restore.cpp index 542b2a9881..305c374ab2 100644 --- a/bacula/src/qt-console/restore/restore.cpp +++ b/bacula/src/qt-console/restore/restore.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2007 Free Software Foundation Europe e.V. + Copyright (C) 2007-2008 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. @@ -43,7 +43,7 @@ restorePage::restorePage() QStringList titles; setupUi(this); - m_name = "Restore Select"; + m_name = tr("Restore Select"); pgInitialize(); QTreeWidgetItem* thisitem = mainWin->getFromHash(this); thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/restore.png"))); @@ -71,7 +71,8 @@ restorePage::restorePage() setFont(m_console->get_font()); m_console->displayToPrompt(); - titles << "Mark" << "File" << "Mode" << "User" << "Group" << "Size" << "Date"; + titles << tr("Mark") << tr("File") << tr("Mode") << tr("User") + << tr("Group") << tr("Size") << tr("Date"); fileWidget->setHeaderLabels(titles); get_cwd(); @@ -192,19 +193,35 @@ void restorePage::addDirectory(QString &newdirr) Pmsg0(000, msg.toUtf8().data()); } - /* add unix '/' directory first */ - if (m_dirPaths.empty()) { - if (isWin32Path(newdir)) { - /* this is a windows drive */ + if (isWin32Path(newdir)) { + /* this is a windows drive */ + if (mainWin->m_miscDebug) { + Pmsg0(000, "Found windows drive\n"); + } + windrive = true; + } + + if (windrive) { + if (fullpath.left(1) == "/") { + fullpath.replace(0, 1, ""); /* strip leading / */ + } + /* If drive and not already in add it */ + if (fullpath.length() == 3 && !m_dirPaths.contains(fullpath)) { + QTreeWidgetItem *item = new QTreeWidgetItem(directoryWidget); + item->setIcon(0,QIcon(QString::fromUtf8(":images/folder.png"))); + item->setText(0, fullpath.toUtf8().data()); if (mainWin->m_miscDebug) { - Pmsg0(000, "Need to do windows \"letter\":/\n"); + Pmsg1(000, "Pre Inserting %s\n",fullpath.toUtf8().data()); } - fullpath.replace(0,1,""); - windrive = true; - } else { + m_dirPaths.insert(fullpath, item); + m_dirTreeItems.insert(item, fullpath); + } + } else { + // Unix add / first if not already there + if (m_dirPaths.empty()) { QTreeWidgetItem *item = new QTreeWidgetItem(directoryWidget); item->setIcon(0,QIcon(QString::fromUtf8(":images/folder.png"))); - + QString text("/"); item->setText(0, text.toUtf8().data()); if (mainWin->m_miscDebug) { @@ -214,8 +231,8 @@ void restorePage::addDirectory(QString &newdirr) m_dirTreeItems.insert(item, text); } } - - /* is it already existent ?? */ + + /* Does it already exist ?? */ if (!m_dirPaths.contains(fullpath)) { QTreeWidgetItem *item = NULL; if (windrive) { @@ -234,7 +251,7 @@ void restorePage::addDirectory(QString &newdirr) } else { ok = false; if (mainWin->m_miscDebug) { - QString msg = QString("In else of if parent cwd \"%1\" newdir \"%2\"\n") + QString msg = QString(tr("In else of if parent cwd \"%1\" newdir \"%2\"\n")) .arg(m_cwd) .arg(newdir); Pmsg0(000, msg.toUtf8().data()); @@ -260,6 +277,7 @@ void restorePage::directoryItemChanged(QTreeWidgetItem *currentitem, QTreeWidgetItem * /*previousitem*/) { QString fullpath = m_dirTreeItems.value(currentitem); + statusLine->setText(""); if (fullpath != ""){ cwd(fullpath.toUtf8().data()); fillDirectory(); @@ -268,7 +286,7 @@ void restorePage::directoryItemChanged(QTreeWidgetItem *currentitem, void restorePage::okButtonPushed() { - printf("In restorePage::okButtonPushed\n"); +// printf("In restorePage::okButtonPushed\n"); this->hide(); m_console->write("done"); m_console->notify(true); @@ -283,7 +301,7 @@ void restorePage::cancelButtonPushed() this->hide(); m_console->write("quit"); m_console->displayToPrompt(); - mainWin->set_status("Canceled"); + mainWin->set_status(tr("Canceled")); closeStackPage(); m_console->notify(true); mainWin->resetFocus(); @@ -292,6 +310,7 @@ void restorePage::cancelButtonPushed() void restorePage::fileDoubleClicked(QTreeWidgetItem *item, int column) { char cmd[1000]; + statusLine->setText(""); if (column == 0) { /* mark/unmark */ if (item->data(0, Qt::UserRole).toBool()) { bsnprintf(cmd, sizeof(cmd), "unmark \"%s\"", item->text(1).toUtf8().data()); @@ -339,6 +358,7 @@ void restorePage::upButtonPushed() if (item) { directoryWidget->setCurrentItem(item); } + statusLine->setText(""); } /* @@ -349,7 +369,10 @@ void restorePage::markButtonPushed() QList treeItemList = fileWidget->selectedItems(); QTreeWidgetItem *item; char cmd[1000]; + int count = 0; + statusLine->setText(""); foreach (item, treeItemList) { + count++; bsnprintf(cmd, sizeof(cmd), "mark \"%s\"", item->text(1).toUtf8().data()); item->setIcon(0, QIcon(QString::fromUtf8(":images/check.png"))); m_console->write_dir(cmd); @@ -360,6 +383,11 @@ void restorePage::markButtonPushed() Dmsg1(100, "cmd=%s\n", cmd); m_console->discardToPrompt(); } + if (count == 0) { + mainWin->set_status("Nothing selected, nothing done"); + statusLine->setText("Nothing selected, nothing done"); + } + } /* @@ -370,7 +398,10 @@ void restorePage::unmarkButtonPushed() QList treeItemList = fileWidget->selectedItems(); QTreeWidgetItem *item; char cmd[1000]; + int count = 0; + statusLine->setText(""); foreach (item, treeItemList) { + count++; bsnprintf(cmd, sizeof(cmd), "unmark \"%s\"", item->text(1).toUtf8().data()); item->setIcon(0, QIcon(QString::fromUtf8(":images/unchecked.png"))); m_console->write_dir(cmd); @@ -381,6 +412,11 @@ void restorePage::unmarkButtonPushed() Dmsg1(100, "cmd=%s\n", cmd); m_console->discardToPrompt(); } + if (count == 0) { + mainWin->set_status(tr("Nothing selected, nothing done")); + statusLine->setText(tr("Nothing selected, nothing done")); + } + } /* @@ -391,6 +427,7 @@ bool restorePage::cwd(const char *dir) int stat; char cd_cmd[MAXSTRING]; + statusLine->setText(""); bsnprintf(cd_cmd, sizeof(cd_cmd), "cd \"%s\"", dir); Dmsg2(100, "dir=%s cmd=%s\n", dir, cd_cmd); m_console->write_dir(cd_cmd); @@ -401,7 +438,7 @@ bool restorePage::cwd(const char *dir) Dmsg2(100, "cwd=%s msg=%s\n", m_cwd.toUtf8().data(), m_console->msg()); } else { Dmsg1(000, "stat=%d\n", stat); - QMessageBox::critical(this, "Error", "cd command failed", QMessageBox::Ok); + QMessageBox::critical(this, "Error", tr("cd command failed"), QMessageBox::Ok); } m_console->discardToPrompt(); return true; /* ***FIXME*** return real status */ @@ -420,7 +457,7 @@ char *restorePage::get_cwd() Dmsg2(100, "cwd=%s msg=%s\n", m_cwd.toUtf8().data(), m_console->msg()); } else { Dmsg1(000, "Something went wrong read stat=%d\n", stat); - QMessageBox::critical(this, "Error", ".pwd command failed", QMessageBox::Ok); + QMessageBox::critical(this, "Error", tr(".pwd command failed"), QMessageBox::Ok); } m_console->discardToPrompt(); return m_cwd.toUtf8().data(); diff --git a/bacula/src/qt-console/restore/restoretree.cpp b/bacula/src/qt-console/restore/restoretree.cpp index e999274108..6aa4b54d03 100644 --- a/bacula/src/qt-console/restore/restoretree.cpp +++ b/bacula/src/qt-console/restore/restoretree.cpp @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2007-2007 Free Software Foundation Europe e.V. + Copyright (C) 2007-2008 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. @@ -42,7 +42,7 @@ restoreTree::restoreTree() { setupUi(this); - m_name = "Version Browser"; + m_name = tr("Version Browser"); pgInitialize(); QTreeWidgetItem* thisitem = mainWin->getFromHash(this); thisitem->setIcon(0, QIcon(QString::fromUtf8(":images/browse.png"))); @@ -115,12 +115,12 @@ void restoreTree::setupPage() connect(jobTable, SIGNAL(cellClicked(int, int)), this, SLOT(jobTableCellClicked(int, int))); - QStringList titles = QStringList() << "Directories"; + QStringList titles = QStringList() << tr("Directories"); directoryTree->setHeaderLabels(titles); clientCombo->addItems(m_console->client_list); - fileSetCombo->addItem("Any"); + fileSetCombo->addItem(tr("Any")); fileSetCombo->addItems(m_console->fileset_list); - jobCombo->addItem("Any"); + jobCombo->addItem(tr("Any")); jobCombo->addItems(m_console->job_list); directoryTree->setContextMenuPolicy(Qt::ActionsContextMenu); @@ -139,10 +139,10 @@ void restoreTree::updateRefresh() ); if (m_dropdownChanged) { if (mainWin->m_rtPopDirDebug) Pmsg0(000, "In restoreTree::updateRefresh Is CHANGED\n"); - refreshLabel->setText("Refresh From Re-Select"); + refreshLabel->setText(tr("Refresh From Re-Select")); } else { if (mainWin->m_rtPopDirDebug) Pmsg0(000, "In restoreTree::updateRefresh Is not Changed\n"); - refreshLabel->setText("Refresh From JobChecks"); + refreshLabel->setText(tr("Refresh From JobChecks")); } } @@ -174,11 +174,11 @@ void restoreTree::populateDirectoryTree() prBar1->setVisible(true); prBar1->setRange(0,taskcount); prBar1->setValue(0); - prLabel1->setText("Task " + QString("%1").arg(ontask)+ " of " + QString("%1").arg(taskcount)); + prLabel1->setText(tr("Task %1 of %2").arg(ontask).arg(taskcount)); prLabel1->setVisible(true); prBar2->setVisible(true); prBar2->setRange(0,0); - prLabel2->setText("Querying Database"); + prLabel2->setText(tr("Querying Database")); prLabel2->setVisible(true); repaint(); @@ -192,17 +192,15 @@ void restoreTree::populateDirectoryTree() m_prevDaysCheckState = daysCheckBox->checkState(); updateRefresh(); prBar1->setValue(ontask++); - prLabel1->setText("Task " + QString("%1").arg(ontask)+ " of " + QString("%1").arg(taskcount)); + prLabel1->setText(tr("Task %1 of %2").arg(ontask).arg(taskcount)); prBar2->setValue(0); prBar2->setRange(0,0); - prLabel2->setText("Querying Jobs"); + prLabel2->setText(tr("Querying Jobs")); repaint(); populateJobTable(); - setJobsCheckedList(); - } else { - if (mainWin->m_rtPopDirDebug) Pmsg0(000, "Repopulating from checks in Job Table\n"); - setJobsCheckedList(); } + setJobsCheckedList(); + if (mainWin->m_rtPopDirDebug) Pmsg0(000, "Repopulating from checks in Job Table\n"); if (m_checkedJobs != "") { /* First get the filenameid of where the nae is null. These will be the directories @@ -237,10 +235,10 @@ void restoreTree::populateDirectoryTree() if (mainWin->m_sqlDebug) Pmsg1(000, "Query cmd : %s\n", cmd.toUtf8().data()); prBar1->setValue(ontask++); - prLabel1->setText("Task " + QString("%1").arg(ontask) + " of " + QString("%1").arg(taskcount)); + prLabel1->setText(tr("Task %1 of %2").arg(ontask).arg(taskcount)); prBar2->setValue(0); prBar2->setRange(0,0); - prLabel2->setText("Querying for Directories"); + prLabel2->setText(tr("Querying for Directories")); repaint(); QStringList results; m_directoryPathIdHash.clear(); @@ -248,7 +246,7 @@ void restoreTree::populateDirectoryTree() if (m_console->sql_cmd(cmd, results)) { if (!querydone) { querydone = true; - prLabel2->setText("Processing Directories"); + prLabel2->setText(tr("Processing Directories")); prBar2->setRange(0,results.count()); repaint(); } @@ -278,9 +276,9 @@ void restoreTree::populateDirectoryTree() } } } else { - QMessageBox::warning(this, tr("Bat"), + QMessageBox::warning(this, "Bat", tr("No jobs were selected in the job query !!!.\n" - "Press OK to continue?"), + "Press OK to continue"), QMessageBox::Ok ); } prBar1->setVisible(false); @@ -362,12 +360,13 @@ void restoreTree::parseDirectory(QString &dir_in) } for (int k=0; km_miscDebug) && (m_debugTrap)) Pmsg2(000, "Adding After %s %s\n", pathAfter[k].toUtf8().data(), dirAfter[k].toUtf8().data()); - else + } else { if ((mainWin->m_miscDebug) && (m_debugTrap)) Pmsg2(000, "Error Adding %s %s\n", pathAfter[k].toUtf8().data(), dirAfter[k].toUtf8().data()); + } } } @@ -481,8 +480,8 @@ void restoreTree::refreshButtonPushed() */ void restoreTree::jobComboChanged(int) { - if (jobCombo->currentText() == "Any") { - fileSetCombo->setCurrentIndex(fileSetCombo->findText("Any", Qt::MatchExactly)); + if (jobCombo->currentText() == tr("Any")) { + fileSetCombo->setCurrentIndex(fileSetCombo->findText(tr("Any"), Qt::MatchExactly)); return; } job_defaults job_defs; @@ -510,7 +509,7 @@ void restoreTree::directoryCurrentItemChanged(QTreeWidgetItem *item, QTreeWidget versionTable->setRowCount(0); versionTable->setColumnCount(0); - QStringList headerlist = (QStringList() << "File Name" << "Filename Id"); + QStringList headerlist = (QStringList() << tr("File Name") << tr("Filename Id")); fileTable->setColumnCount(headerlist.size()); fileTable->setHorizontalHeaderLabels(headerlist); fileTable->setRowCount(0); @@ -520,7 +519,7 @@ void restoreTree::directoryCurrentItemChanged(QTreeWidgetItem *item, QTreeWidget this, SLOT(fileTableItemChanged(QTableWidgetItem *))); QBrush blackBrush(Qt::black); QString directory = item->data(0, Qt::UserRole).toString(); - directoryLabel->setText("Present Working Directory : " + directory); + directoryLabel->setText(tr("Present Working Directory: %1").arg(directory)); int pathid = m_directoryPathIdHash.value(directory, -1); if (pathid != -1) { QString cmd = @@ -614,7 +613,8 @@ void restoreTree::fileCurrentItemChanged(QTableWidgetItem *currentFileTableItem, QBrush blackBrush(Qt::black); - QStringList headerlist = (QStringList() << "Job Id" << "Type" << "End Time" << "Md5" << "FileId"); + QStringList headerlist = (QStringList() + << tr("Job Id") << tr("Type") << tr("End Time") << tr("Hash") << tr("FileId")); versionTable->clear(); versionTable->setColumnCount(headerlist.size()); versionTable->setHorizontalHeaderLabels(headerlist); @@ -623,7 +623,7 @@ void restoreTree::fileCurrentItemChanged(QTableWidgetItem *currentFileTableItem, int pathid = m_directoryPathIdHash.value(directory, -1); if ((pathid != -1) && (fileNameId != -1)) { QString cmd = - "SELECT Job.JobId AS JobId, Job.Level AS Type, Job.EndTime AS EndTime, File.Md5 AS MD5, File.FileId AS FileId" + "SELECT Job.JobId AS JobId,Job.Level AS Type,Job.EndTime AS EndTime,File.MD5 AS MD5,File.FileId AS FileId" " FROM File" " INNER JOIN Filename on (Filename.FilenameId=File.FilenameId)" " INNER JOIN Path ON (Path.PathId=File.PathId)" @@ -700,7 +700,7 @@ void restoreTree::writeSettings() */ void restoreTree::readSettings() { - m_groupText = "RestoreTreePage"; + m_groupText = tr("RestoreTreePage"); m_splitText = "splitterSizes_1"; QSettings settings(m_console->m_dir->name(), "bat"); settings.beginGroup(m_groupText); @@ -724,7 +724,7 @@ void restoreTree::directoryItemExpanded(QTreeWidgetItem *item) } /* - * I wanted a table to show what jobs meet the criterion and are being used to + * Show what jobs meet the criteria and are being used to * populate the directory tree and file and version tables. */ void restoreTree::populateJobTable() @@ -732,25 +732,28 @@ void restoreTree::populateJobTable() QBrush blackBrush(Qt::black); if (mainWin->m_rtPopDirDebug) Pmsg0(000, "Repopulating the Job Table\n"); - QStringList headerlist = (QStringList() << "Job Id" << "End Time" << "Level" << "Name" << "Purged" << "TU" << "TD"); - m_toggleUpIndex = headerlist.indexOf("TU"); - m_toggleDownIndex = headerlist.indexOf("TD"); - int purgedIndex = headerlist.indexOf("Purged"); + QStringList headerlist = (QStringList() + << tr("Job Id") << tr("End Time") << tr("Level") + << tr("Name") << tr("Purged") << tr("TU") << tr("TD")); + m_toggleUpIndex = headerlist.indexOf(tr("TU")); + m_toggleDownIndex = headerlist.indexOf(tr("TD")); + int purgedIndex = headerlist.indexOf(tr("Purged")); jobTable->clear(); jobTable->setColumnCount(headerlist.size()); jobTable->setHorizontalHeaderLabels(headerlist); QString jobQuery = - "SELECT Job.Jobid AS Id, Job.EndTime AS EndTime, Job.Level AS Level, Job.Name AS JobName, Job.purgedfiles AS Purged" + "SELECT Job.Jobid AS Id,Job.EndTime AS EndTime,Job.Level AS Level," + "Job.Name AS JobName,Job.purgedfiles AS Purged" " FROM Job" /* INNER JOIN FileSet eliminates all restore jobs */ " INNER JOIN Client ON (Job.ClientId=Client.ClientId)" " INNER JOIN FileSet ON (Job.FileSetId=FileSet.FileSetId)" " WHERE" " Client.Name='" + clientCombo->currentText() + "'"; - if ((jobCombo->currentIndex() >= 0) && (jobCombo->currentText() != "Any")) { + if ((jobCombo->currentIndex() >= 0) && (jobCombo->currentText() != tr("Any"))) { jobQuery += " AND Job.name = '" + jobCombo->currentText() + "'"; } - if ((fileSetCombo->currentIndex() >= 0) && (fileSetCombo->currentText() != "Any")) { + if ((fileSetCombo->currentIndex() >= 0) && (fileSetCombo->currentText() != tr("Any"))) { jobQuery += " AND FileSet.FileSet='" + fileSetCombo->currentText() + "'"; } /* If Limit check box For limit by days is checked */ @@ -1120,7 +1123,7 @@ void restoreTree::versionTableItemChanged(QTableWidgetItem *item) m_versionExceptionHash.remove(fullPath); } else if (prevState != curState) { if (mainWin->m_rtVerTabICDebug) Pmsg2(000, " THE STATE OF THE version Check has changed, Setting StateList[%i] to %i\n", row, curState); - if ((curState == Qt::Checked) || (curState == Qt::PartiallyChecked) && (row != 0)) { + if ((curState == Qt::Checked) || (curState == Qt::PartiallyChecked && row != 0)) { if (mainWin->m_rtVerTabICDebug) Pmsg2(000, "Inserting into m_versionExceptionHash %s, %i\n", fullPath.toUtf8().data(), thisJobNum); m_versionExceptionHash.insert(fullPath, thisJobNum); if (fileState != Qt::Checked) { @@ -1504,9 +1507,9 @@ void restoreTree::restoreButtonPushed() { /* Set progress bars and repaint */ prLabel1->setVisible(true); - prLabel1->setText("Task 1 of 3"); + prLabel1->setText(tr("Task 1 of 3")); prLabel2->setVisible(true); - prLabel2->setText("Processing Checked directories"); + prLabel2->setText(tr("Processing Checked directories")); prBar1->setVisible(true); prBar1->setRange(0, 3); prBar1->setValue(0); @@ -1611,8 +1614,8 @@ void restoreTree::restoreButtonPushed() ++diter; } /* while (*diter) */ prBar1->setValue(1); - prLabel1->setText("Task 2 of 3"); - prLabel2->setText("Processing Exceptions"); + prLabel1->setText( tr("Task 2 of 3")); + prLabel2->setText(tr("Processing Exceptions")); prBar2->setRange(0, 0); repaint(); @@ -1649,8 +1652,8 @@ void restoreTree::restoreButtonPushed() } /* while ftera.hasNext */ /* The progress bars for the next step */ prBar1->setValue(2); - prLabel1->setText("Task 3 of 3"); - prLabel2->setText("Filling Database Table"); + prLabel1->setText(tr("Task 3 of 3")); + prLabel2->setText(tr("Filling Database Table")); prBar2->setRange(0, vFMCounter); vFMCounter = 0; prBar2->setValue(vFMCounter); diff --git a/bacula/technotes-2.4 b/bacula/technotes-2.4 index c1a82ac365..1baa7da3fb 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -3,6 +3,8 @@ General: 05Jul08 +kes Correct bat restore display of multiple drives. This fixes + bug #1117. kes Do find_a_volume() each time an unload is done. This fixes the failure of maxvol2-test. -- 2.39.5