From 53ebf748e04adbbbc3d29da627a237df2442df69 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 29 Jan 2007 18:59:34 +0000 Subject: [PATCH] Update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4078 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/console/console.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index b2ae2e9e8b..9472af502b 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -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; -- 2.39.5