Loading kicad/bitmaps/Editor.xpm→bitmaps/Editor.xpm +6 −1 Original line number Original line Diff line number Diff line /* XPM */ /* XPM */ static char * editor_xpm[] = { #ifndef XPMMAIN extern char *editor_xpm[]; #else char * editor_xpm[] = { "16 16 60 1", "16 16 60 1", " c None", " c None", ". c #000000", ". c #000000", Loading Loading @@ -77,3 +81,4 @@ static char * editor_xpm[] = { " .@mnnnpprrrs. ", " .@mnnnpprrrs. ", " .lqqqttssssu. ", " .lqqqttssssu. ", " ........... "}; " ........... "}; #endif change_log.txt +5 −0 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,11 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with email address. email address. 2007-sept-19 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ + all * hotkeys handling finished 2007-Sep-14 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Sep-14 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ ================================================================================ Loading common/edaappl.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -250,6 +250,7 @@ unsigned ii; { { m_LanguageId = m_EDA_CommonConfig->Read(wxT("Language"), wxLANGUAGE_DEFAULT); m_LanguageId = m_EDA_CommonConfig->Read(wxT("Language"), wxLANGUAGE_DEFAULT); g_EditorName = m_EDA_CommonConfig->Read(wxT("Editor")); g_EditorName = m_EDA_CommonConfig->Read(wxT("Editor")); g_ConfigFileLocationChoice = m_EDA_CommonConfig->Read(HOTKEY_CFG_PATH_OPT, 0L); } } if ( ! m_EDA_Config ) return; if ( ! m_EDA_Config ) return; Loading common/hotkeys_basic.cpp +177 −97 Original line number Original line Diff line number Diff line Loading @@ -10,6 +10,9 @@ #include "wxstruct.h" #include "wxstruct.h" #include "hotkeys_basic.h" #include "hotkeys_basic.h" #include "macros.h" #include "macros.h" #include "bitmaps.h" #include "id.h" /* Class to handle hotkey commnands. hotkeys have a default value /* Class to handle hotkey commnands. hotkeys have a default value * This class allows the real key code changed by user from a key code list file * This class allows the real key code changed by user from a key code list file Loading Loading @@ -345,7 +348,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfigFile( const wxString& * @param Filename = default full file name to create. If void, A filename will be asked * @param Filename = default full file name to create. If void, A filename will be asked * @param List = pointer to the current hotkey list. * @param List = pointer to the current hotkey list. * the ouput format is: shortcut "key" "function" * the ouput format is: shortcut "key" "function" * lines starting by # are comments * lines starting with # are comments * * */ */ { { Loading @@ -358,7 +361,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfigFile( const wxString& wxString Mask, Path, Ext; wxString Mask, Path, Ext; Ext = DEFAULT_HOTKEY_FILENAME_EXT; Ext = DEFAULT_HOTKEY_FILENAME_EXT; Mask = wxT( "*" ) + Ext; Mask = wxT( "*" ) + Ext; Path = DEFAULT_HOTKEY_FILENAME_PATH; Path = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ); FullFilename = EDA_FileSelector( _( "Hotkey configuration file:" ), FullFilename = EDA_FileSelector( _( "Hotkey configuration file:" ), Path, /* Chemin par defaut */ Path, /* Chemin par defaut */ FullFilename, /* nom fichier par defaut */ FullFilename, /* nom fichier par defaut */ Loading Loading @@ -476,7 +479,7 @@ int WinEDA_BasicFrame::ReadHotkeyConfigFile( const wxString& wxString Mask, Path, Ext; wxString Mask, Path, Ext; Ext = DEFAULT_HOTKEY_FILENAME_EXT; Ext = DEFAULT_HOTKEY_FILENAME_EXT; Mask = wxT( "*" ) + Ext; Mask = wxT( "*" ) + Ext; Path = DEFAULT_HOTKEY_FILENAME_PATH; Path = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ); FullFilename = EDA_FileSelector( _( "Hotkey configuration file:" ), FullFilename = EDA_FileSelector( _( "Hotkey configuration file:" ), Path, /* Chemin par defaut */ Path, /* Chemin par defaut */ FullFilename, /* nom fichier par defaut */ FullFilename, /* nom fichier par defaut */ Loading Loading @@ -560,3 +563,80 @@ int WinEDA_BasicFrame::ReadHotkeyConfigFile( const wxString& fclose( cfgfile ); fclose( cfgfile ); return 1; return 1; } } /****************************************************/ wxString ReturnHotkeyConfigFilePath( int choice ) /****************************************************/ /* return the hotkey config file path * @param choice : 0 = home, 1 = kicad/template */ { wxString path; switch( choice ) { case 0: path = DEFAULT_HOTKEY_FILENAME_PATH_IS_HOME; break; case 1: path = DEFAULT_HOTKEY_FILENAME_PATH_IS_KICAD; break; default: break; } return path; } /***************************************/ void AddHotheyConfigMenu( wxMenu* menu ) /***************************************/ /* add hotkey config options to a menu * @parm menu : initial menu */ { wxMenuItem* item; if( menu == NULL ) return; item = new wxMenuItem( menu, ID_PREFERENCES_CREATE_CONFIG_HOTKEYS, _( "Create Hotkey config file" ), _( "Create or Recreate the hotkey config file from current hotkey list" ) ); item->SetBitmap( save_setup_xpm ); menu->Append( item ); item = new wxMenuItem( menu, ID_PREFERENCES_READ_CONFIG_HOTKEYS, _( "Reread Hotkey config file" ), _( "Reread the hotkey config file" ) ); item->SetBitmap( reload_xpm ); menu->Append( item ); item = new wxMenuItem( menu, ID_PREFERENCES_EDIT_CONFIG_HOTKEYS, _( "Edit Hotkey config file" ), _( "Run the text editor and edit the hotkey config file" ) ); item->SetBitmap( editor_xpm ); menu->Append( item ); wxMenu* submenu_hkcfg = new wxMenu(); item = new wxMenuItem( submenu_hkcfg, ID_PREFERENCES_HOTKEY_PATH_IS_HOME, _( "home directory" ), _( "Use home directory to load or store Hotkey config files" ), wxITEM_CHECK ); submenu_hkcfg->Append( item ); item = new wxMenuItem( submenu_hkcfg, ID_PREFERENCES_HOTKEY_PATH_IS_KICAD, _( "kicad/template directory" ), _( "Use kicad/templatedirectory to load or store Hotkey config files" ), wxITEM_CHECK ); submenu_hkcfg->Append( item ); ADD_MENUITEM_WITH_HELP_AND_SUBMENU( menu, submenu_hkcfg, -1, _( "Hotkey config location" ), _( "Hotkey config file location selection (home directory or kicad tree)" ), right_xpm ); } eeschema/edit_label.cpp +8 −10 Original line number Original line Diff line number Diff line Loading @@ -236,17 +236,17 @@ EDA_BaseStruct* WinEDA_SchematicFrame::CreateNewText( wxDC* DC, int type ) /************************************/ /************************************/ /* Redraw a Texte while moving */ /* Redraw a Text while moving */ /************************************/ /************************************/ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) { { EDA_BaseStruct* TextStruct = panel->GetScreen()->GetCurItem(); EDA_BaseStruct* TextStruct = panel->GetScreen()->GetCurItem(); /* effacement ancienne position */ /* "Undraw" the current text at its old position*/ if( erase ) if( erase ) RedrawOneStruct( panel, DC, TextStruct, g_XorMode ); RedrawOneStruct( panel, DC, TextStruct, g_XorMode ); /* Redessin du texte */ /* redraw the text */ switch( TextStruct->Type() ) switch( TextStruct->Type() ) { { case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE: Loading @@ -266,7 +266,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) /*************************************************************/ /*************************************************************/ static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC ) static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC ) /*************************************************************/ /*************************************************************/ /* Routine de sortie des menus de Texte */ /* Abort function for the command move text */ { { SCH_SCREEN* screen = (SCH_SCREEN*) Panel->m_Parent->m_CurrentScreen; SCH_SCREEN* screen = (SCH_SCREEN*) Panel->m_Parent->m_CurrentScreen; EDA_BaseStruct* Struct = screen->GetCurItem(); EDA_BaseStruct* Struct = screen->GetCurItem(); Loading @@ -275,22 +275,20 @@ static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC ) Panel->ManageCurseur = NULL; Panel->ManageCurseur = NULL; Panel->ForceCloseManageCurseur = NULL; Panel->ForceCloseManageCurseur = NULL; if( Struct == NULL ) /* Pas de trace en cours */ if( Struct == NULL ) /* no current item */ { { return; return; } } /* ici : trace en cours */ /* "Undraw" the text, and delete it if new (i.e. it was beiing just created)*/ /* Effacement du trace en cours et suppression eventuelle de la structure */ RedrawOneStruct( Panel, DC, Struct, g_XorMode ); RedrawOneStruct( Panel, DC, Struct, g_XorMode ); if( Struct->m_Flags & IS_NEW ) /* Suppression du nouveau texte en cours de placement */ if( Struct->m_Flags & IS_NEW ) { { delete Struct; delete Struct; screen->SetCurItem( NULL ); screen->SetCurItem( NULL ); } } else /* Remise a jour des anciens parametres du texte */ else /* this was a move command on an "old" text: restore its old settings. */ { { switch( Struct->Type() ) switch( Struct->Type() ) { { Loading Loading
kicad/bitmaps/Editor.xpm→bitmaps/Editor.xpm +6 −1 Original line number Original line Diff line number Diff line /* XPM */ /* XPM */ static char * editor_xpm[] = { #ifndef XPMMAIN extern char *editor_xpm[]; #else char * editor_xpm[] = { "16 16 60 1", "16 16 60 1", " c None", " c None", ". c #000000", ". c #000000", Loading Loading @@ -77,3 +81,4 @@ static char * editor_xpm[] = { " .@mnnnpprrrs. ", " .@mnnnpprrrs. ", " .lqqqttssssu. ", " .lqqqttssssu. ", " ........... "}; " ........... "}; #endif
change_log.txt +5 −0 Original line number Original line Diff line number Diff line Loading @@ -4,6 +4,11 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with email address. email address. 2007-sept-19 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> ================================================================================ + all * hotkeys handling finished 2007-Sep-14 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Sep-14 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ ================================================================================ Loading
common/edaappl.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -250,6 +250,7 @@ unsigned ii; { { m_LanguageId = m_EDA_CommonConfig->Read(wxT("Language"), wxLANGUAGE_DEFAULT); m_LanguageId = m_EDA_CommonConfig->Read(wxT("Language"), wxLANGUAGE_DEFAULT); g_EditorName = m_EDA_CommonConfig->Read(wxT("Editor")); g_EditorName = m_EDA_CommonConfig->Read(wxT("Editor")); g_ConfigFileLocationChoice = m_EDA_CommonConfig->Read(HOTKEY_CFG_PATH_OPT, 0L); } } if ( ! m_EDA_Config ) return; if ( ! m_EDA_Config ) return; Loading
common/hotkeys_basic.cpp +177 −97 Original line number Original line Diff line number Diff line Loading @@ -10,6 +10,9 @@ #include "wxstruct.h" #include "wxstruct.h" #include "hotkeys_basic.h" #include "hotkeys_basic.h" #include "macros.h" #include "macros.h" #include "bitmaps.h" #include "id.h" /* Class to handle hotkey commnands. hotkeys have a default value /* Class to handle hotkey commnands. hotkeys have a default value * This class allows the real key code changed by user from a key code list file * This class allows the real key code changed by user from a key code list file Loading Loading @@ -345,7 +348,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfigFile( const wxString& * @param Filename = default full file name to create. If void, A filename will be asked * @param Filename = default full file name to create. If void, A filename will be asked * @param List = pointer to the current hotkey list. * @param List = pointer to the current hotkey list. * the ouput format is: shortcut "key" "function" * the ouput format is: shortcut "key" "function" * lines starting by # are comments * lines starting with # are comments * * */ */ { { Loading @@ -358,7 +361,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfigFile( const wxString& wxString Mask, Path, Ext; wxString Mask, Path, Ext; Ext = DEFAULT_HOTKEY_FILENAME_EXT; Ext = DEFAULT_HOTKEY_FILENAME_EXT; Mask = wxT( "*" ) + Ext; Mask = wxT( "*" ) + Ext; Path = DEFAULT_HOTKEY_FILENAME_PATH; Path = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ); FullFilename = EDA_FileSelector( _( "Hotkey configuration file:" ), FullFilename = EDA_FileSelector( _( "Hotkey configuration file:" ), Path, /* Chemin par defaut */ Path, /* Chemin par defaut */ FullFilename, /* nom fichier par defaut */ FullFilename, /* nom fichier par defaut */ Loading Loading @@ -476,7 +479,7 @@ int WinEDA_BasicFrame::ReadHotkeyConfigFile( const wxString& wxString Mask, Path, Ext; wxString Mask, Path, Ext; Ext = DEFAULT_HOTKEY_FILENAME_EXT; Ext = DEFAULT_HOTKEY_FILENAME_EXT; Mask = wxT( "*" ) + Ext; Mask = wxT( "*" ) + Ext; Path = DEFAULT_HOTKEY_FILENAME_PATH; Path = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice ); FullFilename = EDA_FileSelector( _( "Hotkey configuration file:" ), FullFilename = EDA_FileSelector( _( "Hotkey configuration file:" ), Path, /* Chemin par defaut */ Path, /* Chemin par defaut */ FullFilename, /* nom fichier par defaut */ FullFilename, /* nom fichier par defaut */ Loading Loading @@ -560,3 +563,80 @@ int WinEDA_BasicFrame::ReadHotkeyConfigFile( const wxString& fclose( cfgfile ); fclose( cfgfile ); return 1; return 1; } } /****************************************************/ wxString ReturnHotkeyConfigFilePath( int choice ) /****************************************************/ /* return the hotkey config file path * @param choice : 0 = home, 1 = kicad/template */ { wxString path; switch( choice ) { case 0: path = DEFAULT_HOTKEY_FILENAME_PATH_IS_HOME; break; case 1: path = DEFAULT_HOTKEY_FILENAME_PATH_IS_KICAD; break; default: break; } return path; } /***************************************/ void AddHotheyConfigMenu( wxMenu* menu ) /***************************************/ /* add hotkey config options to a menu * @parm menu : initial menu */ { wxMenuItem* item; if( menu == NULL ) return; item = new wxMenuItem( menu, ID_PREFERENCES_CREATE_CONFIG_HOTKEYS, _( "Create Hotkey config file" ), _( "Create or Recreate the hotkey config file from current hotkey list" ) ); item->SetBitmap( save_setup_xpm ); menu->Append( item ); item = new wxMenuItem( menu, ID_PREFERENCES_READ_CONFIG_HOTKEYS, _( "Reread Hotkey config file" ), _( "Reread the hotkey config file" ) ); item->SetBitmap( reload_xpm ); menu->Append( item ); item = new wxMenuItem( menu, ID_PREFERENCES_EDIT_CONFIG_HOTKEYS, _( "Edit Hotkey config file" ), _( "Run the text editor and edit the hotkey config file" ) ); item->SetBitmap( editor_xpm ); menu->Append( item ); wxMenu* submenu_hkcfg = new wxMenu(); item = new wxMenuItem( submenu_hkcfg, ID_PREFERENCES_HOTKEY_PATH_IS_HOME, _( "home directory" ), _( "Use home directory to load or store Hotkey config files" ), wxITEM_CHECK ); submenu_hkcfg->Append( item ); item = new wxMenuItem( submenu_hkcfg, ID_PREFERENCES_HOTKEY_PATH_IS_KICAD, _( "kicad/template directory" ), _( "Use kicad/templatedirectory to load or store Hotkey config files" ), wxITEM_CHECK ); submenu_hkcfg->Append( item ); ADD_MENUITEM_WITH_HELP_AND_SUBMENU( menu, submenu_hkcfg, -1, _( "Hotkey config location" ), _( "Hotkey config file location selection (home directory or kicad tree)" ), right_xpm ); }
eeschema/edit_label.cpp +8 −10 Original line number Original line Diff line number Diff line Loading @@ -236,17 +236,17 @@ EDA_BaseStruct* WinEDA_SchematicFrame::CreateNewText( wxDC* DC, int type ) /************************************/ /************************************/ /* Redraw a Texte while moving */ /* Redraw a Text while moving */ /************************************/ /************************************/ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) { { EDA_BaseStruct* TextStruct = panel->GetScreen()->GetCurItem(); EDA_BaseStruct* TextStruct = panel->GetScreen()->GetCurItem(); /* effacement ancienne position */ /* "Undraw" the current text at its old position*/ if( erase ) if( erase ) RedrawOneStruct( panel, DC, TextStruct, g_XorMode ); RedrawOneStruct( panel, DC, TextStruct, g_XorMode ); /* Redessin du texte */ /* redraw the text */ switch( TextStruct->Type() ) switch( TextStruct->Type() ) { { case DRAW_LABEL_STRUCT_TYPE: case DRAW_LABEL_STRUCT_TYPE: Loading @@ -266,7 +266,7 @@ static void ShowWhileMoving( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ) /*************************************************************/ /*************************************************************/ static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC ) static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC ) /*************************************************************/ /*************************************************************/ /* Routine de sortie des menus de Texte */ /* Abort function for the command move text */ { { SCH_SCREEN* screen = (SCH_SCREEN*) Panel->m_Parent->m_CurrentScreen; SCH_SCREEN* screen = (SCH_SCREEN*) Panel->m_Parent->m_CurrentScreen; EDA_BaseStruct* Struct = screen->GetCurItem(); EDA_BaseStruct* Struct = screen->GetCurItem(); Loading @@ -275,22 +275,20 @@ static void ExitMoveTexte( WinEDA_DrawPanel* Panel, wxDC* DC ) Panel->ManageCurseur = NULL; Panel->ManageCurseur = NULL; Panel->ForceCloseManageCurseur = NULL; Panel->ForceCloseManageCurseur = NULL; if( Struct == NULL ) /* Pas de trace en cours */ if( Struct == NULL ) /* no current item */ { { return; return; } } /* ici : trace en cours */ /* "Undraw" the text, and delete it if new (i.e. it was beiing just created)*/ /* Effacement du trace en cours et suppression eventuelle de la structure */ RedrawOneStruct( Panel, DC, Struct, g_XorMode ); RedrawOneStruct( Panel, DC, Struct, g_XorMode ); if( Struct->m_Flags & IS_NEW ) /* Suppression du nouveau texte en cours de placement */ if( Struct->m_Flags & IS_NEW ) { { delete Struct; delete Struct; screen->SetCurItem( NULL ); screen->SetCurItem( NULL ); } } else /* Remise a jour des anciens parametres du texte */ else /* this was a move command on an "old" text: restore its old settings. */ { { switch( Struct->Type() ) switch( Struct->Type() ) { { Loading