Skip to content

Commit

Permalink
Make the capitalization of menu items and tools consistent in the main
Browse files Browse the repository at this point in the history
window and layer popup UI.
  • Loading branch information
g-sherman committed Mar 2, 2012
1 parent 337eec3 commit fa4ec86
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 41 deletions.
16 changes: 8 additions & 8 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -609,19 +609,19 @@ void QgsLegend::handleRightClickEvent( QTreeWidgetItem* item, const QPoint& posi

if ( li->parent() && !parentGroupEmbedded( li ) )
{
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 ) && !groupEmbedded( li ) && !parentGroupEmbedded( li ) )
Expand All @@ -633,16 +633,16 @@ void QgsLegend::handleRightClickEvent( QTreeWidgetItem* item, const QPoint& posi
//
if ( selectedLayers().length() > 1 )
{
theMenu.addAction( tr( "&Group selected" ), this, SLOT( groupSelectedLayers() ) );
theMenu.addAction( tr( "&Group Selected" ), this, SLOT( groupSelectedLayers() ) );
}
// ends here
}

theMenu.addAction( QgisApp::getThemeIcon( "/folder_new.png" ), tr( "&Add new 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 New 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() ) );

QAction *updateDrawingOrderAction = theMenu.addAction( QgisApp::getThemeIcon( "/mUpdateDrawingOrder.png" ), tr( "&Update drawing order" ), this, SLOT( toggleDrawingOrderUpdate() ) );
QAction *updateDrawingOrderAction = theMenu.addAction( QgisApp::getThemeIcon( "/mUpdateDrawingOrder.png" ), tr( "&Update Drawing Order" ), this, SLOT( toggleDrawingOrderUpdate() ) );
updateDrawingOrderAction->setCheckable( true );
updateDrawingOrderAction->setChecked( mUpdateDrawingOrder );

Expand Down
20 changes: 10 additions & 10 deletions src/app/legend/qgslegendlayer.cpp
Expand Up @@ -416,20 +416,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() );
Expand All @@ -439,10 +439,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();

Expand All @@ -451,7 +451,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
Expand All @@ -466,10 +466,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 );
Expand All @@ -479,7 +479,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 ) ) );
Expand Down
46 changes: 23 additions & 23 deletions src/ui/qgisapp.ui
Expand Up @@ -497,7 +497,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">
Expand Down Expand Up @@ -584,7 +584,7 @@
<normaloff>:/images/themes/default/mActionAddFeature.png</normaloff>:/images/themes/default/mActionAddFeature.png</iconset>
</property>
<property name="text">
<string>Add feature</string>
<string>Add Feature</string>
</property>
<property name="shortcut">
<string>Ctrl+.</string>
Expand Down Expand Up @@ -701,7 +701,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">
Expand All @@ -710,7 +710,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">
Expand Down Expand Up @@ -793,7 +793,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">
Expand All @@ -805,7 +805,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">
Expand All @@ -817,7 +817,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">
Expand All @@ -829,7 +829,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">
Expand All @@ -841,7 +841,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">
Expand All @@ -850,7 +850,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">
Expand Down Expand Up @@ -1045,7 +1045,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">
Expand Down Expand Up @@ -1128,7 +1128,7 @@
<normaloff>:/images/themes/default/mActionAddLayer.png</normaloff>:/images/themes/default/mActionAddLayer.png</iconset>
</property>
<property name="text">
<string>Add PostGIS layers...</string>
<string>Add PostGIS Layers...</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+D</string>
Expand Down Expand Up @@ -1176,7 +1176,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>
Expand All @@ -1188,20 +1188,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">
Expand All @@ -1226,7 +1226,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">
Expand Down Expand Up @@ -1271,7 +1271,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">
Expand Down Expand Up @@ -1469,7 +1469,7 @@
</action>
<action name="mActionStyleManagerV2">
<property name="text">
<string>Style manager...</string>
<string>Style Manager...</string>
</property>
</action>
<action name="mActionShowPythonDialog">
Expand All @@ -1486,7 +1486,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">
Expand Down Expand Up @@ -1525,7 +1525,7 @@
</action>
<action name="mActionEmbedLayers">
<property name="text">
<string>Embed layers and groups...</string>
<string>Embed Layers and Groups...</string>
</property>
<property name="toolTip">
<string>Embed layers and groups from other project files</string>
Expand Down Expand Up @@ -1591,7 +1591,7 @@
<string>Feature Action</string>
</property>
<property name="toolTip">
<string>Run feature action</string>
<string>Run Feature Action</string>
</property>
</action>
<action name="mActionPanToSelected">
Expand All @@ -1615,7 +1615,7 @@
<normaloff>:/images/themes/default/mActionOffsetCurve.png</normaloff>:/images/themes/default/mActionOffsetCurve.png</iconset>
</property>
<property name="text">
<string>Offset curve</string>
<string>Offset Curve</string>
</property>
</action>
</widget>
Expand Down

0 comments on commit fa4ec86

Please sign in to comment.