* Version $Id$
*/
/*
- Copyright (C) 2004-2006 Kern Sibbald
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- version 2 as amended with additional clauses defined in the
- file LICENSE in the main source directory.
-
- 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
- the file LICENSE for additional details.
-
- */
+ Bacula® - The Network Backup Solution
+
+ Copyright (C) 2004-2006 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 and included
+ 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.
+*/
/* Note concerning "done" output (modifiable marked with +)
Run Restore job
Select parameter to modify (1-11):
*/
+/* Windows debug builds set _DEBUG which is used by wxWidgets to select their
+ * debug memory allocator. Unfortunately it conflicts with Bacula's SmartAlloc.
+ * So we turn _DEBUG off since we aren't interested in things it enables.
+ */
+
#undef _DEBUG
#include "bacula.h"
+
#include "wxbrestorepanel.h"
#include "wxbmainframe.h"
#include "csprint.h"
}
int res = ::wxGetSingleChoiceIndex(message,
- _("wx-console: unexpected restore question."), n, choices, this);
+ _("bwx-console: unexpected restore question."), n, choices, this);
if (res == -1) {
delete promptparser;
promptparser = wxbUtils::WaitForPrompt(wxT(".\n"), true);
delete promptparser;
promptparser = wxbUtils::WaitForPrompt(::wxGetTextFromUser(message,
- _("wx-console: unexpected restore question."),
+ _("bwx-console: unexpected restore question."),
wxT(""), this) + wxT("\n"));
}
}
int j;
for (i = 0; i < dt->GetCount(); i++) {
- if ((j = (*dt)[i].Find(_("Job started. JobId="))) > -1) {
+ if ((j = (*dt)[i].Find(_("Job queued. JobId="))) > -1) {
jobid = (*dt)[i].Mid(j+19);
- wxbMainFrame::GetInstance()->SetStatusText(_("Restore started, jobid=") + jobid);
+ wxbMainFrame::GetInstance()->SetStatusText(_("Restore queued, jobid=") + jobid);
break;
}
}
if (scheduledtime.Subtract(currenttime).IsLongerThan(wxTimeSpan::Seconds(150))) {
- wxbMainFrame::GetInstance()->Print(_("Restore is scheduled in more than two minutes, wx-console will not wait for its completion.\n"), CS_DEBUG);
- wxbMainFrame::GetInstance()->SetStatusText(_("Restore is scheduled in more than two minutes, wx-console will not wait for its completion."));
+ wxbMainFrame::GetInstance()->Print(_("Restore is scheduled in more than two minutes, bwx-console will not wait for its completion.\n"), CS_DEBUG);
+ wxbMainFrame::GetInstance()->SetStatusText(_("Restore is scheduled in more than two minutes, bwx-console will not wait for its completion."));
SetStatus(finished);
return;
}
}
if ((!waitforever) && (sw.Time() > 60000)) {
- wxbMainFrame::GetInstance()->Print(_("The restore job has not been started within one minute, wx-console will not wait for its completion anymore.\n"), CS_DEBUG);
- wxbMainFrame::GetInstance()->SetStatusText(_("The restore job has not been started within one minute, wx-console will not wait for its completion anymore."));
+ wxbMainFrame::GetInstance()->Print(_("The restore job has not been started within one minute, bwx-console will not wait for its completion anymore.\n"), CS_DEBUG);
+ wxbMainFrame::GetInstance()->SetStatusText(_("The restore job has not been started within one minute, bwx-console will not wait for its completion anymore."));
break;
}
}
wxString file;
if (dir != wxT("/")) {
- if (dir.GetChar(dir.Length()-1) == '/') {
+ if (IsPathSeparator(dir.GetChar(dir.Length()-1))) {
dir.RemoveLast();
}
wxTreeItemId treeid;
- if (entry.fullname.GetChar(entry.fullname.Length()-1) == '/') {
+ if (IsPathSeparator(entry.fullname.GetChar(entry.fullname.Length()-1))) {
wxString itemStr;
#if wxCHECK_VERSION(2, 6, 0)
entry->fullname = tkz.GetString();
/* Get only the filename (cut path by finding the last '/') */
- if (entry->fullname.GetChar(entry->fullname.Length()-1) == '/') {
+ if (IsPathSeparator(entry->fullname.GetChar(entry->fullname.Length()-1))) {
wxString tmp = entry->fullname;
tmp.RemoveLast();
entry->filename = entry->fullname.Mid(tmp.Find('/', true)+1);
restorePanel->SetRowString(_("Storage"), (*dt)[i].Mid(10).Trim(false).RemoveLast());
if ((k = (*dt)[++i].Find(_("When:"))) != 0) return false;
restorePanel->SetRowString(_("When"), (*dt)[i].Mid(10).Trim(false).RemoveLast());
+ i++; /* Skip catalog field */
if ((k = (*dt)[++i].Find(_("Priority:"))) != 0) return false;
restorePanel->SetRowString(_("Priority"), (*dt)[i].Mid(10).Trim(false).RemoveLast());
cfgUpdated = 0;
long cookie;
#endif
- if (name.GetChar(name.Length()-1) == '/') {
+ if (IsPathSeparator(name.GetChar(name.Length()-1))) {
wxTreeItemId currentChild = tree->GetFirstChild(currentTreeItem, cookie);
while (currentChild.IsOk()) {