Skip to content
Permalink
Browse files
[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
  • Loading branch information
g-sherman committed Mar 8, 2012
1 parent 2bf4228 commit c1147b2846ea01a07976326acf3fe9772ad51a56
Showing with 34 additions and 34 deletions.
  1. +6 −6 src/app/legend/qgslegend.cpp
  2. +10 −10 src/app/legend/qgslegendlayer.cpp
  3. +18 −18 src/ui/qgisapp.ui
@@ -571,19 +571,19 @@ void QgsLegend::handleRightClickEvent( QTreeWidgetItem* item, const QPoint& posi

if ( li->parent() )
{
theMenu.addAction( tr( "&Make to toplevel item" ), this, SLOT( makeToTopLevelItem() ) );
theMenu.addAction( tr( "&Make to Toplevel Item" ), this, SLOT( makeToTopLevelItem() ) );
}
}
else if ( li->type() == QgsLegendItem::LEGEND_GROUP )
{
theMenu.addAction( QgisApp::getThemeIcon( "/mActionZoomToLayer.png" ),
tr( "Zoom to group" ), this, SLOT( legendLayerZoom() ) );
tr( "Zoom to Group" ), this, SLOT( legendLayerZoom() ) );

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

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

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

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

theMenu.exec( position );
}
@@ -413,20 +413,20 @@ void QgsLegendLayer::addToPopupMenu( QMenu& theMenu )

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

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

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

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

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

theMenu.addSeparator();

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

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

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

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

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

//show number of features in legend if requested
QAction* showNFeaturesAction = new QAction( tr( "Show feature count" ), &theMenu );
QAction* showNFeaturesAction = new QAction( tr( "Show Feature Count" ), &theMenu );
showNFeaturesAction->setCheckable( true );
showNFeaturesAction->setChecked( mShowFeatureCount );
QObject::connect( showNFeaturesAction, SIGNAL( toggled( bool ) ), this, SLOT( setShowFeatureCount( bool ) ) );
@@ -452,7 +452,7 @@
<normaloff>:/images/themes/default/mActionComposerManager.png</normaloff>:/images/themes/default/mActionComposerManager.png</iconset>
</property>
<property name="text">
<string>Composer manager...</string>
<string>Composer Manager...</string>
</property>
</action>
<action name="mActionExit">
@@ -686,7 +686,7 @@
<normaloff>:/images/themes/default/mActionMergeFeatures.png</normaloff>:/images/themes/default/mActionMergeFeatures.png</iconset>
</property>
<property name="text">
<string>Merge selected features</string>
<string>Merge Selected Features</string>
</property>
</action>
<action name="mActionMergeFeatureAttributes">
@@ -695,7 +695,7 @@
<normaloff>:/images/themes/default/mActionMergeFeatureAttributes.png</normaloff>:/images/themes/default/mActionMergeFeatureAttributes.png</iconset>
</property>
<property name="text">
<string>Merge attributes of selected features</string>
<string>Merge Attributes of Selected Features</string>
</property>
</action>
<action name="mActionNodeTool">
@@ -778,7 +778,7 @@
<normaloff>:/images/themes/default/mActionSelect.png</normaloff>:/images/themes/default/mActionSelect.png</iconset>
</property>
<property name="text">
<string>Select single feature</string>
<string>Select Single Feature</string>
</property>
</action>
<action name="mActionSelectRectangle">
@@ -790,7 +790,7 @@
<normaloff>:/images/themes/default/mActionSelectRectangle.png</normaloff>:/images/themes/default/mActionSelectRectangle.png</iconset>
</property>
<property name="text">
<string>Select features by rectangle</string>
<string>Select Features by Rectangle</string>
</property>
</action>
<action name="mActionSelectPolygon">
@@ -802,7 +802,7 @@
<normaloff>:/images/themes/default/mActionSelectPolygon.png</normaloff>:/images/themes/default/mActionSelectPolygon.png</iconset>
</property>
<property name="text">
<string>Select features by polygon</string>
<string>Select Features by Polygon</string>
</property>
</action>
<action name="mActionSelectFreehand">
@@ -814,7 +814,7 @@
<normaloff>:/images/themes/default/mActionSelectFreehand.png</normaloff>:/images/themes/default/mActionSelectFreehand.png</iconset>
</property>
<property name="text">
<string>Select features by freehand</string>
<string>Select Features by Freehand</string>
</property>
</action>
<action name="mActionSelectRadius">
@@ -826,7 +826,7 @@
<normaloff>:/images/themes/default/mActionSelectRadius.png</normaloff>:/images/themes/default/mActionSelectRadius.png</iconset>
</property>
<property name="text">
<string>Select features by radius</string>
<string>Select Features by Radius</string>
</property>
</action>
<action name="mActionDeselectAll">
@@ -835,7 +835,7 @@
<normaloff>:/images/themes/default/mActionDeselectAll.png</normaloff>:/images/themes/default/mActionDeselectAll.png</iconset>
</property>
<property name="text">
<string>Deselect features from all layers</string>
<string>Deselect Features from All Layers</string>
</property>
</action>
<action name="mActionIdentify">
@@ -1030,7 +1030,7 @@
<normaloff>:/images/themes/default/mActionFormAnnotation.png</normaloff>:/images/themes/default/mActionFormAnnotation.png</iconset>
</property>
<property name="text">
<string>Form annotation</string>
<string>Form Annotation</string>
</property>
</action>
<action name="mActionAnnotation">
@@ -1161,7 +1161,7 @@
<normaloff>:/images/themes/default/mActionToggleEditing.png</normaloff>:/images/themes/default/mActionToggleEditing.png</iconset>
</property>
<property name="text">
<string>Toggle editing</string>
<string>Toggle Editing</string>
</property>
<property name="statusTip">
<string>Toggles the editing state of the current layer</string>
@@ -1173,20 +1173,20 @@
<normaloff>:/images/themes/default/mActionSaveEdits.png</normaloff>:/images/themes/default/mActionSaveEdits.png</iconset>
</property>
<property name="text">
<string>Save edits</string>
<string>Save Edits</string>
</property>
<property name="statusTip">
<string>Save edits to current layer, but continue editing</string>
</property>
</action>
<action name="mActionLayerSaveAs">
<property name="text">
<string>Save as...</string>
<string>Save As...</string>
</property>
</action>
<action name="mActionLayerSelectionSaveAs">
<property name="text">
<string>Save Selection as vector file...</string>
<string>Save Selection as Vector File...</string>
</property>
</action>
<action name="mActionRemoveLayer">
@@ -1211,7 +1211,7 @@
</action>
<action name="mActionSetProjectCRSFromLayer">
<property name="text">
<string>Set project CRS from layer</string>
<string>Set Project CRS from Layer</string>
</property>
</action>
<action name="mActionTileScale">
@@ -1261,7 +1261,7 @@
<normaloff>:/images/themes/default/mActionRemoveAllFromOverview.png</normaloff>:/images/themes/default/mActionRemoveAllFromOverview.png</iconset>
</property>
<property name="text">
<string>Remove All From Overview</string>
<string>Remove All from Overview</string>
</property>
</action>
<action name="mActionShowAllLayers">
@@ -1459,7 +1459,7 @@
</action>
<action name="mActionStyleManagerV2">
<property name="text">
<string>Style manager...</string>
<string>Style Manager...</string>
</property>
</action>
<action name="mActionShowPythonDialog">
@@ -1476,7 +1476,7 @@
<string>Full histogram stretch</string>
</property>
<property name="toolTip">
<string>Stretch histogram to full dataset</string>
<string>Stretch Histogram to Full Dataset</string>
</property>
</action>
<action name="mActionAddLayerSeparator">

0 comments on commit c1147b2

Please sign in to comment.