Added All Files to the open file filter list
[pulseview.git] / pv / mainwindow.cpp
index dcbaf1812ab268765e626d69f5c280042c6ff65e..b916999fb9bd2a1fcfd2c691f5aa89a6081f15ba 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifdef ENABLE_SIGROKDECODE
-#include <sigrokdecode.h>
+#include <libsigrokdecode/libsigrokdecode.h>
 #endif
 
 #include <boost/bind.hpp>
@@ -269,15 +269,22 @@ void MainWindow::show_session_error(
 
 void MainWindow::on_actionOpen_triggered()
 {
+       // Enumerate the file formats
+       QString filters(tr("Sigrok Sessions (*.sr)"));
+       filters.append(tr(";;All Files (*.*)"));
+
+       // Show the dialog
        const QString file_name = QFileDialog::getOpenFileName(
-               this, tr("Open File"), "",
-               tr("Sigrok Sessions (*.sr)"));
+               this, tr("Open File"), "", filters);
        if (!file_name.isEmpty())
                load_file(file_name);
 }
 
 void MainWindow::on_actionConnect_triggered()
 {
+       // Stop any currently running capture session
+       _session.stop_capture();
+
        dialogs::Connect dlg(this, _device_manager);
 
        // If the user selected a device, select it in the device list. Select the