]> git.sur5r.net Git - bacula/bacula/commitdiff
Toggle connect/disconnect icon
authorKern Sibbald <kern@sibbald.com>
Mon, 29 Jan 2007 11:05:56 +0000 (11:05 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 29 Jan 2007 11:05:56 +0000 (11:05 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4073 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/Makefile
bacula/src/qt-console/console/console.cpp
bacula/src/qt-console/main.ui

index 0a9d204bc75224476f06b370c2e9230149c33f2f..c42a72180ccc745aaf8c9254b4938063c0be0aba 100644 (file)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: bat
-# Generated by qmake (2.01a) (Qt 4.2.1) on: Mon Jan 29 10:12:52 2007
+# Generated by qmake (2.01a) (Qt 4.2.1) on: Mon Jan 29 12:01:29 2007
 # Project:  bat.pro
 # Template: app
 # Command: /usr/bin/qmake -unix -o Makefile bat.pro
@@ -192,12 +192,13 @@ compiler_rcc_clean:
 qrc_main.cpp: main.qrc \
                /usr/bin/rcc \
                images/new.png \
+               images/disconnected.png \
                images/label.png \
                images/server.png \
                images/restore.png \
                images/copy.png \
                images/cut.png \
-               images/connect.png \
+               images/connected.png \
                images/big-server.png \
                images/save.png \
                images/bat.png \
index ba6fa7d00239d6ff198c6fa95451b129c7e3eb18..d8d7898ea06c8a62635aa1d0c5f892b25468f7a0 100644 (file)
@@ -47,6 +47,7 @@ Console::Console()
    m_at_prompt = false;
    m_textEdit = mainWin->textEdit;   /* our console screen */
    m_cursor = new QTextCursor(m_textEdit->document());
+   mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/disconnected.png")));
 
    /* ***FIXME*** make this configurable */
    font.setFamily("Courier");
@@ -111,8 +112,11 @@ void Console::connect()
    if (m_sock == NULL) {
       mainWin->set_status("Connection failed");
       return;
+   } else {
+      mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/connected.png")));
    }
 
+
    jcr.dir_bsock = m_sock;
 
    if (!authenticate_director(&jcr, m_dir, cons)) {
@@ -190,6 +194,7 @@ void Console::write_dir(const char *msg)
       bnet_send(m_sock);
    } else {
       mainWin->set_status(" Director not connected. Click on connect button.");
+      mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/disconnected.png")));
    }
 }
 
@@ -213,6 +218,7 @@ void Console::read_dir(int fd)
    if (is_bnet_stop(m_sock)) {         /* error or term request */
       bnet_close(m_sock);
       m_sock = NULL;
+      mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/disconnected.png")));
       m_notifier->setEnabled(false);
       delete m_notifier;
       m_notifier = NULL;
index bf789253099d2a629bc0ad0e89d7669b4440b896..121158edafabd0b1c8f4d80e9bcab916391e4700 100644 (file)
   </action>
   <action name="actionConnect" >
    <property name="icon" >
-    <iconset>images/connect.png</iconset>
+    <iconset>images/disconnected.png</iconset>
    </property>
    <property name="text" >
     <string>Connect</string>