]> git.sur5r.net Git - bacula/bacula/commitdiff
bat: display a Warning icon when having Errors>0 and Status=T
authorEric Bollengier <eric@eb.homelinux.org>
Sat, 8 Aug 2009 20:12:22 +0000 (22:12 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 10 Aug 2009 21:16:39 +0000 (23:16 +0200)
bacula/src/qt-console/images/W.png [new file with mode: 0644]
bacula/src/qt-console/job/job.cpp
bacula/src/qt-console/main.qrc

diff --git a/bacula/src/qt-console/images/W.png b/bacula/src/qt-console/images/W.png
new file mode 100644 (file)
index 0000000..6d7dbad
Binary files /dev/null and b/bacula/src/qt-console/images/W.png differ
index d321badaba5d50f80a35175248d356472db6f692..f5f2f7fb3c9e2e116ffb2c8535cfb84ecfa9f7f1 100644 (file)
@@ -202,7 +202,7 @@ void Job::populateText()
  */
 void Job::populateForm()
 {
-   QString stat;
+   QString stat, err;
    char buf[256];
    QString query = 
       "SELECT JobId, Job.Name, Level, Client.Name, Pool.Name, FileSet, SchedTime, StartTime, EndTime, "
@@ -233,9 +233,13 @@ void Job::populateForm()
 
          label_JobBytes->setText(convertBytesSI(fld.next().toULongLong()));
          label_JobFiles->setText(fld.next());
-         label_JobErrors->setText(fld.next());
+         err = fld.next();
+         label_JobErrors->setText(err);
 
          stat=fld.next();
+         if (stat == "T" && err.toInt() > 0) {
+            stat = "W";
+         }
          label_JobStatus->setPixmap(QPixmap(":/images/" + stat + ".png"));
          jobstatus_to_ascii_gui(stat[0].toAscii(), buf, sizeof(buf));
          stat = buf;
index 0f9d56ea1688f08f1aadb69218a201a1b11cfd82..b4058f7101045059f9add4f3c2009efc0e7ba608 100644 (file)
@@ -1,5 +1,6 @@
 <RCC>
   <qresource prefix="/" >
+    <file>images/W.png</file>
     <file>images/edit.png</file>
     <file>images/extern.png</file>
     <file>images/intern.png</file>