Library Editor: renamed 'component' to 'part'
This commit is contained in:
parent
a4f475c97d
commit
95754632c2
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file eeschema/menubar_libedit.cpp
|
* @file eeschema/menubar_libedit.cpp
|
||||||
* @brief (Re)Create the main menubar for the component editor frame (LibEdit)
|
* @brief (Re)Create the main menubar for the part editor frame (LibEdit)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <menus_helpers.h>
|
#include <menus_helpers.h>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief (Re)Create the menubar for the component editor frame
|
* @brief (Re)Create the menubar for the part editor frame
|
||||||
*/
|
*/
|
||||||
void LIB_EDIT_FRAME::ReCreateMenuBar()
|
void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
{
|
{
|
||||||
|
@ -104,14 +104,14 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
AddMenuItem( fileMenu,
|
AddMenuItem( fileMenu,
|
||||||
ID_LIBEDIT_GEN_PNG_FILE,
|
ID_LIBEDIT_GEN_PNG_FILE,
|
||||||
_( "Create &PNG File from Screen..." ),
|
_( "Create &PNG File from Screen..." ),
|
||||||
_( "Create a PNG file from the component displayed on screen" ),
|
_( "Create a PNG file from the part displayed on screen" ),
|
||||||
KiBitmap( plot_xpm ) );
|
KiBitmap( plot_xpm ) );
|
||||||
|
|
||||||
// Export as SVG file
|
// Export as SVG file
|
||||||
AddMenuItem( fileMenu,
|
AddMenuItem( fileMenu,
|
||||||
ID_LIBEDIT_GEN_SVG_FILE,
|
ID_LIBEDIT_GEN_SVG_FILE,
|
||||||
_( "Create S&VG File..." ),
|
_( "Create S&VG File..." ),
|
||||||
_( "Create a SVG file from the current loaded component" ),
|
_( "Create a SVG file from the current loaded part" ),
|
||||||
KiBitmap( plot_svg_xpm ) );
|
KiBitmap( plot_svg_xpm ) );
|
||||||
|
|
||||||
// Separator
|
// Separator
|
||||||
|
@ -185,59 +185,59 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
_( "Toggles the search tree visibility" ),
|
_( "Toggles the search tree visibility" ),
|
||||||
KiBitmap( search_tree_xpm ) );
|
KiBitmap( search_tree_xpm ) );
|
||||||
|
|
||||||
// Menu Component:
|
// Menu Part:
|
||||||
wxMenu* componentMenu = new wxMenu;
|
wxMenu* partMenu = new wxMenu;
|
||||||
|
|
||||||
AddMenuItem( componentMenu,
|
AddMenuItem( partMenu,
|
||||||
ID_LIBEDIT_NEW_PART,
|
ID_LIBEDIT_NEW_PART,
|
||||||
_( "Create &New Component" ),
|
_( "Create &New" ),
|
||||||
_( "Create a new empty component" ),
|
_( "Create a new empty part" ),
|
||||||
KiBitmap( new_component_xpm ) );
|
KiBitmap( new_component_xpm ) );
|
||||||
|
|
||||||
text = AddHotkeyName( _( "&Save Component" ), g_Libedit_Hokeys_Descr, HK_SAVE_PART );
|
text = AddHotkeyName( _( "&Save Part" ), g_Libedit_Hokeys_Descr, HK_SAVE_PART );
|
||||||
AddMenuItem( componentMenu,
|
AddMenuItem( partMenu,
|
||||||
ID_LIBEDIT_SAVE_PART,
|
ID_LIBEDIT_SAVE_PART,
|
||||||
text,
|
text,
|
||||||
_( "Saves the current component to the library" ),
|
_( "Saves the current part to the library" ),
|
||||||
KiBitmap( save_part_xpm ) );
|
KiBitmap( save_part_xpm ) );
|
||||||
|
|
||||||
componentMenu->AppendSeparator();
|
partMenu->AppendSeparator();
|
||||||
|
|
||||||
AddMenuItem( componentMenu,
|
AddMenuItem( partMenu,
|
||||||
ID_LIBEDIT_IMPORT_PART,
|
ID_LIBEDIT_IMPORT_PART,
|
||||||
_( "&Import" ),
|
_( "&Import" ),
|
||||||
_( "Import a component to the current library" ),
|
_( "Import a part to the current library" ),
|
||||||
KiBitmap( export_xpm ) );
|
KiBitmap( export_xpm ) );
|
||||||
|
|
||||||
AddMenuItem( componentMenu,
|
AddMenuItem( partMenu,
|
||||||
ID_LIBEDIT_EXPORT_PART,
|
ID_LIBEDIT_EXPORT_PART,
|
||||||
_( "&Export" ),
|
_( "&Export" ),
|
||||||
_( "Export the current component" ),
|
_( "Export the current part" ),
|
||||||
KiBitmap( import_xpm ) );
|
KiBitmap( import_xpm ) );
|
||||||
|
|
||||||
componentMenu->AppendSeparator();
|
partMenu->AppendSeparator();
|
||||||
|
|
||||||
AddMenuItem( componentMenu,
|
AddMenuItem( partMenu,
|
||||||
ID_LIBEDIT_GET_FRAME_EDIT_PART,
|
ID_LIBEDIT_GET_FRAME_EDIT_PART,
|
||||||
_( "&Properties" ),
|
_( "&Properties" ),
|
||||||
_( "Edit part properties" ),
|
_( "Edit part properties" ),
|
||||||
KiBitmap( part_properties_xpm ) );
|
KiBitmap( part_properties_xpm ) );
|
||||||
|
|
||||||
AddMenuItem( componentMenu,
|
AddMenuItem( partMenu,
|
||||||
ID_LIBEDIT_GET_FRAME_EDIT_FIELDS,
|
ID_LIBEDIT_GET_FRAME_EDIT_FIELDS,
|
||||||
_( "&Fields" ),
|
_( "&Fields" ),
|
||||||
_( "Edit field properties" ),
|
_( "Edit field properties" ),
|
||||||
KiBitmap( edit_text_xpm ) );
|
KiBitmap( edit_text_xpm ) );
|
||||||
|
|
||||||
componentMenu->AppendSeparator();
|
partMenu->AppendSeparator();
|
||||||
|
|
||||||
AddMenuItem( componentMenu,
|
AddMenuItem( partMenu,
|
||||||
ID_LIBEDIT_EDIT_PIN_BY_TABLE,
|
ID_LIBEDIT_EDIT_PIN_BY_TABLE,
|
||||||
_( "Pi&n table" ),
|
_( "Pi&n Table" ),
|
||||||
_( "Show pin table" ),
|
_( "Show pin table" ),
|
||||||
KiBitmap( pin_table_xpm ) );
|
KiBitmap( pin_table_xpm ) );
|
||||||
|
|
||||||
AddMenuItem( componentMenu,
|
AddMenuItem( partMenu,
|
||||||
ID_LIBEDIT_CHECK_PART,
|
ID_LIBEDIT_CHECK_PART,
|
||||||
_( "ERC" ),
|
_( "ERC" ),
|
||||||
_( "Check duplicate and off grid pins" ),
|
_( "Check duplicate and off grid pins" ),
|
||||||
|
@ -302,7 +302,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
AddMenuItem( preferencesMenu,
|
AddMenuItem( preferencesMenu,
|
||||||
wxID_PREFERENCES,
|
wxID_PREFERENCES,
|
||||||
_( "General &Options" ),
|
_( "General &Options" ),
|
||||||
_( "Set Component Editor default values and options" ),
|
_( "Set Part Editor default values and options" ),
|
||||||
KiBitmap( preference_xpm ) );
|
KiBitmap( preference_xpm ) );
|
||||||
|
|
||||||
// Language submenu
|
// Language submenu
|
||||||
|
@ -352,7 +352,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
menuBar->Append( fileMenu, _( "&File" ) );
|
menuBar->Append( fileMenu, _( "&File" ) );
|
||||||
menuBar->Append( editMenu, _( "&Edit" ) );
|
menuBar->Append( editMenu, _( "&Edit" ) );
|
||||||
menuBar->Append( viewMenu, _( "&View" ) );
|
menuBar->Append( viewMenu, _( "&View" ) );
|
||||||
menuBar->Append( componentMenu, _( "&Component" ) );
|
menuBar->Append( partMenu, _( "&Part" ) );
|
||||||
menuBar->Append( placeMenu, _( "&Place" ) );
|
menuBar->Append( placeMenu, _( "&Place" ) );
|
||||||
menuBar->Append( preferencesMenu, _( "P&references" ) );
|
menuBar->Append( preferencesMenu, _( "P&references" ) );
|
||||||
menuBar->Append( helpMenu, _( "&Help" ) );
|
menuBar->Append( helpMenu, _( "&Help" ) );
|
||||||
|
|
|
@ -117,17 +117,17 @@ void LIB_EDIT_FRAME::ReCreateHToolbar()
|
||||||
|
|
||||||
m_mainToolBar->AddSeparator();
|
m_mainToolBar->AddSeparator();
|
||||||
m_mainToolBar->AddTool( ID_LIBEDIT_NEW_PART, wxEmptyString, KiBitmap( new_component_xpm ),
|
m_mainToolBar->AddTool( ID_LIBEDIT_NEW_PART, wxEmptyString, KiBitmap( new_component_xpm ),
|
||||||
_( "Create new component" ) );
|
_( "Create new part" ) );
|
||||||
|
|
||||||
m_mainToolBar->AddTool( ID_LIBEDIT_SAVE_PART, wxEmptyString,
|
m_mainToolBar->AddTool( ID_LIBEDIT_SAVE_PART, wxEmptyString,
|
||||||
KiBitmap( save_part_xpm ),
|
KiBitmap( save_part_xpm ),
|
||||||
_( "Save current component" ) );
|
_( "Save current part" ) );
|
||||||
|
|
||||||
m_mainToolBar->AddTool( ID_LIBEDIT_IMPORT_PART, wxEmptyString, KiBitmap( import_xpm ),
|
m_mainToolBar->AddTool( ID_LIBEDIT_IMPORT_PART, wxEmptyString, KiBitmap( import_xpm ),
|
||||||
_( "Import component" ) );
|
_( "Import part" ) );
|
||||||
|
|
||||||
m_mainToolBar->AddTool( ID_LIBEDIT_EXPORT_PART, wxEmptyString, KiBitmap( export_xpm ),
|
m_mainToolBar->AddTool( ID_LIBEDIT_EXPORT_PART, wxEmptyString, KiBitmap( export_xpm ),
|
||||||
_( "Export component" ) );
|
_( "Export part" ) );
|
||||||
|
|
||||||
m_mainToolBar->AddSeparator();
|
m_mainToolBar->AddSeparator();
|
||||||
msg = AddHotkeyName( _( "Undo last command" ), g_Libedit_Hokeys_Descr, HK_UNDO, IS_COMMENT );
|
msg = AddHotkeyName( _( "Undo last command" ), g_Libedit_Hokeys_Descr, HK_UNDO, IS_COMMENT );
|
||||||
|
@ -138,7 +138,7 @@ void LIB_EDIT_FRAME::ReCreateHToolbar()
|
||||||
|
|
||||||
m_mainToolBar->AddSeparator();
|
m_mainToolBar->AddSeparator();
|
||||||
m_mainToolBar->AddTool( ID_LIBEDIT_GET_FRAME_EDIT_PART, wxEmptyString,
|
m_mainToolBar->AddTool( ID_LIBEDIT_GET_FRAME_EDIT_PART, wxEmptyString,
|
||||||
KiBitmap( part_properties_xpm ), _( "Edit component properties" ) );
|
KiBitmap( part_properties_xpm ), _( "Edit part properties" ) );
|
||||||
|
|
||||||
m_mainToolBar->AddTool( ID_LIBEDIT_GET_FRAME_EDIT_FIELDS, wxEmptyString,
|
m_mainToolBar->AddTool( ID_LIBEDIT_GET_FRAME_EDIT_FIELDS, wxEmptyString,
|
||||||
KiBitmap( text_xpm ),
|
KiBitmap( text_xpm ),
|
||||||
|
|
|
@ -54,9 +54,9 @@ CMP_TREE_PANE::CMP_TREE_PANE( LIB_EDIT_FRAME* aParent, LIB_MANAGER* aLibMgr )
|
||||||
menuLibrary->Append( ID_LIBEDIT_SAVE_LIBRARY_AS, _( "Save library as..." ) );
|
menuLibrary->Append( ID_LIBEDIT_SAVE_LIBRARY_AS, _( "Save library as..." ) );
|
||||||
menuLibrary->Append( ID_LIBEDIT_REVERT_LIBRARY, _( "Revert library" ) );
|
menuLibrary->Append( ID_LIBEDIT_REVERT_LIBRARY, _( "Revert library" ) );
|
||||||
menuLibrary->AppendSeparator();
|
menuLibrary->AppendSeparator();
|
||||||
menuLibrary->Append( ID_LIBEDIT_NEW_PART, _( "New component..." ) );
|
menuLibrary->Append( ID_LIBEDIT_NEW_PART, _( "New part..." ) );
|
||||||
menuLibrary->Append( ID_LIBEDIT_IMPORT_PART, _( "Import component..." ) );
|
menuLibrary->Append( ID_LIBEDIT_IMPORT_PART, _( "Import part..." ) );
|
||||||
menuLibrary->Append( ID_LIBEDIT_PASTE_PART, _( "Paste component" ) );
|
menuLibrary->Append( ID_LIBEDIT_PASTE_PART, _( "Paste part" ) );
|
||||||
|
|
||||||
std::unique_ptr<wxMenu> menuPart = std::make_unique<wxMenu>();
|
std::unique_ptr<wxMenu> menuPart = std::make_unique<wxMenu>();
|
||||||
menuPart->Append( ID_LIBEDIT_EDIT_PART, _( "Edit" ) );
|
menuPart->Append( ID_LIBEDIT_EDIT_PART, _( "Edit" ) );
|
||||||
|
@ -65,12 +65,12 @@ CMP_TREE_PANE::CMP_TREE_PANE( LIB_EDIT_FRAME* aParent, LIB_MANAGER* aLibMgr )
|
||||||
menuPart->Append( ID_LIBEDIT_SAVE_PART, _( "Save" ) );
|
menuPart->Append( ID_LIBEDIT_SAVE_PART, _( "Save" ) );
|
||||||
menuPart->Append( ID_LIBEDIT_REVERT_PART, _( "Revert" ) );
|
menuPart->Append( ID_LIBEDIT_REVERT_PART, _( "Revert" ) );
|
||||||
menuPart->AppendSeparator();
|
menuPart->AppendSeparator();
|
||||||
menuPart->Append( ID_LIBEDIT_CUT_PART, _( "Cut component" ) );
|
menuPart->Append( ID_LIBEDIT_CUT_PART, _( "Cut part" ) );
|
||||||
menuPart->Append( ID_LIBEDIT_COPY_PART, _( "Copy component" ) );
|
menuPart->Append( ID_LIBEDIT_COPY_PART, _( "Copy part" ) );
|
||||||
menuPart->Append( ID_LIBEDIT_DUPLICATE_PART, _( "Duplicate component" ) );
|
menuPart->Append( ID_LIBEDIT_DUPLICATE_PART, _( "Duplicate part" ) );
|
||||||
menuPart->AppendSeparator();
|
menuPart->AppendSeparator();
|
||||||
|
|
||||||
// Append the library menu to the component menu
|
// Append the library menu to the part menu
|
||||||
for( size_t i = 0; i < menuLibrary->GetMenuItemCount(); ++i )
|
for( size_t i = 0; i < menuLibrary->GetMenuItemCount(); ++i )
|
||||||
{
|
{
|
||||||
wxMenuItem* menuItem = menuLibrary->FindItemByPosition( i );
|
wxMenuItem* menuItem = menuLibrary->FindItemByPosition( i );
|
||||||
|
|
Loading…
Reference in New Issue