]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/select/select.cpp
Change copyright as per agreement with FSFE
[bacula/bacula] / bacula / src / qt-console / select / select.cpp
index 7c12d342a0de586e2a0f26d822078bbdd2f3fa09..f026920ca1236142163ebd9d54817a11511ff67e 100644 (file)
@@ -1,29 +1,20 @@
 /*
-   Bacula® - The Network Backup Solution
+   Bacula(R) - The Network Backup Solution
 
-   Copyright (C) 2007-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2016 Kern Sibbald
 
-   The main author of Bacula is Kern Sibbald, with contributions from
-   many others, a complete list can be found in the file AUTHORS.
-   This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
-   License as published by the Free Software Foundation and included
-   in the file LICENSE.
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
 
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
+   You may use this file and others of this release according to the
+   license defined in the LICENSE file, which includes the Affero General
+   Public License, v3.0 ("AGPLv3") and some additional permissions and
+   terms pursuant to its AGPLv3 Section 7.
 
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.
+   This notice must be preserved when any source code is 
+   conveyed and/or propagated.
 
-   Bacula® is a registered trademark of Kern Sibbald.
-   The licensor of Bacula is the Free Software Foundation Europe
-   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
-   Switzerland, email:ftf@fsfeurope.org.
+   Bacula(R) is a registered trademark of Kern Sibbald.
 */
  
 /*
@@ -31,7 +22,6 @@
  *
  *   Kern Sibbald, March MMVII
  *
- *  $Id$
  */ 
 
 #include "bat.h"
 /*
  * Read the items for the selection
  */
-selectDialog::selectDialog(Console *console
+selectDialog::selectDialog(Console *console, int conn) : QDialog()
 {
+   m_conn = conn;
    QDateTime dt;
    int stat;
    QListWidgetItem *item;
    int row = 0;
 
    m_console = console;
+   m_console->notify(m_conn, false);
    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 +60,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 +76,7 @@ void selectDialog::reject()
    this->close();
    mainWin->resetFocus();
    m_console->beginNewCommand(m_conn);
+   m_console->notify(m_conn, true);
 }
 
 /*
@@ -103,7 +95,7 @@ void selectDialog::index_change(int index)
 /*
  * Read the items for the selection
  */
-yesnoPopUp::yesnoPopUp(Console *console, int conn) 
+yesnoPopUp::yesnoPopUp(Console *console, int conn)  : QDialog()
 {
    QMessageBox msgBox;
 
@@ -115,10 +107,10 @@ yesnoPopUp::yesnoPopUp(Console *console, int conn)
    console->displayToPrompt(conn);
    switch (msgBox.exec()) {
    case QMessageBox::Yes:
-      console->write_dir("yes");
+      console->write_dir(conn, "yes");
       break;
    case QMessageBox::No:
-      console->write_dir("no");
+      console->write_dir(conn, "no");
       break;
    }
    console->displayToPrompt(conn);