changeset 377:3c724eac1798

Merge
author Chris Cannam
date Wed, 02 Jul 2014 08:42:58 +0100
parents 98afba87887f (current diff) 20bab95852c1 (diff)
children a7a643988390
files
diffstat 2 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Wed Jun 18 18:30:50 2014 +0100
+++ b/framework/MainWindowBase.cpp	Wed Jul 02 08:42:58 2014 +0100
@@ -1120,7 +1120,7 @@
 }
 
 MainWindowBase::FileOpenStatus
-MainWindowBase::open(QString fileOrUrl, AudioFileOpenMode mode)
+MainWindowBase::openPath(QString fileOrUrl, AudioFileOpenMode mode)
 {
     ProgressDialog dialog(tr("Opening file or URL..."), true, 2000, this);
     connect(&dialog, SIGNAL(showing()), this, SIGNAL(hideSplash()));
@@ -1151,7 +1151,6 @@
         RDFImporter::RDFDocumentType rdfType = 
             RDFImporter::identifyDocumentType
             (QUrl::fromLocalFile(source.getLocalFilename()).toString());
-//        cerr << "RDF type: " << (int)rdfType << endl;
         if (rdfType == RDFImporter::AudioRefAndAnnotations ||
             rdfType == RDFImporter::AudioRef) {
             rdfSession = true;
@@ -1204,13 +1203,13 @@
 MainWindowBase::openAudio(FileSource source, AudioFileOpenMode mode,
                           QString templateName)
 {
-//    SVDEBUG << "MainWindowBase::openAudio(" << source.getLocation() << ")" << endl;
+    SVDEBUG << "MainWindowBase::openAudio(" << source.getLocation() << ")" << endl;
 
     if (templateName == "") {
         templateName = getDefaultSessionTemplate();
     }
 
-    cerr << "template is: \"" << templateName << "\"" << endl;
+//    cerr << "template is: \"" << templateName << "\"" << endl;
 
     if (!source.isAvailable()) return FileOpenFailed;
     source.waitForData();
@@ -1672,7 +1671,7 @@
 }
 
 MainWindowBase::FileOpenStatus
-MainWindowBase::openSessionFile(QString fileOrUrl)
+MainWindowBase::openSessionPath(QString fileOrUrl)
 {
     ProgressDialog dialog(tr("Opening session..."), true, 2000, this);
     connect(&dialog, SIGNAL(showing()), this, SIGNAL(hideSplash()));
@@ -3273,11 +3272,16 @@
 void
 MainWindowBase::contextHelpChanged(const QString &s)
 {
+    QStatusBar *bar = statusBar();
+
     if (s == "" && m_myStatusMessage != "") {
-        statusBar()->showMessage(m_myStatusMessage);
+        if (bar->currentMessage() != m_myStatusMessage) {
+            bar->showMessage(m_myStatusMessage);
+        }
         return;
     }
-    statusBar()->showMessage(s);
+
+    bar->showMessage(s);
 }
 
 void
--- a/framework/MainWindowBase.h	Wed Jun 18 18:30:50 2014 +0100
+++ b/framework/MainWindowBase.h	Wed Jul 02 08:42:58 2014 +0100
@@ -93,16 +93,15 @@
         FileOpenWrongMode // attempted to open layer when no main model present
     };
 
-    virtual FileOpenStatus open(QString fileOrUrl, AudioFileOpenMode = AskUser);
     virtual FileOpenStatus open(FileSource source, AudioFileOpenMode = AskUser);
-    
+    virtual FileOpenStatus openPath(QString fileOrUrl, AudioFileOpenMode = AskUser);
     virtual FileOpenStatus openAudio(FileSource source, AudioFileOpenMode = AskUser, QString templateName = "");
     virtual FileOpenStatus openPlaylist(FileSource source, AudioFileOpenMode = AskUser);
     virtual FileOpenStatus openLayer(FileSource source);
     virtual FileOpenStatus openImage(FileSource source);
 
-    virtual FileOpenStatus openSessionFile(QString fileOrUrl);
     virtual FileOpenStatus openSession(FileSource source);
+    virtual FileOpenStatus openSessionPath(QString fileOrUrl);
     virtual FileOpenStatus openSessionTemplate(QString templateName);
     virtual FileOpenStatus openSessionTemplate(FileSource source);