]> git.sur5r.net Git - bacula/bacula/commitdiff
Add a button to the button bar for .messages
authorDirk H Bartley <dbartley@schupan.com>
Tue, 1 May 2007 00:08:37 +0000 (00:08 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Tue, 1 May 2007 00:08:37 +0000 (00:08 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4669 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/console/console.cpp
bacula/src/qt-console/console/console.h
bacula/src/qt-console/main.ui
bacula/src/qt-console/mainwin.cpp

index fffc2c947292d717fcc921a1485ecf3a96e1f0be..6d00ef71de6f9ae10166d33ccc8230db741a119f 100644 (file)
@@ -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);
 }
 
 /*
index 98668318124cf1976c60ba9921a16bffc17a9977..77299982d6650b60fca9892f4850d7cfaf6ffdfa 100644 (file)
@@ -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);
 
index be034cff7776226ae35481494f898d73bbb9c4a9..f9fa3e542fd1c7dcf73c714f9ab9ef9197ef6205 100644 (file)
    </attribute>
    <addaction name="actionConnect" />
    <addaction name="actionStatusDir" />
+   <addaction name="actionMessages" />
    <addaction name="actionLabel" />
    <addaction name="actionRestore" />
    <addaction name="actionRun" />
     <string>Close The Current Page</string>
    </property>
   </action>
+  <action name="actionMessages" >
+   <property name="icon" >
+    <iconset>:images/status.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Messages</string>
+   </property>
+   <property name="statusTip" >
+    <string>Display any messages queued at the director</string>
+   </property>
+  </action>
  </widget>
  <resources>
   <include location="main.qrc" />
index d4349dfc318f8f72a4041d86154917c251942a79..6cd06dc1c2a4e75656c5636f20646cfc4f5cc1f6 100644 (file)
@@ -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);