@@ -928,6 +928,12 @@ void QgisApp::createActions()
928928 connect ( mActionCustomization , SIGNAL ( triggered () ), this , SLOT ( customize () ) );
929929
930930#ifdef Q_WS_MAC
931+ // copy of Options action that gets moved to app Preferences...
932+ mActionOptionsMac = new QAction ( mActionOptions ->text (), this );
933+ mActionOptionsMac ->setMenuRole ( QAction::NoRole );
934+ mActionOptionsMac ->setIcon ( mActionOptions ->icon () );
935+ connect ( mActionOptionsMac , SIGNAL ( triggered () ), this , SLOT ( options () ) );
936+
931937 // Window Menu Items
932938
933939 mActionWindowMinimize = new QAction ( tr ( " Minimize" ), this );
@@ -1158,16 +1164,22 @@ void QgisApp::createMenus()
11581164 }
11591165
11601166#ifdef Q_WS_MAC
1167+ // copy back the Options action after assigned to app Preferences...
1168+ mSettingsMenu ->addAction ( mActionOptionsMac );
1169+
11611170 // Window Menu
11621171
1163- mWindowMenu = menuBar ()-> addMenu ( tr ( " & Window" ) );
1172+ mWindowMenu = new QMenu ( tr ( " Window" ), this );
11641173
11651174 mWindowMenu ->addAction ( mActionWindowMinimize );
11661175 mWindowMenu ->addAction ( mActionWindowZoom );
11671176 mWindowMenu ->addSeparator ();
11681177
11691178 mWindowMenu ->addAction ( mActionWindowAllToFront );
11701179 mWindowMenu ->addSeparator ();
1180+
1181+ // insert before Help menu, as per Mac OS convention
1182+ menuBar ()->insertMenu ( mHelpMenu ->menuAction (), mWindowMenu );
11711183#endif
11721184
11731185 // Database Menu
@@ -5784,7 +5796,7 @@ void QgisApp::addPluginToDatabaseMenu( QString name, QAction* action )
57845796 before = actions.at ( i );
57855797 break ;
57865798 }
5787- else if ( actions.at ( i )->menu () == mHelpMenu )
5799+ else if ( actions.at ( i )->menu () == firstRightStandardMenu () )
57885800 {
57895801 before = actions.at ( i );
57905802 break ;
@@ -5846,7 +5858,7 @@ void QgisApp::addPluginToWebMenu( QString name, QAction* action )
58465858 {
58475859 if ( actions.at ( i )->menu () == mWebMenu )
58485860 return ;
5849- if ( actions.at ( i )->menu () == mHelpMenu )
5861+ if ( actions.at ( i )->menu () == firstRightStandardMenu () )
58505862 {
58515863 before = actions.at ( i );
58525864 break ;
0 commit comments