]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/status/dirstat.cpp
Add preference to have the status dir screen auto refresh.
[bacula/bacula] / bacula / src / qt-console / status / dirstat.cpp
index beac7fea94e5ca77df1299669c82e33da5250305..a12c833f9db823a4879df880a889c6ce1078ee7f 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2007-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2007-2008 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.
@@ -42,7 +42,7 @@
 DirStat::DirStat()
 {
    setupUi(this);
-   m_name = "Director Status";
+   m_name = tr("Director Status");
    m_closeable = true;
    pgInitialize();
    QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
@@ -53,8 +53,7 @@ DirStat::DirStat()
    dockPage();
    m_timer = new QTimer(this);
    QWidget::connect(m_timer, SIGNAL(timeout()), this, SLOT(timerTriggered()));
-   //m_timer->start(mainWin->m_checkMessagesInterval*1000);
-   m_timer->start(10*1000);
+   m_timer->start(mainWin->m_refreshStatusDirInterval*1000);
 }
 
 void DirStat::getFont()
@@ -99,7 +98,7 @@ void DirStat::populateAll()
 void DirStat::timerTriggered()
 {
    bool iscurrent = mainWin->stackedWidget->currentIndex() == mainWin->stackedWidget->indexOf(this);
-   if ((isDocked() && iscurrent) || (!isDocked())) {
+   if (((isDocked() && iscurrent) || (!isDocked())) && mainWin->m_refreshStatusDir) {
       if (m_console->is_ready())
          populateAll();
    }
@@ -133,8 +132,9 @@ void DirStat::populateTerminated()
 
    terminatedTable->clear();
    QStringList headerlist = (QStringList()
-      << "Job Id" << "Job Level" << "Job Files" << "Job Bytes" << "Job Status"
-      << "Job Time" << "Job Name");
+      << tr("Job Id") << tr("Job Level") << tr("Job Files")
+      << tr("Job Bytes") << tr("Job Status") << tr("Job Time") 
+      << tr("Job Name"));
    QStringList flaglist = (QStringList()
       << "R" << "L" << "R" << "R" << "LC" 
       << "L" << "L");
@@ -186,7 +186,8 @@ void DirStat::populateScheduled()
 
    scheduledTable->clear();
    QStringList headerlist = (QStringList()
-      << "Job Level" << "Job Type" << "Priority" << "Job Time" << "Job Name" << "Volume");
+      << tr("Job Level") << tr("Job Type") << tr("Priority") << tr("Job Time") 
+      << tr("Job Name") << tr("Volume"));
    QStringList flaglist = (QStringList()
       << "L" << "L" << "R" << "L" << "L" << "L");
 
@@ -230,7 +231,7 @@ void DirStat::populateRunning()
 
    runningTable->clear();
    QStringList headerlist = (QStringList()
-      << "Job Id" << "Job Level" << "Job Data" << "Job Info");
+      << tr("Job Id") << tr("Job Level") << tr("Job Data") << tr("Job Info"));
 
    runningTable->setColumnCount(headerlist.size());
    runningTable->setHorizontalHeaderLabels(headerlist);