#include "bat.h"
#include "restore.h"
-restorePage::restorePage(Console *console)
+restorePage::restorePage()
{
QStringList titles;
setupUi(this);
- QTreeWidgetItem *parent = mainWin->getFromHash(console);
- if (!parent) {
- /* Make this a user configurable stdout msg *** FIXME ****/
- printf("Error retrieving tree widget.");
- return;
- }
- m_name = "Restore";
- pgInitialize(parent);
+ m_name = "Restore Select";
+ pgInitialize();
m_console->notify(false); /* this should already be off */
m_closeable = true;
get_cwd();
- //QString root("");
- //addDirectory(root);
fillDirectory();
dockPage();
setCurrent();
this->hide();
m_console->write("done");
m_console->notify(true);
+ setConsoleCurrent();
closeStackPage();
mainWin->resetFocus();
}
{
this->hide();
m_console->write("quit");
+ m_console->displayToPrompt();
mainWin->set_status("Canceled");
closeStackPage();
m_console->notify(true);
m_cwd = m_console->msg();
Dmsg2(100, "cwd=%s msg=%s\n", m_cwd.toUtf8().data(), m_console->msg());
} else {
- Dmsg1(000, "stat=%d\n", stat);
+ Dmsg1(000, "Something went wrong read stat=%d\n", stat);
QMessageBox::critical(this, "Error", ".pwd command failed", QMessageBox::Ok);
- Dmsg1(000, "stat=%d\n", stat);
}
m_console->discardToPrompt();
return m_cwd.toUtf8().data();