From 66dee6a3c21f9523b8149b15a9b2014f952c3ca0 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Mon, 27 Apr 2009 23:43:34 +0000 Subject: [PATCH] This is the fix to http://bugs.bacula.org/view.php?id=1276. The select class was just not working with the new requirements of setting and clearing the notify. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8755 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/bcomm/dircomm.cpp | 3 ++- bacula/src/qt-console/select/select.cpp | 9 +++++---- bacula/src/qt-console/select/select.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bacula/src/qt-console/bcomm/dircomm.cpp b/bacula/src/qt-console/bcomm/dircomm.cpp index 700d53dc15..3877944253 100644 --- a/bacula/src/qt-console/bcomm/dircomm.cpp +++ b/bacula/src/qt-console/bcomm/dircomm.cpp @@ -353,8 +353,9 @@ int DirComm::read() } continue; case BNET_START_SELECT: + notify(false); if (mainWin->m_commDebug) Pmsg1(000, "conn %i START SELECT\n", m_conn); - new selectDialog(m_console); + new selectDialog(m_console, m_conn); break; case BNET_YESNO: if (mainWin->m_commDebug) Pmsg1(000, "conn %i YESNO\n", m_conn); diff --git a/bacula/src/qt-console/select/select.cpp b/bacula/src/qt-console/select/select.cpp index 9d6cd5a0e6..eaa138afda 100644 --- a/bacula/src/qt-console/select/select.cpp +++ b/bacula/src/qt-console/select/select.cpp @@ -40,8 +40,9 @@ /* * Read the items for the selection */ -selectDialog::selectDialog(Console *console) +selectDialog::selectDialog(Console *console, int conn) { + m_conn = conn; QDateTime dt; int stat; QListWidgetItem *item; @@ -51,7 +52,6 @@ selectDialog::selectDialog(Console *console) setupUi(this); connect(listBox, SIGNAL(currentRowChanged(int)), this, SLOT(index_change(int))); setAttribute(Qt::WA_DeleteOnClose); - m_conn = m_console->notifyOff(); m_console->read(m_conn); /* get title */ labelWidget->setText(m_console->msg(m_conn)); while ((stat=m_console->read(m_conn)) > 0) { @@ -69,12 +69,12 @@ void selectDialog::accept() this->hide(); bsnprintf(cmd, sizeof(cmd), "%d", m_index+1); - m_console->write_dir(cmd); + m_console->write_dir(m_conn, cmd); m_console->displayToPrompt(m_conn); this->close(); mainWin->resetFocus(); m_console->displayToPrompt(m_conn); - + m_console->notify(m_conn, true); } @@ -85,6 +85,7 @@ void selectDialog::reject() this->close(); mainWin->resetFocus(); m_console->beginNewCommand(m_conn); + m_console->notify(m_conn, true); } /* diff --git a/bacula/src/qt-console/select/select.h b/bacula/src/qt-console/select/select.h index 21be1b1518..1d3aabbb99 100644 --- a/bacula/src/qt-console/select/select.h +++ b/bacula/src/qt-console/select/select.h @@ -11,7 +11,7 @@ class selectDialog : public QDialog, public Ui::selectForm Q_OBJECT public: - selectDialog(Console *console); + selectDialog(Console *console, int conn); public slots: void accept(); -- 2.39.5