From: Dirk H Bartley Date: Tue, 1 May 2007 00:08:37 +0000 (+0000) Subject: Add a button to the button bar for .messages X-Git-Tag: Release-7.0.0~6460 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c0dcd9995922bc6e9c82a5aee4bed5385c8df834;p=bacula%2Fbacula Add a button to the button bar for .messages git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4669 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index fffc2c9472..6d00ef71de 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -365,11 +365,22 @@ const QFont Console::get_font() return m_textEdit->font(); } - +/* + * Slot for responding to status dir button on button bar + */ void Console::status_dir() { QString cmd("status dir"); - consoleCommand(cmd); + consoleCommand(cmd); +} + +/* + * Slot for responding to messages button on button bar + */ +void Console::messages() +{ + QString cmd(".messages"); + consoleCommand(cmd); } /* diff --git a/bacula/src/qt-console/console/console.h b/bacula/src/qt-console/console/console.h index 9866831812..77299982d6 100644 --- a/bacula/src/qt-console/console/console.h +++ b/bacula/src/qt-console/console/console.h @@ -117,6 +117,7 @@ public slots: int write(const char *msg); int write(QString msg); void status_dir(void); + void messages(void); void set_font(void); void poll_messages(void); diff --git a/bacula/src/qt-console/main.ui b/bacula/src/qt-console/main.ui index be034cff77..f9fa3e542f 100644 --- a/bacula/src/qt-console/main.ui +++ b/bacula/src/qt-console/main.ui @@ -133,6 +133,7 @@ + @@ -473,6 +474,17 @@ Close The Current Page + + + :images/status.png + + + Messages + + + Display any messages queued at the director + + diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index d4349dfc31..6cd06dc1c2 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -366,6 +366,7 @@ void MainWin::treeItemChanged(QTreeWidgetItem *currentitem, QTreeWidgetItem *pre /* remove connections to the current console */ disconnect(actionConnect, SIGNAL(triggered()), previousConsole, SLOT(connect())); disconnect(actionStatusDir, SIGNAL(triggered()), previousConsole, SLOT(status_dir())); + disconnect(actionMessages, SIGNAL(triggered()), previousConsole, SLOT(messages())); disconnect(actionSelectFont, SIGNAL(triggered()), previousConsole, SLOT(set_font())); QTreeWidgetItem *dirItem = previousConsole->directorTreeItem(); QBrush greyBrush(Qt::lightGray); @@ -392,6 +393,7 @@ void MainWin::treeItemChanged(QTreeWidgetItem *currentitem, QTreeWidgetItem *pre connect(actionConnect, SIGNAL(triggered()), m_currentConsole, SLOT(connect())); connect(actionSelectFont, SIGNAL(triggered()), m_currentConsole, SLOT(set_font())); connect(actionStatusDir, SIGNAL(triggered()), m_currentConsole, SLOT(status_dir())); + connect(actionMessages, SIGNAL(triggered()), m_currentConsole, SLOT(messages())); /* Set director's tree widget background to magenta for ease of identification */ QTreeWidgetItem *dirItem = m_currentConsole->directorTreeItem(); QBrush magentaBrush(Qt::magenta);