Skip to content

Commit f269da4

Browse files
author
kyngchaos
committed
don't use plain keys for shortcuts - against common UI guidelines (OSX at least), and registers while in GRASS shell (fix #739)
git-svn-id: http://svn.osgeo.org/qgis/trunk@11389 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent df8f8a6 commit f269da4

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/app/qgisapp.cpp

+20-20
Original file line numberDiff line numberDiff line change
@@ -637,19 +637,19 @@ void QgisApp::createActions()
637637
mActionPasteFeatures->setEnabled( false );
638638

639639
mActionCapturePoint = new QAction( getThemeIcon( "mActionCapturePoint.png" ), tr( "Capture Point" ), this );
640-
shortcuts->registerAction( mActionCapturePoint, tr( ".", "Capture Points" ) );
640+
shortcuts->registerAction( mActionCapturePoint, tr( "Ctrl+.", "Capture Points" ) );
641641
mActionCapturePoint->setStatusTip( tr( "Capture Points" ) );
642642
connect( mActionCapturePoint, SIGNAL( triggered() ), this, SLOT( capturePoint() ) );
643643
mActionCapturePoint->setEnabled( false );
644644

645645
mActionCaptureLine = new QAction( getThemeIcon( "mActionCaptureLine.png" ), tr( "Capture Line" ), this );
646-
shortcuts->registerAction( mActionCaptureLine, tr( "/", "Capture Lines" ) );
646+
shortcuts->registerAction( mActionCaptureLine, tr( "Ctrl+/", "Capture Lines" ) );
647647
mActionCaptureLine->setStatusTip( tr( "Capture Lines" ) );
648648
connect( mActionCaptureLine, SIGNAL( triggered() ), this, SLOT( captureLine() ) );
649649
mActionCaptureLine->setEnabled( false );
650650

651651
mActionCapturePolygon = new QAction( getThemeIcon( "mActionCapturePolygon.png" ), tr( "Capture Polygon" ), this );
652-
shortcuts->registerAction( mActionCapturePolygon, tr( "Ctrl+/", "Capture Polygons" ) );
652+
shortcuts->registerAction( mActionCapturePolygon, tr( "Ctrl+Shift+/", "Capture Polygons" ) );
653653
mActionCapturePolygon->setStatusTip( tr( "Capture Polygons" ) );
654654
connect( mActionCapturePolygon, SIGNAL( triggered() ), this, SLOT( capturePolygon() ) );
655655
mActionCapturePolygon->setEnabled( false );
@@ -756,23 +756,23 @@ void QgisApp::createActions()
756756
mActionSelect->setEnabled( false );
757757

758758
mActionIdentify = new QAction( getThemeIcon( "mActionIdentify.png" ), tr( "Identify Features" ), this );
759-
shortcuts->registerAction( mActionIdentify, tr( "I", "Click on features to identify them" ) );
759+
shortcuts->registerAction( mActionIdentify, tr( "Ctrl+Shift+I", "Click on features to identify them" ) );
760760
mActionIdentify->setStatusTip( tr( "Click on features to identify them" ) );
761761
connect( mActionIdentify, SIGNAL( triggered() ), this, SLOT( identify() ) );
762762
mActionIdentify->setEnabled( false );
763763

764764
mActionMeasure = new QAction( getThemeIcon( "mActionMeasure.png" ), tr( "Measure Line " ), this );
765-
shortcuts->registerAction( mActionMeasure, tr( "M", "Measure a Line" ) );
765+
shortcuts->registerAction( mActionMeasure, tr( "Ctrl+Shift+M", "Measure a Line" ) );
766766
mActionMeasure->setStatusTip( tr( "Measure a Line" ) );
767767
connect( mActionMeasure, SIGNAL( triggered() ), this, SLOT( measure() ) );
768768

769769
mActionMeasureArea = new QAction( getThemeIcon( "mActionMeasureArea.png" ), tr( "Measure Area" ), this );
770-
shortcuts->registerAction( mActionMeasureArea, tr( "J", "Measure an Area" ) );
770+
shortcuts->registerAction( mActionMeasureArea, tr( "Ctrl+Shift+J", "Measure an Area" ) );
771771
mActionMeasureArea->setStatusTip( tr( "Measure an Area" ) );
772772
connect( mActionMeasureArea, SIGNAL( triggered() ), this, SLOT( measureArea() ) );
773773

774774
mActionZoomFullExtent = new QAction( getThemeIcon( "mActionZoomFullExtent.png" ), tr( "Zoom Full" ), this );
775-
shortcuts->registerAction( mActionZoomFullExtent, tr( "F", "Zoom to Full Extents" ) );
775+
shortcuts->registerAction( mActionZoomFullExtent, tr( "Ctrl+Shift+F", "Zoom to Full Extents" ) );
776776
mActionZoomFullExtent->setStatusTip( tr( "Zoom to Full Extents" ) );
777777
connect( mActionZoomFullExtent, SIGNAL( triggered() ), this, SLOT( zoomFull() ) );
778778

@@ -814,7 +814,7 @@ void QgisApp::createActions()
814814
connect( mActionNewBookmark, SIGNAL( triggered() ), this, SLOT( newBookmark() ) );
815815

816816
mActionShowBookmarks = new QAction( getThemeIcon( "mActionShowBookmarks.png" ), tr( "Show Bookmarks" ), this );
817-
shortcuts->registerAction( mActionShowBookmarks, tr( "B", "Show Bookmarks" ) );
817+
shortcuts->registerAction( mActionShowBookmarks, tr( "Ctrl+Shift+B", "Show Bookmarks" ) );
818818
mActionShowBookmarks->setStatusTip( tr( "Show Bookmarks" ) );
819819
connect( mActionShowBookmarks, SIGNAL( triggered() ), this, SLOT( showBookmarks() ) );
820820

@@ -826,22 +826,22 @@ void QgisApp::createActions()
826826
// Layer Menu Items
827827

828828
mActionNewVectorLayer = new QAction( getThemeIcon( "mActionNewVectorLayer.png" ), tr( "New Vector Layer..." ), this );
829-
shortcuts->registerAction( mActionNewVectorLayer, tr( "N", "Create a New Vector Layer" ) );
829+
shortcuts->registerAction( mActionNewVectorLayer, tr( "Ctrl+Shift+N", "Create a New Vector Layer" ) );
830830
mActionNewVectorLayer->setStatusTip( tr( "Create a New Vector Layer" ) );
831831
connect( mActionNewVectorLayer, SIGNAL( triggered() ), this, SLOT( newVectorLayer() ) );
832832

833833
mActionAddOgrLayer = new QAction( getThemeIcon( "mActionAddOgrLayer.png" ), tr( "Add Vector Layer..." ), this );
834-
shortcuts->registerAction( mActionAddOgrLayer, tr( "V", "Add a Vector Layer" ) );
834+
shortcuts->registerAction( mActionAddOgrLayer, tr( "Ctrl+Shift+V", "Add a Vector Layer" ) );
835835
mActionAddOgrLayer->setStatusTip( tr( "Add a Vector Layer" ) );
836836
connect( mActionAddOgrLayer, SIGNAL( triggered() ), this, SLOT( addVectorLayer() ) );
837837

838838
mActionAddRasterLayer = new QAction( getThemeIcon( "mActionAddRasterLayer.png" ), tr( "Add Raster Layer..." ), this );
839-
shortcuts->registerAction( mActionAddRasterLayer, tr( "R", "Add a Raster Layer" ) );
839+
shortcuts->registerAction( mActionAddRasterLayer, tr( "Ctrl+Shift+R", "Add a Raster Layer" ) );
840840
mActionAddRasterLayer->setStatusTip( tr( "Add a Raster Layer" ) );
841841
connect( mActionAddRasterLayer, SIGNAL( triggered() ), this, SLOT( addRasterLayer() ) );
842842

843843
mActionAddPgLayer = new QAction( getThemeIcon( "mActionAddLayer.png" ), tr( "Add PostGIS Layer..." ), this );
844-
shortcuts->registerAction( mActionAddPgLayer, tr( "D", "Add a PostGIS Layer" ) );
844+
shortcuts->registerAction( mActionAddPgLayer, tr( "Ctrl+Shift+D", "Add a PostGIS Layer" ) );
845845
mActionAddPgLayer->setStatusTip( tr( "Add a PostGIS Layer" ) );
846846
//#ifdef HAVE_POSTGRESQL
847847
// QgsDebugMsg("HAVE_POSTGRESQL is defined");
@@ -853,7 +853,7 @@ void QgisApp::createActions()
853853
connect( mActionAddPgLayer, SIGNAL( triggered() ), this, SLOT( addDatabaseLayer() ) );
854854

855855
mActionAddSpatiaLiteLayer = new QAction( getThemeIcon( "mActionAddSpatiaLiteLayer.png" ), tr( "Add SpatiaLite Layer..." ), this );
856-
shortcuts->registerAction( mActionAddSpatiaLiteLayer, tr( "L", "Add a SpatiaLite Layer" ) );
856+
shortcuts->registerAction( mActionAddSpatiaLiteLayer, tr( "Ctrl+Shift+L", "Add a SpatiaLite Layer" ) );
857857
mActionAddSpatiaLiteLayer->setStatusTip( tr( "Add a SpatiaLite Layer" ) );
858858
connect( mActionAddSpatiaLiteLayer, SIGNAL( triggered() ), this, SLOT( addSpatiaLiteLayer() ) );
859859
//#ifdef HAVE_SPATIALITE
@@ -865,7 +865,7 @@ void QgisApp::createActions()
865865
//#endif
866866

867867
mActionAddWmsLayer = new QAction( getThemeIcon( "mActionAddWmsLayer.png" ), tr( "Add WMS Layer..." ), this );
868-
shortcuts->registerAction( mActionAddWmsLayer, tr( "W", "Add a Web Mapping Server Layer" ) );
868+
shortcuts->registerAction( mActionAddWmsLayer, tr( "Ctrl+Shift+W", "Add a Web Mapping Server Layer" ) );
869869
mActionAddWmsLayer->setStatusTip( tr( "Add a Web Mapping Server Layer" ) );
870870
connect( mActionAddWmsLayer, SIGNAL( triggered() ), this, SLOT( addWmsLayer() ) );
871871

@@ -907,28 +907,28 @@ void QgisApp::createActions()
907907
mActionLayerProperties->setEnabled( false );
908908

909909
mActionAddToOverview = new QAction( getThemeIcon( "mActionInOverview.png" ), tr( "Add to Overview" ), this );
910-
shortcuts->registerAction( mActionAddToOverview, tr( "O", "Add current layer to overview map" ) );
910+
shortcuts->registerAction( mActionAddToOverview, tr( "Ctrl+Shift+O", "Add current layer to overview map" ) );
911911
mActionAddToOverview->setStatusTip( tr( "Add current layer to overview map" ) );
912912
connect( mActionAddToOverview, SIGNAL( triggered() ), this, SLOT( isInOverview() ) );
913913
mActionAddToOverview->setEnabled( false );
914914

915915
mActionAddAllToOverview = new QAction( getThemeIcon( "mActionAddAllToOverview.png" ), tr( "Add All to Overview" ), this );
916-
shortcuts->registerAction( mActionAddAllToOverview, tr( "+", "Show all layers in the overview map" ) );
916+
shortcuts->registerAction( mActionAddAllToOverview ); //, tr( "+", "Show all layers in the overview map" ) );
917917
mActionAddAllToOverview->setStatusTip( tr( "Show all layers in the overview map" ) );
918918
connect( mActionAddAllToOverview, SIGNAL( triggered() ), this, SLOT( addAllToOverview() ) );
919919

920920
mActionRemoveAllFromOverview = new QAction( getThemeIcon( "mActionRemoveAllFromOverview.png" ), tr( "Remove All From Overview" ), this );
921-
shortcuts->registerAction( mActionRemoveAllFromOverview, tr( "-", "Remove all layers from overview map" ) );
921+
shortcuts->registerAction( mActionRemoveAllFromOverview ); //, tr( "-", "Remove all layers from overview map" ) );
922922
mActionRemoveAllFromOverview->setStatusTip( tr( "Remove all layers from overview map" ) );
923923
connect( mActionRemoveAllFromOverview, SIGNAL( triggered() ), this, SLOT( removeAllFromOverview() ) );
924924

925925
mActionShowAllLayers = new QAction( getThemeIcon( "mActionShowAllLayers.png" ), tr( "Show All Layers" ), this );
926-
shortcuts->registerAction( mActionShowAllLayers, tr( "S", "Show all layers" ) );
926+
shortcuts->registerAction( mActionShowAllLayers, tr( "Ctrl+Shift+U", "Show all layers" ) );
927927
mActionShowAllLayers->setStatusTip( tr( "Show all layers" ) );
928928
connect( mActionShowAllLayers, SIGNAL( triggered() ), this, SLOT( showAllLayers() ) );
929929

930930
mActionHideAllLayers = new QAction( getThemeIcon( "mActionHideAllLayers.png" ), tr( "Hide All Layers" ), this );
931-
shortcuts->registerAction( mActionHideAllLayers, tr( "H", "Hide all layers" ) );
931+
shortcuts->registerAction( mActionHideAllLayers, tr( "Ctrl+Shift+H", "Hide all layers" ) );
932932
mActionHideAllLayers->setStatusTip( tr( "Hide all layers" ) );
933933
connect( mActionHideAllLayers, SIGNAL( triggered() ), this, SLOT( hideAllLayers() ) );
934934

@@ -947,7 +947,7 @@ void QgisApp::createActions()
947947
connect( mActionToggleFullScreen, SIGNAL( triggered() ), this, SLOT( toggleFullScreen() ) );
948948

949949
mActionProjectProperties = new QAction( getThemeIcon( "mActionProjectProperties.png" ), tr( "Project Properties..." ), this );
950-
shortcuts->registerAction( mActionProjectProperties, tr( "P", "Set project properties" ) );
950+
shortcuts->registerAction( mActionProjectProperties, tr( "Ctrl+Shift+P", "Set project properties" ) );
951951
mActionProjectProperties->setStatusTip( tr( "Set project properties" ) );
952952
connect( mActionProjectProperties, SIGNAL( triggered() ), this, SLOT( projectProperties() ) );
953953

0 commit comments

Comments
 (0)