Force menu items into correct place on mac.

Fixes issue #342
This commit is contained in:
John Maguire 2010-05-25 13:19:28 +00:00
parent 0d6cf9627a
commit bfa355cf82
1 changed files with 7 additions and 0 deletions

View File

@ -343,6 +343,13 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg
connect(check_updates, SIGNAL(triggered(bool)), SLOT(CheckForUpdates()));
// We use the dock instead of the system tray on mac.
qt_mac_set_dock_menu(tray_menu);
// Force this menu to be the app "Preferences".
ui_->action_configure->setMenuRole(QAction::PreferencesRole);
// Force this menu into the "Clementine" menu.
ui_->action_configure_global_shortcuts->setMenuRole(QAction::ApplicationSpecificRole);
// Force this menu to be the app "About".
ui_->action_about->setMenuRole(QAction::AboutRole);
#else
tray_icon_->setContextMenu(tray_menu);
connect(tray_icon_, SIGNAL(WheelEvent(int)), SLOT(VolumeWheelEvent(int)));