Skip to content

Commit

Permalink
Merge pull request #5232 from boundlessgeo/move_project_properties
Browse files Browse the repository at this point in the history
[needs-docs] KDE: Moved project properties menu item from settings into the projects menu
  • Loading branch information
elpaso authored Oct 27, 2017
2 parents 4cde520 + bc982ae commit 2fdf30c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
15 changes: 1 addition & 14 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2172,10 +2172,6 @@ void QgisApp::createMenus()
* The User Interface Guidelines for each platform specify different locations
* for the following items.
*
* Project Properties:
* Gnome, Mac, Win - File/Project menu above print commands (Win doesn't specify)
* Kde - Settings menu
*
* Custom CRS, Options:
* Gnome - bottom of Edit menu
* Mac - Application menu (moved automatically by Qt)
Expand All @@ -2200,20 +2196,11 @@ void QgisApp::createMenus()
QDialogButtonBox::ButtonLayout layout =
QDialogButtonBox::ButtonLayout( style()->styleHint( QStyle::SH_DialogButtonLayout, nullptr, this ) );

// Project Menu

// Connect once for the entire submenu.
connect( mRecentProjectsMenu, &QMenu::triggered, this, static_cast < void ( QgisApp::* )( QAction *action ) >( &QgisApp::openProject ) );
connect( mProjectFromTemplateMenu, &QMenu::triggered,
this, &QgisApp::fileNewFromTemplateAction );

if ( layout == QDialogButtonBox::GnomeLayout || layout == QDialogButtonBox::MacLayout || layout == QDialogButtonBox::WinLayout )
{
QAction *before = mActionNewPrintComposer;
mSettingsMenu->removeAction( mActionProjectProperties );
mProjectMenu->insertAction( before, mActionProjectProperties );
mProjectMenu->insertSeparator( before );
}

// View Menu

Expand All @@ -2228,7 +2215,7 @@ void QgisApp::createMenus()
else
{
// on the top of the settings menu
QAction *before = mActionProjectProperties;
QAction *before = mSettingsMenu->actions().first();
mSettingsMenu->insertMenu( before, mPanelMenu );
mSettingsMenu->insertMenu( before, mToolbarMenu );
mSettingsMenu->insertAction( before, mActionToggleFullScreen );
Expand Down
3 changes: 2 additions & 1 deletion src/ui/qgisapp.ui
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
<addaction name="separator"/>
<addaction name="mActionSnappingOptions"/>
<addaction name="separator"/>
<addaction name="mActionProjectProperties"/>
<addaction name="separator"/>
<addaction name="mActionNewPrintComposer"/>
<addaction name="mActionShowComposerManager"/>
<addaction name="mPrintComposersMenu"/>
Expand Down Expand Up @@ -217,7 +219,6 @@
<property name="title">
<string>&amp;Settings</string>
</property>
<addaction name="mActionProjectProperties"/>
<addaction name="mActionStyleManager"/>
<addaction name="mActionCustomProjection"/>
<addaction name="separator"/>
Expand Down

0 comments on commit 2fdf30c

Please sign in to comment.