Commit f9dcc6ef authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

MainWindow: Show the wizard when no project parameter is passed.

Before this, ./vlmc -vvv would have not show the wizard.
parent 5e2f23c8
......@@ -143,13 +143,6 @@ MainWindow::MainWindow( QWidget *parent ) :
restoreGeometry( s.value( "MainWindowGeometry" ).toByteArray() );
// Restore the layout
restoreState( s.value( "MainWindowState" ).toByteArray() );
if ( s.value( "ShowWizardStartup", true ).toBool() )
{
//If a project was opened from the command line: don't show the wizard.
if ( qApp->arguments().size() == 1 )
m_pWizard->show();
}
}
MainWindow::~MainWindow()
......@@ -160,6 +153,15 @@ MainWindow::~MainWindow()
LibVLCpp::Instance::destroyInstance();
}
void
MainWindow::showWizard()
{
QSettings s;
if ( s.value( "ShowWizardStartup", true ).toBool() )
m_pWizard->show();
}
void
MainWindow::changeEvent( QEvent *e )
{
......
......@@ -52,6 +52,7 @@ public:
~MainWindow();
void registerWidgetInWindowMenu( QDockWidget* widget );
void showWizard();
public slots:
void zoomIn();
......
......@@ -115,6 +115,7 @@ VLMCmain( int argc, char **argv )
MainWindow w;
/* Check for project file */
bool project = false;
for ( int i = 1; i < argc; i++ )
{
QString arg = argv[i];
......@@ -122,10 +123,13 @@ VLMCmain( int argc, char **argv )
if ( argc > ( i + 1 ) && ( arg == "--project" || arg == "-p" ) )
{
GUIProjectManager::getInstance()->loadProject( argv[i+1] );
project = true;
break;
}
}
//Don't show the wizard if a project has been passed through command line.
if ( project == false )
w.showWizard();
w.show();
return app.exec();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment