]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/mount/mount.cpp
Did not intend to leave those debugging lines there.
[bacula/bacula] / bacula / src / qt-console / mount / mount.cpp
index 53dc9a919e49288ca39312bd8f740254d4c0ab0f..3f7ec7dda809a3cf4089dd43b4d9e0fdb0578804 100644 (file)
@@ -7,8 +7,8 @@
    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 plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,7 +20,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   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.
@@ -44,12 +44,11 @@ mountDialog::mountDialog(Console *console, QString &storageName)
 {
    m_console = console;
    m_storageName = storageName;
-   m_console->notify(false);
+   m_conn = m_console->notifyOff();
    setupUi(this);
    this->show();
 
-   QString labelText("Storage : ");
-   labelText += storageName;
+   QString labelText( tr("Storage : %1").arg(storageName) );
    storageLabel->setText(labelText);
 }
 
@@ -57,7 +56,7 @@ void mountDialog::accept()
 {
    QString scmd;
    if (m_storageName == "") {
-      QMessageBox::warning(this, "No Storage name", "No Storage name given",
+      QMessageBox::warning(this, tr("No Storage name"), tr("No Storage name given"),
                            QMessageBox::Ok, QMessageBox::Ok);
       return;
    }
@@ -65,17 +64,18 @@ void mountDialog::accept()
    scmd = QString("mount storage=\"%1\" slot=%2")
                   .arg(m_storageName)
                   .arg(slotSpin->value());
-   /* FIXME Make this a user configurable logging action and dont use printf */
-   //printf("sending command : %s\n",scmd.toUtf8().data());
+   if (mainWin->m_commandDebug) {
+      Pmsg1(000, "sending command : %s\n",scmd.toUtf8().data());
+   }
 
-   m_console->display_text("Context sensitive command :\n\n");
+   m_console->display_text( tr("Context sensitive command :\n\n"));
    m_console->display_text("****    ");
    m_console->display_text(scmd + "    ****\n");
-   m_console->display_text("Director Response :\n\n");
+   m_console->display_text(tr("Director Response :\n\n"));
 
    m_console->write_dir(scmd.toUtf8().data());
-   m_console->displayToPrompt();
-   m_console->notify(true);
+   m_console->displayToPrompt(m_conn);
+   m_console->notify(m_conn, true);
    delete this;
    mainWin->resetFocus();
 }
@@ -83,7 +83,7 @@ void mountDialog::accept()
 void mountDialog::reject()
 {
    this->hide();
-   m_console->notify(true);
+   m_console->notify(m_conn, true);
    delete this;
    mainWin->resetFocus();
 }