/*
- Bacula® - The Network Backup Solution
-
- Copyright (C) 2007-2009 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.
- 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 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
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
-
- 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.
+ Bacula(R) - The Network Backup Solution
+
+ Copyright (C) 2000-2015 Kern Sibbald
+ Copyright (C) 2007-2010 Free Software Foundation Europe e.V.
+
+ The original author of Bacula is Kern Sibbald, with contributions
+ from many others, a complete list can be found in the file AUTHORS.
+
+ You may use this file and others of this release according to the
+ license defined in the LICENSE file, which includes the Affero General
+ Public License, v3.0 ("AGPLv3") and some additional permissions and
+ terms pursuant to its AGPLv3 Section 7.
+
+ This notice must be preserved when any source code is
+ conveyed and/or propagated.
+
+ Bacula(R) is a registered trademark of Kern Sibbald.
*/
/*
- * 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
*/
ClientStat::ClientStat(QString &client, QTreeWidgetItem *parentTreeWidgetItem)
+ : Pages()
{
m_client = client;
setupUi(this);
- m_closeable = true;
pgInitialize(tr("Client Status %1").arg(m_client), parentTreeWidgetItem);
QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/status.png")));
{
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);
}
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;
}
}
/*
- * 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()