]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix Restore dlg seg fault + minor cleanups in bat
authorKern Sibbald <kern@sibbald.com>
Thu, 29 Oct 2009 20:40:07 +0000 (21:40 +0100)
committerKern Sibbald <kern@sibbald.com>
Thu, 29 Oct 2009 20:40:07 +0000 (21:40 +0100)
bacula/src/qt-console/bcomm/dircomm.cpp
bacula/src/qt-console/jobgraphs/jobplot.cpp
bacula/src/qt-console/make-win32
bacula/src/qt-console/restore/restore.cpp
bacula/src/qt-console/status/clientstat.cpp

index 86f97478b7e94e1eab52ad9d1a8a8b554929d529..5a3658331310502a239a487a4e5aa6346b3599f1 100644 (file)
@@ -451,7 +451,9 @@ bool DirComm::notify(bool enable)
    bool prev_enabled = false;
    if (m_notifier) {
       prev_enabled = m_notifier->isEnabled();   
-      m_notifier->setEnabled(enable);
+      if (prev_enabled != enable) {
+         m_notifier->setEnabled(enable);
+      }
       if (mainWin->m_connDebug) {
          if (prev_enabled && !enable)
             Pmsg2(000, "m_notifier Disabling notifier: %i %s\n", m_conn, m_console->m_dir->name());
index 2fe38d5f2826f2c97ec941779258ba7d4a2173bb..f2b56735c1609241f4bd86fb17464730bf3dd5ef 100644 (file)
@@ -135,7 +135,7 @@ void JobPlot::reGraph()
 void JobPlot::setupControls()
 {
    QStringList graphType = QStringList() << /* tr("Fitted") <<*/ tr("Sticks")
-                                        << tr("Lines") << tr("Steps") << tr("None");
+                                         << tr("Lines") << tr("Steps") << tr("None");
    controls->plotTypeCombo->addItems(graphType);
 
    fillSymbolCombo(controls->fileSymbolTypeCombo);
@@ -219,7 +219,7 @@ void JobPlot::runQuery()
    int volumeIndex = controls->volumeComboBox->currentIndex();
    if ((volumeIndex != -1) && (controls->volumeComboBox->itemText(volumeIndex) != tr("Any"))) {
       query += " LEFT OUTER JOIN JobMedia ON (JobMedia.JobId=Job.JobId)"
-              " LEFT OUTER JOIN Media ON (JobMedia.MediaId=Media.MediaId)";
+               " LEFT OUTER JOIN Media ON (JobMedia.MediaId=Media.MediaId)";
       conditions.append("Media.VolumeName='" + controls->volumeComboBox->itemText(volumeIndex) + "'");
    }
    comboCond(conditions, controls->fileSetComboBox, "FileSet.FileSet");
@@ -571,6 +571,8 @@ void JobPlot::readSplitterSettings()
 {
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup("JobPlot");
-   if (settings.contains("m_splitterSizes")) { m_splitter->restoreState(settings.value("m_splitterSizes").toByteArray()); }
+   if (settings.contains("m_splitterSizes")) { 
+      m_splitter->restoreState(settings.value("m_splitterSizes").toByteArray());
+   }
    settings.endGroup();
 }
index a0683000a3eb792a305fae542969e1ee85913afe..4b4ed4a27d27e2278b482d0ee909377eb947a0cc 100755 (executable)
@@ -13,4 +13,6 @@ if test -e ../config.h.orig ; then
 fi
 if test -d ../win32/release32; then
    cp -f debug/bat.exe ../win32/release32
+   cp -f ${DEPKGS}/depkgs-mingw32/lib/qt/QtGui4.dll ../win32/release32
+   cp -f ${DEPKGS}/depkgs-mingw32/lib/qt/QtCore4.dll ../win32/release32
 fi
index 557a6d05b4ae9a7cf293e6b16e575aef9c0d04cd..8f30997c931071a7d8f524b33ebeefeef9fe45cb 100644 (file)
@@ -491,7 +491,6 @@ void restorePage::writeSettings()
 {
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup("RestorePage");
-   m_splitText = "splitterSizes_2";
    settings.setValue(m_splitText, splitter->saveState());
    settings.endGroup();
 }
@@ -501,8 +500,11 @@ void restorePage::writeSettings()
  */
 void restorePage::readSettings()
 {
+   m_splitText = "splitterSizes_2";
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup("RestorePage");
-   if (settings.contains(m_splitText)) { splitter->restoreState(settings.value(m_splitText).toByteArray()); }
+   if (settings.contains(m_splitText)) { 
+      splitter->restoreState(settings.value(m_splitText).toByteArray());
+   }
    settings.endGroup();
 }
index 3a1ba5bd67c917ffc28ec2aac2203466ab794064..42d2fdba87eb167cb44abf3bead0ec9d2cdfba60 100644 (file)
@@ -179,8 +179,8 @@ void ClientStat::populateTerminated()
                if (field == "OK")
                   p_tableitem->setBackground(Qt::green);
                else
-                p_tableitem->setBackground(Qt::red);
-           }
+                 p_tableitem->setBackground(Qt::red);
+            }
             terminatedTable->setItem(results.size() - row - 1, column, p_tableitem);
             column += 1;
          }