Initialise the scripts only after everything else has loaded

This commit is contained in:
David Sansome 2011-01-02 16:17:36 +00:00
parent fdc2ec2e73
commit cfffa59b9b
1 changed files with 7 additions and 7 deletions

View File

@ -331,13 +331,6 @@ MainWindow::MainWindow(QWidget* parent)
background_streams_, SLOT(AllGloryToTheHypnotoad(bool)));
connect(ui_->action_queue_manager, SIGNAL(triggered()), SLOT(ShowQueueManager()));
#ifdef HAVE_SCRIPTING
scripts_->Init(ScriptManager::GlobalData(player_, playlists_));
connect(ui_->action_script_manager, SIGNAL(triggered()), SLOT(ShowScriptDialog()));
#else
ui_->action_script_manager->setEnabled(false);
#endif
// Give actions to buttons
ui_->forward_button->setDefaultAction(ui_->action_next_track);
ui_->back_button->setDefaultAction(ui_->action_previous_track);
@ -646,6 +639,13 @@ MainWindow::MainWindow(QWidget* parent)
wiimotedev_shortcuts_.reset(new WiimotedevShortcuts(osd_, this, player_));
#endif
#ifdef HAVE_SCRIPTING
scripts_->Init(ScriptManager::GlobalData(player_, playlists_));
connect(ui_->action_script_manager, SIGNAL(triggered()), SLOT(ShowScriptDialog()));
#else
ui_->action_script_manager->setEnabled(false);
#endif
}
MainWindow::~MainWindow() {