/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2010 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.
*/
/*
- * Version $Id$
*
* Main Window control for bat (qt-console)
*
#include "restore/restoretree.h"
#include "help/help.h"
#include "jobs/jobs.h"
+#include "medialist/mediaview.h"
#ifdef HAVE_QWT
#include "jobgraphs/jobplot.h"
#endif
readSettings();
- foreach(Console *console, m_consoleHash)
+ foreach(Console *console, m_consoleHash) {
console->connect_dir();
+ }
m_currentConsole = (Console*)getFromHash(m_firstItem);
- QTimer::singleShot(750, this, SLOT(popLists()));
+ QTimer::singleShot(5000, this, SLOT(popLists()));
if (m_miscDebug) {
QString directoryResourceName;
m_currentConsole->getDirResName(directoryResourceName);
Pmsg1(100, "Setting initial window to %s\n", directoryResourceName.toUtf8().data());
}
+ app->restoreOverrideCursor();
}
void MainWin::popLists()
{
- foreach(Console *console, m_consoleHash)
+ foreach(Console *console, m_consoleHash) {
console->populateLists(true);
- app->restoreOverrideCursor();
+ }
m_doConnect = true;
connectConsoleSignals();
connectSignals();
+ app->restoreOverrideCursor();
m_currentConsole->setCurrent();
}
*/
QBrush redBrush(Qt::red);
item->setForeground(0, redBrush);
- m_currentConsole->dockPage();
/*
* Create instances in alphabetic order of the rest
new JobPlot(NULL, pass);
#endif
new MediaList();
+ new MediaView();
new Storage();
if (m_openBrowser)
new restoreTree();
treeWidget->expandItem(topItem);
tabWidget->setCurrentWidget(m_currentConsole);
+ m_currentConsole->undockPage();
+ m_currentConsole->dockPage();
}
UnlockRes();
}
{
m_waitState = false;
if (mainWin->m_connDebug) Pmsg0(000, "Exiting Wait State\n");
- app->restoreOverrideCursor();
if (m_waitTreeItem != treeWidget->currentItem())
treeWidget->setCurrentItem(m_waitTreeItem);
if (m_doConnect) {
connectSignals();
connectConsoleSignals();
}
+ app->restoreOverrideCursor();
}
void MainWin::connectConsoleSignals()
QString cmdStr = lineEdit->text(); /* Get the text */
lineEdit->clear(); /* clear the lineEdit box */
if (m_currentConsole->is_connected()) {
- if (m_currentConsole->currentDirComm(conn)) {
+ if (m_currentConsole->findDirComm(conn)) {
m_currentConsole->consoleCommand(cmdStr, conn);
} else {
/* Use consoleCommand to allow typing anything */
Pages* page = (Pages*)tabWidget->currentWidget();
/* run the virtual function in case this class overrides it */
page->currentStackItem();
+ if (!m_waitState) {
+ disconnect(treeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(treeItemClicked(QTreeWidgetItem *, int)));
+ disconnect(treeWidget, SIGNAL( currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)));
+ treeWidget->setCurrentItem(getFromHash(page));
+ connect(treeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(treeItemClicked(QTreeWidgetItem *, int)));
+ connect(treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)));
+ }
}
/*