diff --git a/src/TomahawkWindow.cpp b/src/TomahawkWindow.cpp
index 8ad0974d9..dbd0179f7 100644
--- a/src/TomahawkWindow.cpp
+++ b/src/TomahawkWindow.cpp
@@ -109,14 +109,12 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
#endif
ui->setupUi( this );
- ui->menuApp->insertAction( ui->actionCreatePlaylist, ActionCollection::instance()->getAction( "togglePrivacy" ) );
- ui->menuApp->insertSeparator( ui->actionCreatePlaylist );
-
applyPlatformTweaks();
ui->centralWidget->setContentsMargins( 0, 0, 0, 0 );
TomahawkUtils::unmarginLayout( ui->centralWidget->layout() );
+ setMenuBar( ActionCollection::instance()->createMenuBar( this ) );
setupAccountsMenu();
setupToolBar();
setupSideBar();
@@ -128,8 +126,8 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
if ( qApp->arguments().contains( "--debug" ) )
{
- ui->menu_Help->addSeparator();
- ui->menu_Help->addAction( "Crash now...", this, SLOT( crashNow() ) );
+ connect( ActionCollection::instance()->getAction( "crashNow" ), SIGNAL( triggered() ),
+ this, SLOT( crashNow() ) );
}
// set initial state
@@ -311,21 +309,17 @@ TomahawkWindow::setupSideBar()
ui->splitter->addWidget( ViewManager::instance()->widget() );
ui->splitter->setCollapsible( 1, false );
- ui->actionShowOfflineSources->setChecked( TomahawkSettings::instance()->showOfflineSources() );
+ ActionCollection::instance()->getAction( "showOfflineSources" )
+ ->setChecked( TomahawkSettings::instance()->showOfflineSources() );
}
void
TomahawkWindow::setupUpdateCheck()
{
-#ifndef Q_OS_MAC
- ui->menu_Help->insertSeparator( ui->actionAboutTomahawk );
-#endif
-
#if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE )
- QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check For Updates..." ) );
- checkForUpdates->setMenuRole( QAction::ApplicationSpecificRole );
- connect( checkForUpdates, SIGNAL( triggered( bool ) ), SLOT( checkForUpdates() ) );
+ connect( ActionCollection::instance()->getAction( "checkForUpdates" ), SIGNAL( triggered( bool ) ),
+ SLOT( checkForUpdates() ) );
#elif defined( Q_WS_WIN )
QUrl updaterUrl;
@@ -339,9 +333,8 @@ TomahawkWindow::setupUpdateCheck()
updater->SetNetworkAccessManager( TomahawkUtils::nam() );
updater->SetVersion( TomahawkUtils::appFriendlyVersion() );
- ui->menu_Help->addSeparator();
- QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check For Updates..." ) );
- connect( checkForUpdates, SIGNAL( triggered() ), updater, SLOT( CheckNow() ) );
+ connect( ActionCollection::instance()->getAction( "checkForUpdates" ), SIGNAL( triggered() ),
+ updater, SLOT( CheckNow() ) );
#endif
}
@@ -430,30 +423,22 @@ TomahawkWindow::setupSignals()
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( audioStopped() ) );
//