Make help a bit more reliable
[mussa.git] / qui / MussaWindow.cpp
index 09cdef5093b76bc884e5599cc03758f10de3b3fc..10dded3cea4b83831f24767f7059be56bac88526 100644 (file)
@@ -576,16 +576,25 @@ void MussaWindow::toggleMotifs()
 
 void MussaWindow::showManual()
 {
-#if QT_QTASSISTANT_FOUND
-  manualAssistant->openAssistant();
+#if defined(QT_QTASSISTANT_FOUND)
+  if (manualAssistant) { 
+    manualAssistant->openAssistant();
+  }
 #else
   try {
     boost::python::object webopen = get_py()["webbrowser.open"];
     webopen("http://woldlab.caltech.edu/~king/mussagl_manual/");
+    return;
   } catch( boost::python::error_already_set ) {
     PyErr_Print();
   }
 #endif //QT_QTASSISTANT_FOUND
+  QMessageBox::warning(this,
+                       tr("Unhelpful Help"),
+                       tr("Error loading help"),
+                       QMessageBox::Ok,
+                       QMessageBox::NoButton,
+                       QMessageBox::NoButton);
 }
 
 void MussaWindow::assistantError(QString message)