Partial fix for missing language selection menu.
The fix is partial because in the list of languages the menuitem corresponding to the selected language is not checked.
This commit is contained in:
parent
a076f5092c
commit
66d2060942
|
@ -309,6 +309,7 @@ set( COMMON_SRCS
|
|||
kiway_express.cpp
|
||||
kiway_holder.cpp
|
||||
kiway_player.cpp
|
||||
languages_menu.cpp
|
||||
lib_id.cpp
|
||||
lib_table_base.cpp
|
||||
lib_table_keywords.cpp
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you may find one here:
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||
* or you may write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file languages_menu.cpp
|
||||
*
|
||||
* @brief build the standard menu to show the list of available translations
|
||||
*/
|
||||
|
||||
#include <fctsys.h>
|
||||
|
||||
#include <pgm_base.h>
|
||||
#include <id.h>
|
||||
#include <tool/tool_interactive.h>
|
||||
#include <tool/conditional_menu.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
|
||||
extern LANGUAGE_DESCR LanguagesList[];
|
||||
|
||||
|
||||
/**
|
||||
* Function AddMenuLanguageList
|
||||
* creates a menu list for language choice, and add it as submenu to \a MasterMenu.
|
||||
*
|
||||
* @param aMasterMenu The main menu.
|
||||
*/
|
||||
|
||||
void AddMenuLanguageList( CONDITIONAL_MENU* aMasterMenu, TOOL_INTERACTIVE* aControlTool )
|
||||
{
|
||||
CONDITIONAL_MENU* langsMenu = new CONDITIONAL_MENU( false, aControlTool );
|
||||
langsMenu->SetTitle( _( "Set Language" ) );
|
||||
langsMenu->SetIcon( language_xpm );
|
||||
aMasterMenu->AddMenu( langsMenu );
|
||||
wxString tooltip;
|
||||
|
||||
// Fix me: find the way to return true for the menutitem having the same m_WX_Lang_Identifier
|
||||
// value as Pgm().GetSelectedLanguageIdentifier()
|
||||
auto isCurrentLanguage = [] ( const SELECTION& aSel )
|
||||
{
|
||||
return false;
|
||||
};
|
||||
|
||||
for( unsigned ii = 0; LanguagesList[ii].m_KI_Lang_Identifier != 0; ii++ )
|
||||
{
|
||||
wxString label;
|
||||
|
||||
if( LanguagesList[ii].m_DoNotTranslate )
|
||||
label = LanguagesList[ii].m_Lang_Label;
|
||||
else
|
||||
label = wxGetTranslation( LanguagesList[ii].m_Lang_Label );
|
||||
|
||||
langsMenu->AddCheckItem( LanguagesList[ii].m_KI_Lang_Identifier, // wxMenuItem wxID
|
||||
label, tooltip, LanguagesList[ii].m_Lang_Icon,
|
||||
isCurrentLanguage );
|
||||
}
|
||||
}
|
|
@ -69,58 +69,13 @@ static const wxChar showEnvVarWarningDialog[] = wxT( "ShowEnvVarWarningDialog" )
|
|||
static const wxChar traceEnvVars[] = wxT( "KIENVVARS" );
|
||||
|
||||
|
||||
FILE_HISTORY::FILE_HISTORY( size_t aMaxFiles, int aBaseFileId ) :
|
||||
wxFileHistory( std::min( aMaxFiles, (size_t) MAX_FILE_HISTORY_SIZE ) )
|
||||
{
|
||||
SetBaseId( aBaseFileId );
|
||||
}
|
||||
|
||||
|
||||
void FILE_HISTORY::SetMaxFiles( size_t aMaxFiles )
|
||||
{
|
||||
m_fileMaxFiles = std::min( aMaxFiles, (size_t) MAX_FILE_HISTORY_SIZE );
|
||||
|
||||
size_t numFiles = m_fileHistory.size();
|
||||
|
||||
while( numFiles > m_fileMaxFiles )
|
||||
RemoveFileFromHistory( --numFiles );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A small class to handle the list of existing translations.
|
||||
* The locale translation is automatic.
|
||||
* The selection of languages is mainly for maintainer's convenience
|
||||
* To add a support to a new translation:
|
||||
* create a new icon (flag of the country) (see Lang_Fr.xpm as an example)
|
||||
* add a new item to s_Languages[].
|
||||
*/
|
||||
struct LANGUAGE_DESCR
|
||||
{
|
||||
/// wxWidgets locale identifier (See wxWidgets doc)
|
||||
int m_WX_Lang_Identifier;
|
||||
|
||||
/// KiCad identifier used in menu selection (See id.h)
|
||||
int m_KI_Lang_Identifier;
|
||||
|
||||
/// The menu language icons
|
||||
BITMAP_DEF m_Lang_Icon;
|
||||
|
||||
/// Labels used in menus
|
||||
wxString m_Lang_Label;
|
||||
|
||||
/// Set to true if the m_Lang_Label must not be translated
|
||||
bool m_DoNotTranslate;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Variable s_Languages
|
||||
* LanguagesList
|
||||
* Note: because this list is not created on the fly, wxTranslation
|
||||
* must be called when a language name must be displayed after translation.
|
||||
* Do not change this behavior, because m_Lang_Label is also used as key in config
|
||||
*/
|
||||
static LANGUAGE_DESCR s_Languages[] =
|
||||
LANGUAGE_DESCR LanguagesList[] =
|
||||
{
|
||||
{ wxLANGUAGE_DEFAULT, ID_LANGUAGE_DEFAULT, lang_def_xpm, _( "Default" ) },
|
||||
{ wxLANGUAGE_ENGLISH, ID_LANGUAGE_ENGLISH, lang_en_xpm, wxT( "English" ), true },
|
||||
|
@ -146,10 +101,29 @@ static LANGUAGE_DESCR s_Languages[] =
|
|||
{ wxLANGUAGE_DUTCH, ID_LANGUAGE_DUTCH, lang_nl_xpm, _( "Dutch" ) },
|
||||
{ wxLANGUAGE_JAPANESE, ID_LANGUAGE_JAPANESE, lang_jp_xpm, _( "Japanese" ) },
|
||||
{ wxLANGUAGE_BULGARIAN, ID_LANGUAGE_BULGARIAN, lang_bg_xpm, _( "Bulgarian" ) },
|
||||
{ wxLANGUAGE_LITHUANIAN, ID_LANGUAGE_LITHUANIAN, lang_lt_xpm, _( "Lithuanian" ) }
|
||||
{ wxLANGUAGE_LITHUANIAN, ID_LANGUAGE_LITHUANIAN, lang_lt_xpm, _( "Lithuanian" ) },
|
||||
{ 0, 0, lang_def_xpm, "" } // Sentinel
|
||||
};
|
||||
|
||||
|
||||
FILE_HISTORY::FILE_HISTORY( size_t aMaxFiles, int aBaseFileId ) :
|
||||
wxFileHistory( std::min( aMaxFiles, (size_t) MAX_FILE_HISTORY_SIZE ) )
|
||||
{
|
||||
SetBaseId( aBaseFileId );
|
||||
}
|
||||
|
||||
|
||||
void FILE_HISTORY::SetMaxFiles( size_t aMaxFiles )
|
||||
{
|
||||
m_fileMaxFiles = std::min( aMaxFiles, (size_t) MAX_FILE_HISTORY_SIZE );
|
||||
|
||||
size_t numFiles = m_fileHistory.size();
|
||||
|
||||
while( numFiles > m_fileMaxFiles )
|
||||
RemoveFileFromHistory( --numFiles );
|
||||
}
|
||||
|
||||
|
||||
PGM_BASE::PGM_BASE()
|
||||
{
|
||||
m_pgm_checker = NULL;
|
||||
|
@ -683,11 +657,11 @@ bool PGM_BASE::SetLanguage( bool first_time )
|
|||
m_common_settings->Read( languageCfgKey, &languageSel );
|
||||
|
||||
// Search for the current selection
|
||||
for( unsigned ii = 0; ii < arrayDim( s_Languages ); ii++ )
|
||||
for( unsigned ii = 0; LanguagesList[ii].m_KI_Lang_Identifier != 0; ii++ )
|
||||
{
|
||||
if( s_Languages[ii].m_Lang_Label == languageSel )
|
||||
if( LanguagesList[ii].m_Lang_Label == languageSel )
|
||||
{
|
||||
setLanguageId( s_Languages[ii].m_WX_Lang_Identifier );
|
||||
setLanguageId( LanguagesList[ii].m_WX_Lang_Identifier );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -725,11 +699,11 @@ bool PGM_BASE::SetLanguage( bool first_time )
|
|||
wxString languageSel;
|
||||
|
||||
// Search for the current selection language name
|
||||
for( unsigned ii = 0; ii < arrayDim( s_Languages ); ii++ )
|
||||
for( unsigned ii = 0; LanguagesList[ii].m_KI_Lang_Identifier != 0; ii++ )
|
||||
{
|
||||
if( s_Languages[ii].m_WX_Lang_Identifier == m_language_id )
|
||||
if( LanguagesList[ii].m_WX_Lang_Identifier == m_language_id )
|
||||
{
|
||||
languageSel = s_Languages[ii].m_Lang_Label;
|
||||
languageSel = LanguagesList[ii].m_Lang_Label;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -764,13 +738,13 @@ bool PGM_BASE::SetLanguage( bool first_time )
|
|||
void PGM_BASE::SetLanguageIdentifier( int menu_id )
|
||||
{
|
||||
wxLogTrace( traceLocale, "Select language ID %d from %d possible languages.",
|
||||
menu_id, (int)arrayDim( s_Languages ) );
|
||||
menu_id, (int)arrayDim( LanguagesList )-1 );
|
||||
|
||||
for( unsigned ii = 0; ii < arrayDim( s_Languages ); ii++ )
|
||||
for( unsigned ii = 0; LanguagesList[ii].m_KI_Lang_Identifier != 0; ii++ )
|
||||
{
|
||||
if( menu_id == s_Languages[ii].m_KI_Lang_Identifier )
|
||||
if( menu_id == LanguagesList[ii].m_KI_Lang_Identifier )
|
||||
{
|
||||
setLanguageId( s_Languages[ii].m_WX_Lang_Identifier );
|
||||
setLanguageId( LanguagesList[ii].m_WX_Lang_Identifier );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -812,47 +786,6 @@ void PGM_BASE::SetLanguagePath()
|
|||
}
|
||||
|
||||
|
||||
void PGM_BASE::AddMenuLanguageList( wxMenu* MasterMenu )
|
||||
{
|
||||
wxMenu* menu = NULL;
|
||||
wxMenuItem* item = MasterMenu->FindItem( ID_LANGUAGE_CHOICE );
|
||||
|
||||
if( item ) // This menu exists, do nothing
|
||||
return;
|
||||
|
||||
menu = new wxMenu;
|
||||
|
||||
for( unsigned ii = 0; ii < arrayDim( s_Languages ); ii++ )
|
||||
{
|
||||
wxString label;
|
||||
|
||||
if( s_Languages[ii].m_DoNotTranslate )
|
||||
label = s_Languages[ii].m_Lang_Label;
|
||||
else
|
||||
label = wxGetTranslation( s_Languages[ii].m_Lang_Label );
|
||||
|
||||
AddMenuItem( menu, s_Languages[ii].m_KI_Lang_Identifier,
|
||||
label, KiBitmap(s_Languages[ii].m_Lang_Icon ),
|
||||
wxITEM_CHECK );
|
||||
}
|
||||
|
||||
AddMenuItem( MasterMenu, menu,
|
||||
ID_LANGUAGE_CHOICE,
|
||||
_( "Set Language" ),
|
||||
_( "Select application language (only for testing)" ),
|
||||
KiBitmap( language_xpm ) );
|
||||
|
||||
// Set Check mark on current selected language
|
||||
for( unsigned ii = 0; ii < arrayDim( s_Languages ); ii++ )
|
||||
{
|
||||
if( m_language_id == s_Languages[ii].m_WX_Lang_Identifier )
|
||||
menu->Check( s_Languages[ii].m_KI_Lang_Identifier, true );
|
||||
else
|
||||
menu->Check( s_Languages[ii].m_KI_Lang_Identifier, false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool PGM_BASE::SetLocalEnvVariable( const wxString& aName, const wxString& aValue )
|
||||
{
|
||||
wxString env;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2004-2019 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2004-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -30,6 +30,7 @@
|
|||
#include <tool/common_control.h>
|
||||
#include "cvpcb_id.h"
|
||||
#include "cvpcb_mainframe.h"
|
||||
#include <menus_helpers.h>
|
||||
|
||||
|
||||
void CVPCB_MAINFRAME::ReCreateMenuBar()
|
||||
|
@ -44,11 +45,11 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
|
|||
//
|
||||
CONDITIONAL_MENU* fileMenu = new CONDITIONAL_MENU( false, tool );
|
||||
|
||||
fileMenu->AddItem( ID_SAVE_PROJECT,
|
||||
fileMenu->AddItem( ID_SAVE_PROJECT,
|
||||
_( "&Save Schematic\tCtrl+S" ),
|
||||
_( "Save footprint associations in schematic symbol footprint fields" ),
|
||||
save_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
|
||||
fileMenu->Resolve();
|
||||
|
||||
//-- Preferences menu -----------------------------------------------
|
||||
|
@ -63,14 +64,14 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
|
|||
preference_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
prefsMenu->AddItem( ID_CVPCB_EQUFILES_LIST_EDIT,
|
||||
prefsMenu->AddItem( ID_CVPCB_EQUFILES_LIST_EDIT,
|
||||
_( "Footprint &Association Files..." ),
|
||||
_( "Configure footprint association file (.equ) list. These files are "
|
||||
"used to automatically assign footprint names from symbol values." ),
|
||||
library_table_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
Pgm().AddMenuLanguageList( prefsMenu );
|
||||
AddMenuLanguageList( prefsMenu, tool );
|
||||
|
||||
prefsMenu->Resolve();
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
|||
preference_xpm, EE_CONDITIONS::ShowAlways );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
Pgm().AddMenuLanguageList( prefsMenu );
|
||||
AddMenuLanguageList( prefsMenu, selTool );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
prefsMenu->AddCheckItem( ACTIONS::acceleratedGraphics, acceleratedGraphicsCondition );
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "eeschema_id.h"
|
||||
#include "sch_edit_frame.h"
|
||||
|
||||
class CONDITIONAL_MENU;
|
||||
extern void AddMenuLanguageList( CONDITIONAL_MENU* aMasterMenu, TOOL_INTERACTIVE* aControlTool );
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::ReCreateMenuBar()
|
||||
|
@ -97,7 +97,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
|
|||
submenuImport->SetTitle( _( "Import" ) );
|
||||
submenuImport->SetIcon( import_xpm );
|
||||
|
||||
submenuImport->Add( _( "Footprint Association File..." ),
|
||||
submenuImport->Add( _( "Footprint Association File..." ),
|
||||
_( "Back-import symbol footprint associations from .cmp file created by Pcbnew" ),
|
||||
ID_BACKANNO_ITEMS, import_footprint_names_xpm );
|
||||
|
||||
|
@ -314,7 +314,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
|
|||
preference_xpm, EE_CONDITIONS::ShowAlways );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
Pgm().AddMenuLanguageList( prefsMenu );
|
||||
AddMenuLanguageList( prefsMenu, selTool );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
prefsMenu->AddCheckItem( ACTIONS::acceleratedGraphics, acceleratedGraphicsCondition );
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include <tools/gerbview_control.h>
|
||||
#include <view/view.h>
|
||||
#include <gerbview_painter.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
|
||||
|
||||
// Config keywords
|
||||
|
@ -87,6 +88,9 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
|||
m_displayMode = 0;
|
||||
m_AboutTitle = "GerbView";
|
||||
|
||||
SHAPE_POLY_SET dummy; // A ugly trick to force the linker to include
|
||||
// some methods in code and avoid link errors
|
||||
|
||||
int fileHistorySize;
|
||||
Pgm().CommonSettings()->Read( FILE_HISTORY_SIZE_KEY, &fileHistorySize,
|
||||
DEFAULT_FILE_HISTORY_SIZE );
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <tools/gerbview_selection_tool.h>
|
||||
#include <tools/gerbview_actions.h>
|
||||
|
||||
|
||||
void GERBVIEW_FRAME::ReCreateMenuBar()
|
||||
{
|
||||
GERBVIEW_SELECTION_TOOL* selTool = m_toolManager->GetTool<GERBVIEW_SELECTION_TOOL>();
|
||||
|
@ -254,7 +255,7 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
|
|||
preference_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
preferencesMenu->AddSeparator();
|
||||
Pgm().AddMenuLanguageList( preferencesMenu );
|
||||
AddMenuLanguageList( preferencesMenu, selTool );
|
||||
|
||||
preferencesMenu->AddSeparator();
|
||||
preferencesMenu->AddCheckItem( ACTIONS::acceleratedGraphics, acceleratedGraphicsCondition );
|
||||
|
|
|
@ -35,6 +35,12 @@
|
|||
#include <wx/menuitem.h>
|
||||
#include <bitmaps.h>
|
||||
|
||||
class CONDITIONAL_MENU;
|
||||
class TOOL_INTERACTIVE;
|
||||
|
||||
void AddMenuLanguageList( CONDITIONAL_MENU* aMasterMenu, TOOL_INTERACTIVE* aControlTool );
|
||||
|
||||
|
||||
/**
|
||||
* Add a bitmap to a menuitem
|
||||
* @param aMenu is the menuitem.
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <wx/filehistory.h>
|
||||
#include <search_stack.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <bitmaps_png/bitmap_def.h>
|
||||
|
||||
|
||||
///@{
|
||||
|
@ -63,6 +64,32 @@ class wxApp;
|
|||
class wxMenu;
|
||||
class wxWindow;
|
||||
|
||||
/**
|
||||
* A small class to handle the list of existing translations.
|
||||
* The locale translation is automatic.
|
||||
* The selection of languages is mainly for maintainer's convenience
|
||||
* To add a support to a new translation:
|
||||
* create a new icon (flag of the country) (see Lang_Fr.xpm as an example)
|
||||
* add a new item to s_Languages[].
|
||||
*/
|
||||
struct LANGUAGE_DESCR
|
||||
{
|
||||
/// wxWidgets locale identifier (See wxWidgets doc)
|
||||
int m_WX_Lang_Identifier;
|
||||
|
||||
/// KiCad identifier used in menu selection (See id.h)
|
||||
int m_KI_Lang_Identifier;
|
||||
|
||||
/// The menu language icons
|
||||
BITMAP_DEF m_Lang_Icon;
|
||||
|
||||
/// Labels used in menus
|
||||
wxString m_Lang_Label;
|
||||
|
||||
/// Set to true if the m_Lang_Label must not be translated
|
||||
bool m_DoNotTranslate;
|
||||
};
|
||||
|
||||
|
||||
class FILE_HISTORY : public wxFileHistory
|
||||
{
|
||||
|
@ -236,15 +263,6 @@ public:
|
|||
*/
|
||||
VTBL_ENTRY bool SetLanguage( bool first_time = false );
|
||||
|
||||
/**
|
||||
* Function AddMenuLanguageList
|
||||
* creates a menu list for language choice, and add it as submenu to \a MasterMenu.
|
||||
*
|
||||
* @param MasterMenu The main menu. The sub menu list will be accessible from the menu
|
||||
* item with id ID_LANGUAGE_CHOICE
|
||||
*/
|
||||
VTBL_ENTRY void AddMenuLanguageList( wxMenu* MasterMenu );
|
||||
|
||||
/**
|
||||
* Function SetLanguageIdentifier
|
||||
* sets in .m_language_id member the wxWidgets language identifier Id from
|
||||
|
@ -255,6 +273,11 @@ public:
|
|||
*/
|
||||
VTBL_ENTRY void SetLanguageIdentifier( int menu_id );
|
||||
|
||||
/**
|
||||
* @return the wxWidgets language identifier Id of the language currently selected
|
||||
*/
|
||||
VTBL_ENTRY int GetSelectedLanguageIdentifier() const { return m_language_id; }
|
||||
|
||||
VTBL_ENTRY void SetLanguagePath();
|
||||
|
||||
/**
|
||||
|
|
|
@ -65,10 +65,10 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
|
|||
fileMenu->AddItem( KICAD_MANAGER_ACTIONS::newFromTemplate, SELECTION_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( KICAD_MANAGER_ACTIONS::openProject, SELECTION_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddMenu( openRecentMenu, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
|
||||
fileMenu->AddSeparator();
|
||||
fileMenu->AddItem( ID_IMPORT_EAGLE_PROJECT,
|
||||
_( "Import EAGLE Project..." ),
|
||||
fileMenu->AddItem( ID_IMPORT_EAGLE_PROJECT,
|
||||
_( "Import EAGLE Project..." ),
|
||||
_( "Import EAGLE CAD XML schematic and board" ),
|
||||
import_project_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
|
@ -79,7 +79,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
|
|||
zip_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
fileMenu->AddItem( ID_READ_ZIP_ARCHIVE,
|
||||
_( "&Unarchive Project..." ),
|
||||
_( "&Unarchive Project..." ),
|
||||
_( "Unarchive project files from zip archive" ),
|
||||
unzip_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
|
@ -92,7 +92,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
|
|||
//-- View menu -----------------------------------------------------------
|
||||
//
|
||||
CONDITIONAL_MENU* viewMenu = new CONDITIONAL_MENU( false, controlTool );
|
||||
|
||||
|
||||
viewMenu->AddItem( ACTIONS::zoomRedraw, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
viewMenu->AddSeparator();
|
||||
|
@ -126,7 +126,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
|
|||
toolsMenu->AddItem( ID_EDIT_LOCAL_FILE_IN_TEXT_EDITOR,
|
||||
_( "Edit Local File..." ), _( "Edit local file in text editor" ),
|
||||
browse_files_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
|
||||
toolsMenu->Resolve();
|
||||
|
||||
//-- Preferences menu -----------------------------------------------
|
||||
|
@ -142,8 +142,8 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
|
|||
preference_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
Pgm().AddMenuLanguageList( prefsMenu );
|
||||
|
||||
AddMenuLanguageList( prefsMenu, controlTool );
|
||||
|
||||
prefsMenu->Resolve();
|
||||
|
||||
//-- Menubar -------------------------------------------------------------
|
||||
|
@ -204,14 +204,14 @@ void KICAD_MANAGER_FRAME::RecreateLauncher()
|
|||
else
|
||||
m_launcher = new ACTION_TOOLBAR( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
|
||||
KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
|
||||
|
||||
|
||||
m_launcher->Add( KICAD_MANAGER_ACTIONS::editSchematic );
|
||||
m_launcher->Add( KICAD_MANAGER_ACTIONS::editSymbols );
|
||||
|
||||
KiScaledSeparator( m_launcher, this );
|
||||
m_launcher->Add( KICAD_MANAGER_ACTIONS::editPCB );
|
||||
m_launcher->Add( KICAD_MANAGER_ACTIONS::editFootprints );
|
||||
|
||||
|
||||
KiScaledSeparator( m_launcher, this );
|
||||
m_launcher->Add( KICAD_MANAGER_ACTIONS::viewGerbers );
|
||||
m_launcher->Add( KICAD_MANAGER_ACTIONS::convertImage );
|
||||
|
|
|
@ -167,7 +167,7 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
|
|||
preference_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
// Language submenu
|
||||
Pgm().AddMenuLanguageList( preferencesMenu );
|
||||
AddMenuLanguageList( preferencesMenu, selTool );
|
||||
|
||||
//-- Menubar -----------------------------------------------------------
|
||||
//
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include <invoke_pl_editor_dialog.h>
|
||||
#include <tools/pl_editor_control.h>
|
||||
|
||||
|
||||
BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME )
|
||||
EVT_CLOSE( PL_EDITOR_FRAME::OnCloseWindow )
|
||||
EVT_MENU( wxID_FILE, PL_EDITOR_FRAME::Files_io )
|
||||
|
|
|
@ -69,6 +69,7 @@ target_link_libraries( pcb_calculator
|
|||
# There's way too much crap coming in from common yet.
|
||||
common
|
||||
gal
|
||||
common
|
||||
${wxWidgets_LIBRARIES}
|
||||
)
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
m_TWNested = false;
|
||||
|
||||
SHAPE_POLY_SET dummy; // A ugly trick to force the linker to include
|
||||
//some methods in code and avoid link errors
|
||||
// some methods in code and avoid link errors
|
||||
|
||||
// Populate transline list ordered like in dialog menu list
|
||||
const static TRANSLINE_TYPE_ID tltype_list[8] =
|
||||
|
|
|
@ -281,7 +281,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
preference_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
Pgm().AddMenuLanguageList( prefsMenu );
|
||||
AddMenuLanguageList( prefsMenu, selTool );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
prefsMenu->AddCheckItem( ACTIONS::acceleratedGraphics, acceleratedGraphicsCondition );
|
||||
|
|
|
@ -491,7 +491,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
preference_xpm, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
Pgm().AddMenuLanguageList( prefsMenu );
|
||||
AddMenuLanguageList( prefsMenu, selTool );
|
||||
|
||||
prefsMenu->AddSeparator();
|
||||
prefsMenu->AddCheckItem( ACTIONS::acceleratedGraphics, acceleratedGraphicsCondition );
|
||||
|
|
Loading…
Reference in New Issue