]> git.sur5r.net Git - bacula/bacula/commitdiff
Apply pane freezing during updates patch from Riccardo Ghetta.
authorKern Sibbald <kern@sibbald.com>
Wed, 29 Oct 2008 20:42:30 +0000 (20:42 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 29 Oct 2008 20:42:30 +0000 (20:42 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7943 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/AUTHORS
bacula/src/qt-console/clients/clients.cpp
bacula/src/qt-console/fileset/fileset.cpp
bacula/src/qt-console/joblist/joblist.cpp
bacula/src/qt-console/jobs/jobs.cpp
bacula/src/qt-console/medialist/medialist.cpp
bacula/src/qt-console/storage/storage.cpp
bacula/src/qt-console/util/fmtwidgetitem.cpp
bacula/src/qt-console/util/fmtwidgetitem.h
bacula/technotes-2.5

index e2b696d26f86fcd7e876d5f336816f4e4bfba5c0..74d59acefb02fa2da113889b1204775ef8546aff 100644 (file)
@@ -46,6 +46,7 @@ Frank Kardel
 Frank Sweetser
 Howard Thomson
 Jaime Ventura                      
+James Harper
 Jan Kesten
 Joao Henrique Freitas
 John Goerzen
index ff30579a8240665625193e58caf015543a997959..a458c414c738de5936befb9305efe283c808087c 100644 (file)
@@ -76,7 +76,7 @@ void Clients::populateTable()
       return;
    m_populated = true;
 
-   QBrush blackBrush(Qt::black);
+   Freeze frz(*tableWidget); /* disable updating*/
 
    QStringList headerlist = (QStringList() << tr("Client Name") << tr("File Retention")
        << tr("Job Retention") << tr("AutoPrune") << tr("ClientId") << tr("Uname") );
index 4ca07c1c07e8078c124acb6e231c6a82425d9018..20e819260512cefda4db792ff608f9f830560116 100644 (file)
@@ -75,7 +75,7 @@ void FileSet::populateTable()
        return;
    m_populated = true;
 
-   QBrush blackBrush(Qt::black);
+   Freeze frz(*tableWidget); /* disable updating*/
 
    m_checkcurwidget = false;
    tableWidget->clear();
index 91c13e355e3da9669242131bd4fe58d3af722245..56078a5d0d8be4f78bd7332a7bdaff8f2357ac63 100644 (file)
@@ -115,6 +115,8 @@ void JobList::populateTable()
    prepareFilterWidgets();
    m_populated = true;
 
+   Freeze frz(*mp_tableWidget); /* disable updating*/
+
    /* Set up query */
    QString query;
    fillQueryString(query);
index ed1d653471a9bb66a3305e6bfc060756a8374cca..777a6f459e29573882d08f62944e3a02fea5d4ef 100644 (file)
@@ -72,6 +72,9 @@ void Jobs::populateTable()
    if (!m_console->preventInUseConnect())
       return;
    m_populated = true;
+
+   Freeze frz(*tableWidget); /* disable updating*/
+
    QBrush blackBrush(Qt::black);
    m_checkcurwidget = false;
    tableWidget->clear();
index ab1a877f8974912354dbb537cc903af0d35ded21..90a6acdb791aa1699911c7b791bf809fed851fd0 100644 (file)
@@ -80,11 +80,11 @@ void MediaList::populateTree()
       writeExpandedSettings();
    m_populated = true;
 
-   QTreeWidgetItem *pooltreeitem;
-
    if (!m_console->preventInUseConnect())
        return;
 
+   Freeze frz(*mp_treeWidget); /* disable updating*/
+
    QStringList headerlist = (QStringList()
       << tr("Volume Name") << tr("Id") << tr("Status") << tr("Enabled") << tr("Bytes") << tr("Files")
       << tr("Jobs") << tr("Retention") << tr("Media Type") << tr("Slot") << tr("Use Duration")
@@ -106,6 +106,7 @@ void MediaList::populateTree()
    settings.beginGroup("MediaListTreeExpanded");
    QString query;
 
+   QTreeWidgetItem *pooltreeitem;
    foreach (QString pool_listItem, m_console->pool_list) {
       pooltreeitem = new QTreeWidgetItem(m_topItem);
       pooltreeitem->setText(0, pool_listItem);
index c6fe69c922622c1d6f9f32b6079568fe6453518b..4c6c7dce12324b0d3e53b7dadaca56280723dfd1 100644 (file)
@@ -81,6 +81,8 @@ void Storage::populateTree()
       writeExpandedSettings();
    m_populated = true;
 
+   Freeze frz(*mp_treeWidget); /* disable updating*/
+
    m_checkcurwidget = false;
    mp_treeWidget->clear();
    m_checkcurwidget = true;
index 18d49fd6a584f7152dd5c6b64d58aa0dc809f220..476e931a7413af5d19477d256f53a71cf4859ddc 100644 (file)
@@ -63,6 +63,24 @@ QString convertJobStatus(const QString &sts)
    return QString(buf);
 }
 
+/*
+ * disable widget updating
+ */
+Freeze::Freeze(QWidget &q):
+qw(&q)
+{
+   QApplication::setOverrideCursor(Qt::WaitCursor);
+   qw->setUpdatesEnabled(false); 
+}
+
+Freeze::~Freeze()
+{
+   if (qw) {
+      qw->setUpdatesEnabled(true); 
+      QApplication::restoreOverrideCursor();
+   }
+}
+
 /***********************************************
  *
  * ItemFormatterBase static members
index 6acc0cb317d49147186f271bb909ba78bd0d2018..af44c23100edec62e2992f69c72bc07f9392b9c4 100644 (file)
@@ -33,6 +33,7 @@
  *   TreeView formatting helpers - Riccardo Ghetta, May 2008 
  */
 
+class QWidget;
 class QTreeWidgetItem;
 class QTableWidget;
 class QTableWidgetItem;
@@ -46,6 +47,20 @@ class QBrush;
  */
 QString convertJobStatus(const QString &sts);
 
+/*
+ * disable widget updating
+ */
+class Freeze
+{
+private:
+   QWidget *qw;
+
+ public:
+   Freeze(QWidget &q);
+   ~Freeze();
+};
+
+
 
 /*
  * base class for formatters
index 2b079d2bc04ef50805815382a9cd3678c510befe..e5acfaad41958961d873d1a93635e9a2e8cac53c 100644 (file)
@@ -11,6 +11,7 @@ mixed priorities
 
 General:
 29Oct08
+kes  Apply pane freezing during updates patch from Riccardo Ghetta.
 kes  Rework next_vol and autoprune a bit due to failure in
      recycle-test.  prune_volumes() now returns no status,
      but should prune at least one Volume, if possible.