mac-menus-patch-1.8_git.diff
python/plugins/GdalTools/GdalTools.py | ||
---|---|---|
264 | 264 |
QObject.connect( self.settings, SIGNAL( "triggered()" ), self.doSettings ) |
265 | 265 |
self.menu.addAction( self.settings ) |
266 | 266 | |
267 |
menu_bar = self.iface.mainWindow().menuBar() |
|
268 |
actions = menu_bar.actions() |
|
269 |
lastAction = actions[ len( actions ) - 1 ] |
|
270 |
menu_bar.insertMenu( lastAction, self.menu ) |
|
271 | ||
272 | 267 |
def unload( self ): |
273 | 268 |
if not valid: return |
274 | 269 |
pass |
src/app/qgisapp.cpp | ||
---|---|---|
1160 | 1160 |
#ifdef Q_WS_MAC |
1161 | 1161 |
// Window Menu |
1162 | 1162 | |
1163 |
mWindowMenu = menuBar()->addMenu( tr( "&Window" ) );
|
|
1163 |
mWindowMenu = new QMenu( tr( "&Window" ), this );
|
|
1164 | 1164 | |
1165 | 1165 |
mWindowMenu->addAction( mActionWindowMinimize ); |
1166 | 1166 |
mWindowMenu->addAction( mActionWindowZoom ); |
... | ... | |
1168 | 1168 | |
1169 | 1169 |
mWindowMenu->addAction( mActionWindowAllToFront ); |
1170 | 1170 |
mWindowMenu->addSeparator(); |
1171 | ||
1172 |
// insert before Help menu, as per Mac OS convention |
|
1173 |
menuBar()->insertMenu( mHelpMenu->menuAction(), mWindowMenu ); |
|
1171 | 1174 |
#endif |
1172 | 1175 | |
1173 | 1176 |
// Database Menu |
... | ... | |
5784 | 5787 |
before = actions.at( i ); |
5785 | 5788 |
break; |
5786 | 5789 |
} |
5787 |
else if ( actions.at( i )->menu() == mHelpMenu ) |
|
5790 |
if ( actions.at( i )->menu() == mVectorMenu ) |
|
5791 |
{ |
|
5792 |
before = actions.at( i ); |
|
5793 |
break; |
|
5794 |
} |
|
5795 |
if ( actions.at( i )->menu() == mRasterMenu ) |
|
5788 | 5796 |
{ |
5789 | 5797 |
before = actions.at( i ); |
5790 | 5798 |
break; |
... | ... | |
5846 | 5854 |
{ |
5847 | 5855 |
if ( actions.at( i )->menu() == mWebMenu ) |
5848 | 5856 |
return; |
5849 |
if ( actions.at( i )->menu() == mHelpMenu ) |
|
5857 |
if ( actions.at( i )->menu() == mVectorMenu ) |
|
5858 |
{ |
|
5859 |
before = actions.at( i ); |
|
5860 |
break; |
|
5861 |
} |
|
5862 |
if ( actions.at( i )->menu() == mRasterMenu ) |
|
5850 | 5863 |
{ |
5851 | 5864 |
before = actions.at( i ); |
5852 | 5865 |
break; |
src/app/qgisapp.h | ||
---|---|---|
333 | 333 |
QMenu *vectorMenu() { return mVectorMenu; } |
334 | 334 |
QMenu *webMenu() { return mWebMenu; } |
335 | 335 |
#ifdef Q_WS_MAC |
336 |
QMenu *firstRightStandardMenu() { return mWindowMenu; } |
|
337 | 336 |
QMenu *windowMenu() { return mWindowMenu; } |
338 | 337 |
#else |
339 |
QMenu *firstRightStandardMenu() { return mHelpMenu; } |
|
340 | 338 |
QMenu *windowMenu() { return NULL; } |
341 | 339 |
#endif |
340 |
QMenu *firstRightStandardMenu() { return mHelpMenu; } |
|
342 | 341 |
QMenu *printComposersMenu() {return mPrintComposersMenu;} |
343 | 342 |
QMenu *helpMenu() { return mHelpMenu; } |
344 | 343 |