Add Ctrl+, hotkey to preferences dialog
Also change interactive router settings from Ctrl+, to Ctrl+Shift+,
(cherry picked from commit b0674b8802
)
This commit is contained in:
parent
9ad352d4bd
commit
7cc3e9a16d
|
@ -116,6 +116,7 @@ static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-',
|
|||
#endif
|
||||
|
||||
static EDA_HOTKEY HkHelp( _HKI( "List Hotkeys" ), HK_HELP, GR_KB_CTRL + WXK_F1 );
|
||||
static EDA_HOTKEY HkPreferences( _HKI( "Preferences" ), HK_PREFERENCES, GR_KB_CTRL + ',', (int) wxID_PREFERENCES );
|
||||
static EDA_HOTKEY HkResetLocalCoord( _HKI( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' );
|
||||
static EDA_HOTKEY HkLeaveSheet( _HKI( "Leave Sheet" ), HK_LEAVE_SHEET, GR_KB_ALT + WXK_BACK,
|
||||
ID_POPUP_SCH_LEAVE_SHEET );
|
||||
|
@ -262,6 +263,7 @@ static EDA_HOTKEY* common_Hotkey_List[] =
|
|||
&HkUndo, &HkRedo,
|
||||
&HkEditCut, &HkEditCopy, &HkEditPaste,
|
||||
&HkHelp,
|
||||
&HkPreferences,
|
||||
&HkZoomIn,
|
||||
&HkZoomOut,
|
||||
&HkZoomRedraw,
|
||||
|
@ -462,6 +464,11 @@ bool SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
|||
DisplayHotkeyList( this, g_Schematic_Hotkeys_Descr );
|
||||
break;
|
||||
|
||||
case HK_PREFERENCES:
|
||||
cmd.SetId( wxID_PREFERENCES );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
break;
|
||||
|
||||
case HK_RESET_LOCAL_COORD: // Reset the relative coord
|
||||
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||
break;
|
||||
|
@ -710,6 +717,11 @@ bool LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
|||
DisplayHotkeyList( this, g_Libedit_Hotkeys_Descr );
|
||||
break;
|
||||
|
||||
case HK_PREFERENCES:
|
||||
cmd.SetId( wxID_PREFERENCES );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
break;
|
||||
|
||||
case HK_RESET_LOCAL_COORD: // Reset the relative coord
|
||||
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||
break;
|
||||
|
|
|
@ -329,9 +329,8 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
|||
preferencesMenu->AppendSeparator();
|
||||
|
||||
// Default values and options
|
||||
AddMenuItem( preferencesMenu,
|
||||
wxID_PREFERENCES,
|
||||
_( "&Preferences..." ),
|
||||
text = AddHotkeyName( _( "&Preferences..." ), g_Libedit_Hotkeys_Descr, HK_PREFERENCES );
|
||||
AddMenuItem( preferencesMenu, wxID_PREFERENCES, text,
|
||||
_( "Show preferences for all open tools" ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
|
|
|
@ -628,7 +628,8 @@ static void preparePreferencesMenu( SCH_EDIT_FRAME* aFrame, wxMenu* aParentMenu
|
|||
KiBitmap( library_table_xpm ) );
|
||||
|
||||
// Options (Preferences on WXMAC)
|
||||
AddMenuItem( aParentMenu, wxID_PREFERENCES, _( "Preferences..." ),
|
||||
wxString text = AddHotkeyName( _( "&Preferences..." ), g_Eeschema_Hotkeys_Descr, HK_PREFERENCES );
|
||||
AddMenuItem( aParentMenu, wxID_PREFERENCES, text,
|
||||
_( "Show preferences for all open tools" ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
|
@ -639,7 +640,7 @@ static void preparePreferencesMenu( SCH_EDIT_FRAME* aFrame, wxMenu* aParentMenu
|
|||
|
||||
aParentMenu->AppendSeparator();
|
||||
|
||||
wxString text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Eeschema_Hotkeys_Descr,
|
||||
text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Eeschema_Hotkeys_Descr,
|
||||
HK_CANVAS_OPENGL );
|
||||
AddMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL, text,
|
||||
_( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
|
||||
|
|
|
@ -65,6 +65,8 @@ static EDA_HOTKEY HkZoomOut( _HKI( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 );
|
|||
static EDA_HOTKEY HkZoomIn( _HKI( "Zoom In" ), HK_ZOOM_IN, WXK_F1 );
|
||||
static EDA_HOTKEY HkZoomSelection( _HKI( "Zoom to Selection" ),
|
||||
HK_ZOOM_SELECTION, GR_KB_CTRL + WXK_F5 );
|
||||
static EDA_HOTKEY HkPreferences( _HKI( "Preferences" ),
|
||||
HK_PREFERENCES, GR_KB_CTRL + ',', (int) wxID_PREFERENCES );
|
||||
static EDA_HOTKEY HkHelp( _HKI( "List Hotkeys" ), HK_HELP, GR_KB_CTRL + WXK_F1 );
|
||||
static EDA_HOTKEY HkSwitchUnits( _HKI( "Switch Units" ), HK_SWITCH_UNITS, 'U' );
|
||||
static EDA_HOTKEY HkResetLocalCoord( _HKI( "Reset Local Coordinates" ),
|
||||
|
@ -112,7 +114,7 @@ static EDA_HOTKEY HkMeasureTool( _HKI( "Measure Distance (Modern Toolset only)"
|
|||
|
||||
// List of common hotkey descriptors
|
||||
EDA_HOTKEY* gerbviewHotkeyList[] = {
|
||||
&HkHelp,
|
||||
&HkHelp, &HkPreferences,
|
||||
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
|
||||
&HkZoomAuto, &HkZoomSelection, &HkSwitchUnits, &HkResetLocalCoord,
|
||||
&HkLinesDisplayMode, &HkFlashedDisplayMode, &HkPolygonDisplayMode,
|
||||
|
@ -175,6 +177,11 @@ bool GERBVIEW_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
|
|||
DisplayHotkeyList( this, GerbviewHotkeysDescr );
|
||||
break;
|
||||
|
||||
case HK_PREFERENCES:
|
||||
cmd.SetId( wxID_PREFERENCES );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
break;
|
||||
|
||||
case HK_ZOOM_IN:
|
||||
cmd.SetId( ID_KEY_ZOOM_IN );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
|
|
|
@ -299,9 +299,9 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
|
|||
wxMenu* configMenu = new wxMenu;
|
||||
|
||||
// Options (Preferences on WXMAC)
|
||||
AddMenuItem( configMenu, wxID_PREFERENCES,
|
||||
_( "&Preferences..." ),
|
||||
wxEmptyString,
|
||||
text = AddHotkeyName( _( "&Preferences..." ), GerbviewHotkeysDescr, HK_PREFERENCES );
|
||||
AddMenuItem( configMenu, wxID_PREFERENCES, text,
|
||||
_( "Show preferences for all open tools" ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
// Canvas selection
|
||||
|
|
|
@ -280,6 +280,7 @@ enum common_hotkey_id_commnand {
|
|||
HK_ZOOM_CENTER,
|
||||
HK_ZOOM_AUTO,
|
||||
HK_ZOOM_SELECTION,
|
||||
HK_PREFERENCES,
|
||||
HK_TOGGLE_CURSOR,
|
||||
HK_MEASURE_TOOL,
|
||||
HK_COMMON_END
|
||||
|
|
|
@ -151,6 +151,8 @@ static EDA_HOTKEY HkNewProject( _HKI( "New Project" ), HK_NEW, GR_KB_CTRL + 'N'
|
|||
static EDA_HOTKEY HkOpenProject( _HKI( "Open Project" ), HK_OPEN, GR_KB_CTRL + 'O' );
|
||||
static EDA_HOTKEY HkSaveProject( _HKI( "Save Project" ), HK_SAVE, GR_KB_CTRL + 'S' );
|
||||
static EDA_HOTKEY HkHelp( _HKI( "List Hotkeys" ), HK_HELP, GR_KB_CTRL + WXK_F1 );
|
||||
static EDA_HOTKEY HkPreferences( _HKI( "Preferences" ),
|
||||
HK_PREFERENCES, GR_KB_CTRL + ',', (int) wxID_PREFERENCES );
|
||||
|
||||
// List of hotkey descriptors
|
||||
EDA_HOTKEY* common_Hotkey_List[] =
|
||||
|
@ -161,7 +163,7 @@ EDA_HOTKEY* common_Hotkey_List[] =
|
|||
#if 0
|
||||
&HkSaveProject,
|
||||
#endif
|
||||
&HkRefresh, &HkHelp,
|
||||
&HkRefresh, &HkHelp, &HkPreferences,
|
||||
&HkRunEeschema, &HkRunLibedit,
|
||||
&HkRunPcbnew, &HkRunModedit, &HkRunGerbview,
|
||||
&HkRunBm2Cmp, &HkRunPcbCalc, &HkRunPleditor,
|
||||
|
@ -350,9 +352,8 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
|
|||
_( "Configure footprint library table" ),
|
||||
KiBitmap( library_table_xpm ) );
|
||||
|
||||
AddMenuItem( preferencesMenu,
|
||||
wxID_PREFERENCES,
|
||||
_( "&Preferences..." ),
|
||||
msg = AddHotkeyName( _( "&Preferences..." ), kicad_Manager_Hotkeys_Descr, HK_PREFERENCES );
|
||||
AddMenuItem( preferencesMenu, wxID_PREFERENCES, msg,
|
||||
_( "Show preferences for all open tools" ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@ static EDA_HOTKEY HkSave( _HKI( "Save" ), HK_SAVE, GR_KB_CTRL + 'S', (int) wxID_
|
|||
static EDA_HOTKEY HkSaveAs( _HKI( "Save As" ), HK_SAVEAS, GR_KB_CTRL + GR_KB_SHIFT + 'S',
|
||||
(int) wxID_SAVEAS );
|
||||
static EDA_HOTKEY HkPrint( _HKI( "Print" ), HK_PRINT, GR_KB_CTRL + 'P', (int) wxID_PRINT );
|
||||
static EDA_HOTKEY HkPreferences( _HKI( "Preferences" ), HK_PREFERENCES, GR_KB_CTRL + ',', (int) wxID_PREFERENCES );
|
||||
|
||||
// List of common hotkey descriptors
|
||||
EDA_HOTKEY* s_Common_Hotkey_List[] =
|
||||
|
@ -107,7 +108,7 @@ EDA_HOTKEY* s_Common_Hotkey_List[] =
|
|||
&HkUndo, &HkRedo,
|
||||
&HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter,
|
||||
&HkZoomAuto, &HkZoomSelection, &HkResetLocalCoord,
|
||||
&HkHelp,
|
||||
&HkHelp, &HkPreferences,
|
||||
&HkMouseLeftClick,
|
||||
&HkMouseLeftDClick,
|
||||
NULL
|
||||
|
@ -256,6 +257,11 @@ bool PL_EDITOR_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode,
|
|||
DisplayHotkeyList( this, PlEditorHotkeysDescr );
|
||||
break;
|
||||
|
||||
case HK_PREFERENCES:
|
||||
cmd.SetId( wxID_PREFERENCES );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
break;
|
||||
|
||||
case HK_SET_GRID_ORIGIN:
|
||||
SetGridOrigin( GetCrossHairPosition() );
|
||||
break;
|
||||
|
|
|
@ -172,7 +172,8 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
|
|||
// Menu for preferences
|
||||
wxMenu* preferencesMenu = new wxMenu;
|
||||
|
||||
AddMenuItem( preferencesMenu, wxID_PREFERENCES, _( "&Preferences..." ),
|
||||
msg = AddHotkeyName( _( "&Preferences..." ), PlEditorHotkeysDescr, HK_PREFERENCES );
|
||||
AddMenuItem( preferencesMenu, wxID_PREFERENCES, msg,
|
||||
_( "Show preferences for all open tools" ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ static EDA_HOTKEY HkSelectCopper( _HKI( "Select Connected Tracks" ), HK_SEL_COPP
|
|||
'I' );
|
||||
|
||||
static EDA_HOTKEY HkRoutingOptions( _HKI( "Routing Options" ), HK_ROUTING_OPTIONS,
|
||||
',' + GR_KB_CTRL );
|
||||
',' + GR_KB_CTRL + GR_KB_SHIFT );
|
||||
|
||||
static EDA_HOTKEY HkCustomTrackWidth( _HKI( "Custom Track/Via Size" ), HK_CUSTOM_TRACK_WIDTH, 'Q' );
|
||||
|
||||
|
@ -327,6 +327,8 @@ static EDA_HOTKEY HkRedo( _HKI( "Redo" ), HK_REDO,
|
|||
static EDA_HOTKEY HkEditCut( _HKI( "Cut" ), HK_EDIT_CUT, GR_KB_CTRL + 'X', (int) wxID_CUT );
|
||||
static EDA_HOTKEY HkEditCopy( _HKI( "Copy" ), HK_EDIT_COPY, GR_KB_CTRL + 'C', (int) wxID_COPY );
|
||||
static EDA_HOTKEY HkEditPaste( _HKI( "Paste" ), HK_EDIT_PASTE, GR_KB_CTRL + 'V', (int) wxID_PASTE );
|
||||
static EDA_HOTKEY HkPreferences( _HKI( "Preferences" ),
|
||||
HK_PREFERENCES, GR_KB_CTRL + ',', (int) wxID_PREFERENCES );
|
||||
|
||||
static EDA_HOTKEY HkToggleCursor( _HKI( "Toggle Cursor Display (Modern Toolset only)" ),
|
||||
HK_TOGGLE_CURSOR, 'X' + GR_KB_SHIFTCTRL );
|
||||
|
@ -342,8 +344,10 @@ EDA_HOTKEY* common_Hotkey_List[] =
|
|||
&HkNew, &HkOpen, &HkSave, &HkSaveAs, &HkPrint,
|
||||
&HkUndo, &HkRedo,
|
||||
&HkEditCut, &HkEditCopy, &HkEditPaste,
|
||||
&HkHelp, &HkZoomIn, &HkZoomOut,
|
||||
&HkZoomRedraw, &HkZoomCenter, &HkZoomAuto, &HkZoomSelection, &Hk3DViewer,
|
||||
&HkHelp, &HkPreferences,
|
||||
&HkZoomIn, &HkZoomOut,
|
||||
&HkZoomRedraw, &HkZoomCenter, &HkZoomAuto, &HkZoomSelection,
|
||||
&Hk3DViewer,
|
||||
&HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin, &HkResetGridOrigin,
|
||||
&HkMouseLeftClick,
|
||||
&HkMouseLeftDClick,
|
||||
|
|
|
@ -221,6 +221,10 @@ bool PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit
|
|||
DisplayHotkeyList( this, g_Board_Editor_Hotkeys_Descr );
|
||||
break;
|
||||
|
||||
case HK_PREFERENCES:
|
||||
evt_type = wxID_PREFERENCES;
|
||||
break;
|
||||
|
||||
case HK_ZOOM_IN:
|
||||
evt_type = ID_KEY_ZOOM_IN;
|
||||
break;
|
||||
|
|
|
@ -88,6 +88,11 @@ bool FOOTPRINT_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPos
|
|||
DisplayHotkeyList( this, g_Module_Editor_Hotkeys_Descr );
|
||||
break;
|
||||
|
||||
case HK_PREFERENCES:
|
||||
cmd.SetId( wxID_PREFERENCES );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
break;
|
||||
|
||||
case HK_RESET_LOCAL_COORD: // set local (relative) coordinate origin
|
||||
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||
break;
|
||||
|
|
|
@ -426,8 +426,9 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
KiBitmap( library_table_xpm ) );
|
||||
|
||||
// Settings
|
||||
AddMenuItem( prefs_menu, wxID_PREFERENCES,
|
||||
_( "&Preferences..." ), _( "Show preferences for all open tools" ),
|
||||
text = AddHotkeyName( _( "&Preferences..." ), m_hotkeysDescrList, HK_PREFERENCES );
|
||||
AddMenuItem( prefs_menu, wxID_PREFERENCES, text,
|
||||
_( "Show preferences for all open tools" ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
prefs_menu->AppendSeparator();
|
||||
|
|
|
@ -153,8 +153,9 @@ void preparePreferencesMenu( PCB_EDIT_FRAME* aFrame, wxMenu* aParentMenu )
|
|||
|
||||
wxString text;
|
||||
|
||||
AddMenuItem( aParentMenu, wxID_PREFERENCES,
|
||||
_( "&Preferences..." ), _( "Show preferences for all open tools" ),
|
||||
text = AddHotkeyName( _( "&Preferences..." ), g_Board_Editor_Hotkeys_Descr, HK_PREFERENCES );
|
||||
AddMenuItem( aParentMenu, wxID_PREFERENCES, text,
|
||||
_( "Show preferences for all open tools" ),
|
||||
KiBitmap( preference_xpm ) );
|
||||
|
||||
if( ADVANCED_CFG::GetCfg().AllowLegacyCanvas() )
|
||||
|
|
Loading…
Reference in New Issue