Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for issues #5753 and #5754 #165

Merged
merged 2 commits into from
Jun 10, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions python/plugins/GdalTools/GdalTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,6 @@ def initGui( self ):
QObject.connect( self.settings, SIGNAL( "triggered()" ), self.doSettings )
self.menu.addAction( self.settings )

menu_bar = self.iface.mainWindow().menuBar()
actions = menu_bar.actions()
lastAction = actions[ len( actions ) - 1 ]
menu_bar.insertMenu( lastAction, self.menu )

def unload( self ):
if not valid: return
pass
Expand Down
18 changes: 15 additions & 3 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,12 @@ void QgisApp::createActions()
connect( mActionCustomization, SIGNAL( triggered() ), this, SLOT( customize() ) );

#ifdef Q_WS_MAC
// copy of Options action that gets moved to app Preferences...
mActionOptionsMac = new QAction( mActionOptions->text(), this );
mActionOptionsMac->setMenuRole( QAction::NoRole );
mActionOptionsMac->setIcon( mActionOptions->icon() );
connect( mActionOptionsMac, SIGNAL( triggered() ), this, SLOT( options() ) );

// Window Menu Items

mActionWindowMinimize = new QAction( tr( "Minimize" ), this );
Expand Down Expand Up @@ -1158,16 +1164,22 @@ void QgisApp::createMenus()
}

#ifdef Q_WS_MAC
// copy back the Options action after assigned to app Preferences...
mSettingsMenu->addAction( mActionOptionsMac );

// Window Menu

mWindowMenu = menuBar()->addMenu( tr( "&Window" ) );
mWindowMenu = new QMenu( tr( "Window" ), this );

mWindowMenu->addAction( mActionWindowMinimize );
mWindowMenu->addAction( mActionWindowZoom );
mWindowMenu->addSeparator();

mWindowMenu->addAction( mActionWindowAllToFront );
mWindowMenu->addSeparator();

// insert before Help menu, as per Mac OS convention
menuBar()->insertMenu( mHelpMenu->menuAction(), mWindowMenu );
#endif

// Database Menu
Expand Down Expand Up @@ -5784,7 +5796,7 @@ void QgisApp::addPluginToDatabaseMenu( QString name, QAction* action )
before = actions.at( i );
break;
}
else if ( actions.at( i )->menu() == mHelpMenu )
else if ( actions.at( i )->menu() == firstRightStandardMenu() )
{
before = actions.at( i );
break;
Expand Down Expand Up @@ -5846,7 +5858,7 @@ void QgisApp::addPluginToWebMenu( QString name, QAction* action )
{
if ( actions.at( i )->menu() == mWebMenu )
return;
if ( actions.at( i )->menu() == mHelpMenu )
if ( actions.at( i )->menu() == firstRightStandardMenu() )
{
before = actions.at( i );
break;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
// actions for menus and toolbars -----------------

#ifdef Q_WS_MAC
QAction *mActionOptionsMac;
QAction *mActionWindowMinimize;
QAction *mActionWindowZoom;
QAction *mActionWindowSeparator1;
Expand Down
3 changes: 3 additions & 0 deletions src/ui/qgisapp.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,9 @@
<property name="text">
<string>Configure shortcuts...</string>
</property>
<property name="menuRole">
<enum>QAction::NoRole</enum>
</property>
</action>
<action name="mActionLocalHistogramStretch">
<property name="icon">
Expand Down