{
fprintf(stdout,
"Usage:\n"
- " %s [OPTION…] — %s\n"
+ " %s [OPTIONS] [FILE]\n"
"\n"
"Help Options:\n"
" -h, -?, --help Show help option\n"
" -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[])
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 =