/*
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.
*
*/
-//#include <QAbstractEventDispatcher>
#include "bat.h"
#include "console.h"
#include "restore.h"
void Console::terminate()
{
if (m_sock) {
+ notify(false);
+ delete m_notifier;
+ m_notifier = NULL;
stopTimer();
m_sock->close();
m_sock = NULL;
}
}
switch (m_sock->msglen) {
- case BNET_MSGS_PENDING:
- if (mainWin->m_commDebug) Pmsg0(000, "MSGS PENDING\n");
- write_dir(".messages");
- displayToPrompt();
- m_messages_pending = false;
+ case BNET_MSGS_PENDING :
+ if (m_notifier->isEnabled()) {
+ if (mainWin->m_commDebug) Pmsg0(000, "MSGS PENDING\n");
+ write_dir(".messages");
+ displayToPrompt();
+ m_messages_pending = false;
+ }
+ m_messages_pending = true;
continue;
case BNET_CMD_OK:
if (mainWin->m_commDebug) Pmsg0(000, "CMD OK\n");
if (mainWin->m_commDebug) Pmsg0(000, "START SELECT\n");
new selectDialog(this);
break;
+ case BNET_YESNO:
+ if (mainWin->m_commDebug) Pmsg0(000, "YESNO\n");
+ new yesnoPopUp(this);
+ break;
case BNET_RUN_CMD:
if (mainWin->m_commDebug) Pmsg0(000, "RUN CMD\n");
new runCmdPage();
break;
+ case BNET_START_RTREE:
+ if (mainWin->m_commDebug) Pmsg0(000, "START RTREE CMD\n");
+ new restorePage();
+ break;
+ case BNET_END_RTREE:
+ if (mainWin->m_commDebug) Pmsg0(000, "END RTREE CMD\n");
+ break;
case BNET_ERROR_MSG:
if (mainWin->m_commDebug) Pmsg0(000, "ERROR MSG\n");
m_sock->recv(); /* get the message */