]> git.sur5r.net Git - bacula/bacula/commitdiff
bat: display a Warning symbole 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>
Sat, 8 Aug 2009 20:12:22 +0000 (22:12 +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 ec9ef8d122499a7cda4525cc6d80fec69e2657b4..3b170323e0aca78ea432c97e27da6ee368892463 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>