diff main/MainWindow.cpp @ 306:8fbbfea74058

* Make Activity Log a bit more of a proper window
author Chris Cannam
date Wed, 25 Feb 2009 11:26:07 +0000
parents f76efdd7d180
children d4ff14feca76
line wrap: on
line diff
--- a/main/MainWindow.cpp	Wed Feb 25 11:15:22 2009 +0000
+++ b/main/MainWindow.cpp	Wed Feb 25 11:26:07 2009 +0000
@@ -280,11 +280,10 @@
     connect(CommandHistory::getInstance(), SIGNAL(activity(QString)),
             m_activityLog, SLOT(activityHappened(QString)));
     connect(this, SIGNAL(replacedDocument()), this, SLOT(documentReplaced()));
+    m_activityLog->hide();
 
     newSession();
 
-    m_activityLog->show();
-
     connect(m_midiInput, SIGNAL(eventsAvailable()),
             this, SLOT(midiEventsAvailable()));
     
@@ -836,6 +835,11 @@
     connect(action, SIGNAL(triggered()), this, SLOT(showLayerTree()));
     m_keyReference->registerShortcut(action);
     menu->addAction(action);
+
+    action = new QAction(tr("Show Acti&vity Log"), this);
+    action->setStatusTip(tr("Open a window listing interactions and other events"));
+    connect(action, SIGNAL(triggered()), this, SLOT(showActivityLog()));
+    menu->addAction(action);
 }
 
 void
@@ -3607,6 +3611,14 @@
 }
 
 void
+MainWindow::showActivityLog()
+{
+    m_activityLog->show();
+    m_activityLog->raise();
+    m_activityLog->scrollToEnd();
+}
+
+void
 MainWindow::preferences()
 {
     if (!m_preferencesDialog.isNull()) {