]> sigrok.org Git - pulseview.git/blobdiff - main.cpp
Doxyfile: Set version to 0.4.0.
[pulseview.git] / main.cpp
index 9c27f7b745d8e81b083025beb3a8bf7b6e364a44..ce7db5fadcc2a18a05d567a0ac284cfe7065595f 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -58,7 +58,7 @@ void usage()
 {
        fprintf(stdout,
                "Usage:\n"
-               "  %s [OPTION…] — %s\n"
+               "  %s [OPTIONS] [FILE]\n"
                "\n"
                "Help Options:\n"
                "  -h, -?, --help                  Show help option\n"
@@ -69,7 +69,7 @@ void usage()
                "  -i, --input-file                Load input from file\n"
                "  -I, --input-format              Input format\n"
                "  -c, --clean                     Don't restore previous sessions on startup\n"
-               "\n", PV_BIN_NAME, PV_DESCRIPTION);
+               "\n", PV_BIN_NAME);
 }
 
 int main(int argc, char *argv[])
@@ -177,10 +177,17 @@ int main(int argc, char *argv[])
                        pv::DeviceManager device_manager(context);
 
                        // Initialise the main window
-                       pv::MainWindow w(device_manager, open_file, open_file_format,
-                               restore_sessions);
+                       pv::MainWindow w(device_manager);
                        w.show();
 
+                       if (restore_sessions)
+                               w.restore_sessions();
+
+                       if (!open_file.empty())
+                               w.add_session_with_file(open_file, open_file_format);
+                       else
+                               w.add_default_session();
+
 #ifdef ENABLE_SIGNALS
                        if (SignalHandler::prepare_signals()) {
                                SignalHandler *const handler =