From e7461eb9a2b306b65da127fe356148cabb2cd867 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Mon, 6 Feb 2012 17:32:13 +0100 Subject: [PATCH] Set menu roles in ui file. --- src/ui/mainwindow.cpp | 10 +--------- src/ui/mainwindow.ui | 14 +++++++++++++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index bdc8722fd..440906790 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -222,6 +222,7 @@ MainWindow::MainWindow( // Initialise the UI ui_->setupUi(this); + ui_->multi_loading_indicator->SetTaskManager(task_manager_); ui_->now_playing->SetCoverProviders(cover_providers_); ui_->now_playing->SetLibraryBackend(library_->backend()); @@ -599,15 +600,6 @@ MainWindow::MainWindow( connect(check_updates, SIGNAL(triggered(bool)), SLOT(CheckForUpdates())); #endif -#ifdef Q_OS_DARWIN - // Force this menu to be the app "Preferences". - ui_->action_configure->setMenuRole(QAction::PreferencesRole); - // Force this menu to be the app "About". - ui_->action_about->setMenuRole(QAction::AboutRole); - // Force this menu to be the app "Quit". - ui_->action_quit->setMenuRole(QAction::QuitRole); -#endif - #ifdef Q_OS_WIN32 qLog(Debug) << "Creating sparkle updater"; qtsparkle::Updater* updater = new qtsparkle::Updater( diff --git a/src/ui/mainwindow.ui b/src/ui/mainwindow.ui index 5ddc606e0..87f9418bf 100644 --- a/src/ui/mainwindow.ui +++ b/src/ui/mainwindow.ui @@ -418,7 +418,7 @@ 0 0 1131 - 23 + 22 @@ -541,6 +541,9 @@ Ctrl+Q + + QAction::QuitRole + @@ -624,6 +627,9 @@ Ctrl+P + + QAction::PreferencesRole + @@ -632,6 +638,9 @@ F1 + + QAction::AboutRole + @@ -795,6 +804,9 @@ About Qt... + + QAction::AboutQtRole +