Skip to content

Commit c1147b2

Browse files
committed
[BACKPORT] Make the capitalization of menu items and tools consistent in the main window and layer popup UI.
Conflicts: src/app/legend/qgslegend.cpp src/ui/qgisapp.ui
1 parent 2bf4228 commit c1147b2

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

src/app/legend/qgslegend.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -571,19 +571,19 @@ void QgsLegend::handleRightClickEvent( QTreeWidgetItem* item, const QPoint& posi
571571

572572
if ( li->parent() )
573573
{
574-
theMenu.addAction( tr( "&Make to toplevel item" ), this, SLOT( makeToTopLevelItem() ) );
574+
theMenu.addAction( tr( "&Make to Toplevel Item" ), this, SLOT( makeToTopLevelItem() ) );
575575
}
576576
}
577577
else if ( li->type() == QgsLegendItem::LEGEND_GROUP )
578578
{
579579
theMenu.addAction( QgisApp::getThemeIcon( "/mActionZoomToLayer.png" ),
580-
tr( "Zoom to group" ), this, SLOT( legendLayerZoom() ) );
580+
tr( "Zoom to Group" ), this, SLOT( legendLayerZoom() ) );
581581

582582
theMenu.addAction( QgisApp::getThemeIcon( "/mActionRemoveLayer.png" ),
583583
tr( "&Remove" ), this, SLOT( legendGroupRemove() ) );
584584

585585
theMenu.addAction( QgisApp::getThemeIcon( "/mActionSetCRS.png" ),
586-
tr( "&Set group CRS" ), this, SLOT( legendGroupSetCRS() ) );
586+
tr( "&Set Group CRS" ), this, SLOT( legendGroupSetCRS() ) );
587587
}
588588

589589
if ( li->type() == QgsLegendItem::LEGEND_LAYER || li->type() == QgsLegendItem::LEGEND_GROUP )
@@ -592,9 +592,9 @@ void QgsLegend::handleRightClickEvent( QTreeWidgetItem* item, const QPoint& posi
592592
}
593593
}
594594

595-
theMenu.addAction( QgisApp::getThemeIcon( "/folder_new.png" ), tr( "&Add group" ), this, SLOT( addGroupToCurrentItem() ) );
596-
theMenu.addAction( QgisApp::getThemeIcon( "/mActionExpandTree.png" ), tr( "&Expand all" ), this, SLOT( expandAll() ) );
597-
theMenu.addAction( QgisApp::getThemeIcon( "/mActionCollapseTree.png" ), tr( "&Collapse all" ), this, SLOT( collapseAll() ) );
595+
theMenu.addAction( QgisApp::getThemeIcon( "/folder_new.png" ), tr( "&Add Group" ), this, SLOT( addGroupToCurrentItem() ) );
596+
theMenu.addAction( QgisApp::getThemeIcon( "/mActionExpandTree.png" ), tr( "&Expand All" ), this, SLOT( expandAll() ) );
597+
theMenu.addAction( QgisApp::getThemeIcon( "/mActionCollapseTree.png" ), tr( "&Collapse All" ), this, SLOT( collapseAll() ) );
598598

599599
theMenu.exec( position );
600600
}

src/app/legend/qgslegendlayer.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -413,20 +413,20 @@ void QgsLegendLayer::addToPopupMenu( QMenu& theMenu )
413413

414414
// zoom to layer extent
415415
theMenu.addAction( QgisApp::getThemeIcon( "/mActionZoomToLayer.png" ),
416-
tr( "&Zoom to layer extent" ), legend(), SLOT( legendLayerZoom() ) );
416+
tr( "&Zoom to Layer Extent" ), legend(), SLOT( legendLayerZoom() ) );
417417
if ( lyr->type() == QgsMapLayer::RasterLayer )
418418
{
419-
theMenu.addAction( tr( "&Zoom to best scale (100%)" ), legend(), SLOT( legendLayerZoomNative() ) );
419+
theMenu.addAction( tr( "&Zoom to Best Scale (100%)" ), legend(), SLOT( legendLayerZoomNative() ) );
420420

421421
QgsRasterLayer *rasterLayer = qobject_cast<QgsRasterLayer *>( lyr );
422422
if ( rasterLayer && rasterLayer->rasterType() != QgsRasterLayer::Palette )
423423
{
424-
theMenu.addAction( tr( "&Stretch using current extent" ), legend(), SLOT( legendLayerStretchUsingCurrentExtent() ) );
424+
theMenu.addAction( tr( "&Stretch Using Current Extent" ), legend(), SLOT( legendLayerStretchUsingCurrentExtent() ) );
425425
}
426426
}
427427

428428
// show in overview
429-
QAction* showInOverviewAction = theMenu.addAction( tr( "&Show in overview" ), this, SLOT( showInOverview() ) );
429+
QAction* showInOverviewAction = theMenu.addAction( tr( "&Show in Overview" ), this, SLOT( showInOverview() ) );
430430
showInOverviewAction->setCheckable( true );
431431
showInOverviewAction->blockSignals( true );
432432
showInOverviewAction->setChecked( mLyr.isInOverview() );
@@ -436,10 +436,10 @@ void QgsLegendLayer::addToPopupMenu( QMenu& theMenu )
436436
theMenu.addAction( QgisApp::getThemeIcon( "/mActionRemoveLayer.png" ), tr( "&Remove" ), QgisApp::instance(), SLOT( removeLayer() ) );
437437

438438
// set layer crs
439-
theMenu.addAction( QgisApp::getThemeIcon( "/mActionSetCRS.png" ), tr( "&Set layer CRS" ), QgisApp::instance(), SLOT( setLayerCRS() ) );
439+
theMenu.addAction( QgisApp::getThemeIcon( "/mActionSetCRS.png" ), tr( "&Set Layer CRS" ), QgisApp::instance(), SLOT( setLayerCRS() ) );
440440

441441
// assign layer crs to project
442-
theMenu.addAction( QgisApp::getThemeIcon( "/mActionSetProjectCRS.png" ), tr( "Set &project CRS from layer" ), QgisApp::instance(), SLOT( setProjectCRSFromLayer() ) );
442+
theMenu.addAction( QgisApp::getThemeIcon( "/mActionSetProjectCRS.png" ), tr( "Set &Project CRS from Layer" ), QgisApp::instance(), SLOT( setProjectCRSFromLayer() ) );
443443

444444
theMenu.addSeparator();
445445

@@ -448,7 +448,7 @@ void QgsLegendLayer::addToPopupMenu( QMenu& theMenu )
448448
QgsVectorLayer* vlayer = qobject_cast<QgsVectorLayer *>( lyr );
449449

450450
// attribute table
451-
theMenu.addAction( QgisApp::getThemeIcon( "/mActionOpenTable.png" ), tr( "&Open attribute table" ),
451+
theMenu.addAction( QgisApp::getThemeIcon( "/mActionOpenTable.png" ), tr( "&Open Attribute Table" ),
452452
QgisApp::instance(), SLOT( attributeTable() ) );
453453

454454
// allow editing
@@ -463,10 +463,10 @@ void QgsLegendLayer::addToPopupMenu( QMenu& theMenu )
463463
}
464464

465465
// save as vector file
466-
theMenu.addAction( tr( "Save as..." ), QgisApp::instance(), SLOT( saveAsVectorFile() ) );
466+
theMenu.addAction( tr( "Save As..." ), QgisApp::instance(), SLOT( saveAsVectorFile() ) );
467467

468468
// save selection as vector file
469-
QAction* saveSelectionAsAction = theMenu.addAction( tr( "Save selection as..." ), QgisApp::instance(), SLOT( saveSelectionAsVectorFile() ) );
469+
QAction* saveSelectionAsAction = theMenu.addAction( tr( "Save Selection As..." ), QgisApp::instance(), SLOT( saveSelectionAsVectorFile() ) );
470470
if ( vlayer->selectedFeatureCount() == 0 )
471471
{
472472
saveSelectionAsAction->setEnabled( false );
@@ -476,7 +476,7 @@ void QgsLegendLayer::addToPopupMenu( QMenu& theMenu )
476476
theMenu.addAction( tr( "&Query..." ), QgisApp::instance(), SLOT( layerSubsetString() ) );
477477

478478
//show number of features in legend if requested
479-
QAction* showNFeaturesAction = new QAction( tr( "Show feature count" ), &theMenu );
479+
QAction* showNFeaturesAction = new QAction( tr( "Show Feature Count" ), &theMenu );
480480
showNFeaturesAction->setCheckable( true );
481481
showNFeaturesAction->setChecked( mShowFeatureCount );
482482
QObject::connect( showNFeaturesAction, SIGNAL( toggled( bool ) ), this, SLOT( setShowFeatureCount( bool ) ) );

src/ui/qgisapp.ui

+18-18
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@
452452
<normaloff>:/images/themes/default/mActionComposerManager.png</normaloff>:/images/themes/default/mActionComposerManager.png</iconset>
453453
</property>
454454
<property name="text">
455-
<string>Composer manager...</string>
455+
<string>Composer Manager...</string>
456456
</property>
457457
</action>
458458
<action name="mActionExit">
@@ -686,7 +686,7 @@
686686
<normaloff>:/images/themes/default/mActionMergeFeatures.png</normaloff>:/images/themes/default/mActionMergeFeatures.png</iconset>
687687
</property>
688688
<property name="text">
689-
<string>Merge selected features</string>
689+
<string>Merge Selected Features</string>
690690
</property>
691691
</action>
692692
<action name="mActionMergeFeatureAttributes">
@@ -695,7 +695,7 @@
695695
<normaloff>:/images/themes/default/mActionMergeFeatureAttributes.png</normaloff>:/images/themes/default/mActionMergeFeatureAttributes.png</iconset>
696696
</property>
697697
<property name="text">
698-
<string>Merge attributes of selected features</string>
698+
<string>Merge Attributes of Selected Features</string>
699699
</property>
700700
</action>
701701
<action name="mActionNodeTool">
@@ -778,7 +778,7 @@
778778
<normaloff>:/images/themes/default/mActionSelect.png</normaloff>:/images/themes/default/mActionSelect.png</iconset>
779779
</property>
780780
<property name="text">
781-
<string>Select single feature</string>
781+
<string>Select Single Feature</string>
782782
</property>
783783
</action>
784784
<action name="mActionSelectRectangle">
@@ -790,7 +790,7 @@
790790
<normaloff>:/images/themes/default/mActionSelectRectangle.png</normaloff>:/images/themes/default/mActionSelectRectangle.png</iconset>
791791
</property>
792792
<property name="text">
793-
<string>Select features by rectangle</string>
793+
<string>Select Features by Rectangle</string>
794794
</property>
795795
</action>
796796
<action name="mActionSelectPolygon">
@@ -802,7 +802,7 @@
802802
<normaloff>:/images/themes/default/mActionSelectPolygon.png</normaloff>:/images/themes/default/mActionSelectPolygon.png</iconset>
803803
</property>
804804
<property name="text">
805-
<string>Select features by polygon</string>
805+
<string>Select Features by Polygon</string>
806806
</property>
807807
</action>
808808
<action name="mActionSelectFreehand">
@@ -814,7 +814,7 @@
814814
<normaloff>:/images/themes/default/mActionSelectFreehand.png</normaloff>:/images/themes/default/mActionSelectFreehand.png</iconset>
815815
</property>
816816
<property name="text">
817-
<string>Select features by freehand</string>
817+
<string>Select Features by Freehand</string>
818818
</property>
819819
</action>
820820
<action name="mActionSelectRadius">
@@ -826,7 +826,7 @@
826826
<normaloff>:/images/themes/default/mActionSelectRadius.png</normaloff>:/images/themes/default/mActionSelectRadius.png</iconset>
827827
</property>
828828
<property name="text">
829-
<string>Select features by radius</string>
829+
<string>Select Features by Radius</string>
830830
</property>
831831
</action>
832832
<action name="mActionDeselectAll">
@@ -835,7 +835,7 @@
835835
<normaloff>:/images/themes/default/mActionDeselectAll.png</normaloff>:/images/themes/default/mActionDeselectAll.png</iconset>
836836
</property>
837837
<property name="text">
838-
<string>Deselect features from all layers</string>
838+
<string>Deselect Features from All Layers</string>
839839
</property>
840840
</action>
841841
<action name="mActionIdentify">
@@ -1030,7 +1030,7 @@
10301030
<normaloff>:/images/themes/default/mActionFormAnnotation.png</normaloff>:/images/themes/default/mActionFormAnnotation.png</iconset>
10311031
</property>
10321032
<property name="text">
1033-
<string>Form annotation</string>
1033+
<string>Form Annotation</string>
10341034
</property>
10351035
</action>
10361036
<action name="mActionAnnotation">
@@ -1161,7 +1161,7 @@
11611161
<normaloff>:/images/themes/default/mActionToggleEditing.png</normaloff>:/images/themes/default/mActionToggleEditing.png</iconset>
11621162
</property>
11631163
<property name="text">
1164-
<string>Toggle editing</string>
1164+
<string>Toggle Editing</string>
11651165
</property>
11661166
<property name="statusTip">
11671167
<string>Toggles the editing state of the current layer</string>
@@ -1173,20 +1173,20 @@
11731173
<normaloff>:/images/themes/default/mActionSaveEdits.png</normaloff>:/images/themes/default/mActionSaveEdits.png</iconset>
11741174
</property>
11751175
<property name="text">
1176-
<string>Save edits</string>
1176+
<string>Save Edits</string>
11771177
</property>
11781178
<property name="statusTip">
11791179
<string>Save edits to current layer, but continue editing</string>
11801180
</property>
11811181
</action>
11821182
<action name="mActionLayerSaveAs">
11831183
<property name="text">
1184-
<string>Save as...</string>
1184+
<string>Save As...</string>
11851185
</property>
11861186
</action>
11871187
<action name="mActionLayerSelectionSaveAs">
11881188
<property name="text">
1189-
<string>Save Selection as vector file...</string>
1189+
<string>Save Selection as Vector File...</string>
11901190
</property>
11911191
</action>
11921192
<action name="mActionRemoveLayer">
@@ -1211,7 +1211,7 @@
12111211
</action>
12121212
<action name="mActionSetProjectCRSFromLayer">
12131213
<property name="text">
1214-
<string>Set project CRS from layer</string>
1214+
<string>Set Project CRS from Layer</string>
12151215
</property>
12161216
</action>
12171217
<action name="mActionTileScale">
@@ -1261,7 +1261,7 @@
12611261
<normaloff>:/images/themes/default/mActionRemoveAllFromOverview.png</normaloff>:/images/themes/default/mActionRemoveAllFromOverview.png</iconset>
12621262
</property>
12631263
<property name="text">
1264-
<string>Remove All From Overview</string>
1264+
<string>Remove All from Overview</string>
12651265
</property>
12661266
</action>
12671267
<action name="mActionShowAllLayers">
@@ -1459,7 +1459,7 @@
14591459
</action>
14601460
<action name="mActionStyleManagerV2">
14611461
<property name="text">
1462-
<string>Style manager...</string>
1462+
<string>Style Manager...</string>
14631463
</property>
14641464
</action>
14651465
<action name="mActionShowPythonDialog">
@@ -1476,7 +1476,7 @@
14761476
<string>Full histogram stretch</string>
14771477
</property>
14781478
<property name="toolTip">
1479-
<string>Stretch histogram to full dataset</string>
1479+
<string>Stretch Histogram to Full Dataset</string>
14801480
</property>
14811481
</action>
14821482
<action name="mActionAddLayerSeparator">

0 commit comments

Comments
 (0)