]> git.sur5r.net Git - bacula/bacula/commitdiff
Update
authorKern Sibbald <kern@sibbald.com>
Mon, 29 Jan 2007 18:59:34 +0000 (18:59 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 29 Jan 2007 18:59:34 +0000 (18:59 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4078 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/console/console.cpp

index b2ae2e9e8b1015b886db39783d43812f8ddb9776..9472af502bf43638df2f6e00561631212370541c 100644 (file)
@@ -71,7 +71,8 @@ Console::Console()
    m_consoleItem = item;
    item->setText(0, "Console");
    item->setText(1, "0");
-   item->setIcon(0, QIcon(QString::fromUtf8("images/disconnected.png")));
+   QBrush redBrush(Qt::red);
+   item->setForeground(0, redBrush);
    item = new QTreeWidgetItem(topItem);
    item->setText(0, "Restore");
    item->setText(1, "1");
@@ -117,7 +118,8 @@ void Console::connect()
       return;
    } else {
       mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/connected.png")));
-      m_consoleItem->setIcon(0, QIcon(QString::fromUtf8("images/connected.png")));
+      QBrush greenBrush(Qt::green);
+      m_consoleItem->setForeground(0, greenBrush);
    }
 
 
@@ -199,7 +201,8 @@ void Console::write_dir(const char *msg)
    } else {
       mainWin->set_status(" Director not connected. Click on connect button.");
       mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/disconnected.png")));
-      m_consoleItem->setIcon(0, QIcon(QString::fromUtf8("images/disconnected.png")));
+      QBrush redBrush(Qt::red);
+      m_consoleItem->setForeground(0, redBrush);
    }
 }
 
@@ -224,7 +227,8 @@ void Console::read_dir(int fd)
       bnet_close(m_sock);
       m_sock = NULL;
       mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/disconnected.png")));
-      m_consoleItem->setIcon(0, QIcon(QString::fromUtf8("images/disconnected.png")));
+      QBrush redBrush(Qt::red);
+      m_consoleItem->setForeground(0, redBrush);
       m_notifier->setEnabled(false);
       delete m_notifier;
       m_notifier = NULL;