From 32cd9c1c5134e0fef86e6d3f5c8016f6d6e1fc9a Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 28 Jan 2007 16:59:39 +0000 Subject: [PATCH] Update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4068 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/Makefile | 8 ++++++- bacula/src/qt-console/bat_conf.h | 5 +++++ bacula/src/qt-console/console/console.cpp | 11 ++++----- bacula/src/qt-console/main.ui | 27 +++++++++++++++++++++++ 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/bacula/src/qt-console/Makefile b/bacula/src/qt-console/Makefile index e59111f8c6..f7d9b78f1a 100644 --- a/bacula/src/qt-console/Makefile +++ b/bacula/src/qt-console/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: bat -# Generated by qmake (2.01a) (Qt 4.2.1) on: Sun Jan 28 16:40:37 2007 +# Generated by qmake (2.01a) (Qt 4.2.1) on: Sun Jan 28 17:49:20 2007 # Project: bat.pro # Template: app # Command: /usr/bin/qmake -unix -o Makefile bat.pro @@ -192,11 +192,17 @@ compiler_rcc_clean: qrc_main.cpp: main.qrc \ /usr/bin/rcc \ images/new.png \ + images/label.png \ + images/server.png \ + images/restore.png \ images/copy.png \ images/cut.png \ + images/connect.png \ + images/big-server.png \ images/save.png \ images/bat.png \ images/paste.png \ + images/run.png \ images/open.png /usr/bin/rcc -name main main.qrc -o qrc_main.cpp diff --git a/bacula/src/qt-console/bat_conf.h b/bacula/src/qt-console/bat_conf.h index ec4c9431b9..5a583d465f 100644 --- a/bacula/src/qt-console/bat_conf.h +++ b/bacula/src/qt-console/bat_conf.h @@ -74,8 +74,13 @@ struct DIRRES { char *tls_keyfile; /* TLS Client Key File */ TLS_CONTEXT *tls_ctx; /* Shared TLS Context */ + + /* Methods */ + char *name() const; }; +inline char *DIRRES::name() const { return hdr.name; } + struct CONFONTRES { RES hdr; char *fontface; /* Console Font specification */ diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index 46fff3c01e..eeff11fc95 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -43,12 +43,17 @@ Console::Console() m_textEdit = mainWin->textEdit; /* our console screen */ + /* Just take the first Director */ + LockRes(); + m_dir = (DIRRES *)GetNextRes(R_DIRECTOR, NULL); + UnlockRes(); + /* Dummy setup of treeWidget */ treeWidget->clear(); treeWidget->setColumnCount(1); treeWidget->setHeaderLabel("Selection"); topItem = new QTreeWidgetItem(treeWidget); - topItem->setText(0, "Rufus"); + topItem->setText(0, m_dir->name()); item = new QTreeWidgetItem(topItem); item->setText(0, "Console"); item->setText(1, "0"); @@ -68,10 +73,6 @@ bool Console::connect() m_textEdit = mainWin->textEdit; /* our console screen */ - /* Just take the first Director */ - LockRes(); - m_dir = (DIRRES *)GetNextRes(R_DIRECTOR, NULL); - UnlockRes(); if (!m_dir) { return false; diff --git a/bacula/src/qt-console/main.ui b/bacula/src/qt-console/main.ui index 180c51f1f6..a071dfc00b 100644 --- a/bacula/src/qt-console/main.ui +++ b/bacula/src/qt-console/main.ui @@ -256,8 +256,11 @@ 4 + + + @@ -325,6 +328,30 @@ Save + + + images/connect.png + + + Connect + + + + + images/label.png + + + Label + + + + + images/restore.png + + + Restore + + -- 2.39.2