/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2010 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.
Switzerland, email:ftf@fsfeurope.org.
*/
/*
- * Version $Id: clientstat.cpp 5880 2007-11-09 01:20:40Z bartleyd2 $
*
* Dirk Bartley, March 2007
*/
#include <QTableWidgetItem>
#include "clientstat.h"
+/* This probably should be on a mutex */
+static bool working = false; /* prevent timer recursion */
+
/*
* Constructor for the class
*/
{
double value = timerDisplay->value();
value -= 1;
- if (value == 0) {
+ if (value <= 0 && !working) {
+ working = true;
value = spinBox->value();
bool iscurrent = mainWin->tabWidget->currentIndex() == mainWin->tabWidget->indexOf(this);
if (((isDocked() && iscurrent) || (!isDocked())) && (checkBox->checkState() == Qt::Checked)) {
populateAll();
}
+ working = false;
}
timerDisplay->display(value);
}
}
/*
- * When the treeWidgetItem in the page selector tree is singleclicked, Make sure
+ * When the treeWidgetItem in the page selector tree is single clicked, Make sure
* The tree has been populated.
*/
void ClientStat::PgSeltreeWidgetClicked()
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2010 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.
Switzerland, email:ftf@fsfeurope.org.
*/
/*
- * Version $Id: dirstat.cpp 5880 2007-11-09 01:20:40Z bartleyd2 $
*
* Dirk Bartley, March 2007
*/
#include <QTableWidgetItem>
#include "dirstat.h"
+static bool working = false; /* prevent timer recursion */
+
/*
* Constructor for the class
*/
{
double value = timerDisplay->value();
value -= 1;
- if (value == 0) {
+ if (value <= 0 && !working) {
+ working = true;
value = spinBox->value();
bool iscurrent = mainWin->tabWidget->currentIndex() == mainWin->tabWidget->indexOf(this);
if (((isDocked() && iscurrent) || ((!isDocked()) && isOnceDocked())) && (checkBox->checkState() == Qt::Checked)) {
populateAll();
}
+ working = false;
}
timerDisplay->display(value);
}
p_tableitem->setBackground(Qt::green);
else
p_tableitem->setBackground(Qt::red);
- }
+ }
terminatedTable->setItem(results.size() - row - 1, column, p_tableitem);
column += 1;
}
/*
Bacula® - The Network Backup Solution
- Copyright (C) 2007-2009 Free Software Foundation Europe e.V.
+ Copyright (C) 2007-2010 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.
Switzerland, email:ftf@fsfeurope.org.
*/
/*
- * Version $Id: storstat.cpp 5880 2007-11-09 01:20:40Z bartleyd2 $
*
* Dirk Bartley, March 2007
*/
#include "mount/mount.h"
#include "label/label.h"
+static bool working = false; /* prevent timer recursion */
+
/*
.status storage=<storage-name> <keyword>
where <storage-name> is the storage name in the Director, and
{
double value = timerDisplay->value();
value -= 1;
- if (value == 0) {
+ if (value <= 0 && !working) {
+ working = true;
value = spinBox->value();
bool iscurrent = mainWin->tabWidget->currentIndex() == mainWin->tabWidget->indexOf(this);
if (((isDocked() && iscurrent) || (!isDocked())) && (checkBox->checkState() == Qt::Checked)) {
populateAll();
}
+ working = false;
}
timerDisplay->display(value);
}
p_tableitem->setBackground(Qt::green);
else
p_tableitem->setBackground(Qt::red);
- }
+ }
terminatedTable->setItem(row, column, p_tableitem);
column += 1;
}