]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/select/select.cpp
Check for job_canceled() in fd_plugin code
[bacula/bacula] / bacula / src / qt-console / select / select.cpp
index 7c12d342a0de586e2a0f26d822078bbdd2f3fa09..eaa138afda9aaf86cb533726a194e85d97e7c4a8 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2007-2009 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.
@@ -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);
 }
 
 /*