]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/restore/prerestore.cpp
Convert to pure GPL v2 license.
[bacula/bacula] / bacula / src / qt-console / restore / prerestore.cpp
index 9b065762a33449119f331a5404d90691ea99f33a..9e9f3e20c9448156fe8c9eabaea8d1a2a5e296d2 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
@@ -59,12 +59,13 @@ prerestorePage::prerestorePage()
  */
 void prerestorePage::buildPage()
 {
-   m_dtformat = "yyyy-MM-dd HH:mm:ss";
    m_name = "Restore";
    setupUi(this);
    pgInitialize();
    m_console->notify(false);
    m_closeable = true;
+   QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
+   thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/restore.png")));
 
    if (!m_console->preventInUseConnect())
        return;
@@ -77,7 +78,7 @@ void prerestorePage::buildPage()
    storageCombo->addItems(m_console->storage_list);
    /* current or before . .  Start out with current checked */
    recentCheckBox->setCheckState(Qt::Checked);
-   beforeDateTime->setDisplayFormat(m_dtformat);
+   beforeDateTime->setDisplayFormat(mainWin->m_dtformat);
    beforeDateTime->setDateTime(QDateTime::currentDateTime());
    beforeDateTime->setEnabled(false);
    selectFilesRadio->setChecked(true);
@@ -109,7 +110,7 @@ void prerestorePage::buildPage()
          filesetCombo->setCurrentIndex(filesetCombo->findText(fieldlist[2], Qt::MatchExactly));
          clientCombo->setCurrentIndex(clientCombo->findText(fieldlist[1], Qt::MatchExactly));
          jobCombo->setCurrentIndex(jobCombo->findText(fieldlist[0], Qt::MatchExactly));
-         beforeDateTime->setDateTime(QDateTime::fromString(fieldlist[3], m_dtformat));
+         beforeDateTime->setDateTime(QDateTime::fromString(fieldlist[3], mainWin->m_dtformat));
      }
    }
    job_name_change(0);
@@ -153,7 +154,7 @@ void prerestorePage::okButtonPushed()
          cmd += " current";
       } else {
          QDateTime stamp = beforeDateTime->dateTime();
-         QString before = stamp.toString(m_dtformat);
+         QString before = stamp.toString(mainWin->m_dtformat);
          cmd += " before=\"" + before + "\"";
       }
    } else {