Fix frame name capitalization in all about dialogs.
This is a stop gap fix. It should be possible to use the wxFrame title string for this but some of the frame windows have appropriated the title string for configuration file naming purposes which is less than ideal. Fixes lp:1825977 https://bugs.launchpad.net/kicad/+bug/1825977
This commit is contained in:
parent
f37ee5c2b3
commit
3c4f8c1bf7
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
|
* Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
|
||||||
* Copyright (C) 2017 KiCad Developers, see CHANGELOG.TXT for contributors.
|
* Copyright (C) 2017-2019 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -68,6 +68,8 @@ extern std::string GetCurlLibVersion();
|
||||||
DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
|
DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
|
||||||
: DIALOG_ABOUT_BASE( aParent ), m_info( aAppInfo )
|
: DIALOG_ABOUT_BASE( aParent ), m_info( aAppInfo )
|
||||||
{
|
{
|
||||||
|
wxASSERT( aParent != nullptr );
|
||||||
|
|
||||||
m_picInformation = KiBitmap( info_xpm );
|
m_picInformation = KiBitmap( info_xpm );
|
||||||
m_picDevelopers = KiBitmap( preference_xpm );
|
m_picDevelopers = KiBitmap( preference_xpm );
|
||||||
m_picDocWriters = KiBitmap( editor_xpm );
|
m_picDocWriters = KiBitmap( editor_xpm );
|
||||||
|
@ -89,11 +91,13 @@ DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
|
||||||
m_bitmapApp->SetBitmap( icon );
|
m_bitmapApp->SetBitmap( icon );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_staticTextAppTitle->SetLabel( m_info.GetAppName() );
|
m_titleName = aParent->GetAboutTitle();
|
||||||
|
m_staticTextAppTitle->SetLabel( m_titleName );
|
||||||
m_staticTextCopyright->SetLabel( m_info.GetCopyright() );
|
m_staticTextCopyright->SetLabel( m_info.GetCopyright() );
|
||||||
m_staticTextBuildVersion->SetLabel( "Version: " + m_info.GetBuildVersion() );
|
m_staticTextBuildVersion->SetLabel( "Version: " + m_info.GetBuildVersion() );
|
||||||
m_staticTextLibVersion->SetLabel( m_info.GetLibVersion() );
|
m_staticTextLibVersion->SetLabel( m_info.GetLibVersion() );
|
||||||
|
|
||||||
|
SetTitle( wxString::Format( _( "About %s" ), m_titleName ) );
|
||||||
createNotebooks();
|
createNotebooks();
|
||||||
|
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
|
@ -124,10 +128,13 @@ void DIALOG_ABOUT::createNotebooks()
|
||||||
createNotebookHtmlPage( m_auiNotebook, _( "Information" ), m_picInformation,
|
createNotebookHtmlPage( m_auiNotebook, _( "Information" ), m_picInformation,
|
||||||
m_info.GetDescription() );
|
m_info.GetDescription() );
|
||||||
|
|
||||||
createNotebookPage( m_auiNotebook, _( "Developers" ) , m_picDevelopers, m_info.GetDevelopers() );
|
createNotebookPage( m_auiNotebook, _( "Developers" ) , m_picDevelopers,
|
||||||
createNotebookPage( m_auiNotebook, _( "Doc Writers" ), m_picDocWriters, m_info.GetDocWriters() );
|
m_info.GetDevelopers() );
|
||||||
|
createNotebookPage( m_auiNotebook, _( "Doc Writers" ), m_picDocWriters,
|
||||||
|
m_info.GetDocWriters() );
|
||||||
|
|
||||||
createNotebookPageByCategory( m_auiNotebook, _( "Artists" ), m_picArtists, m_info.GetArtists() );
|
createNotebookPageByCategory( m_auiNotebook, _( "Artists" ), m_picArtists,
|
||||||
|
m_info.GetArtists() );
|
||||||
createNotebookPageByCategory( m_auiNotebook, _( "Translators" ), m_picTranslators,
|
createNotebookPageByCategory( m_auiNotebook, _( "Translators" ), m_picTranslators,
|
||||||
m_info.GetTranslators() );
|
m_info.GetTranslators() );
|
||||||
createNotebookPageByCategory( m_auiNotebook, _( "Packagers" ), m_picPackagers,
|
createNotebookPageByCategory( m_auiNotebook, _( "Packagers" ), m_picPackagers,
|
||||||
|
@ -237,7 +244,8 @@ void DIALOG_ABOUT::createNotebookPageByCategory(wxAuiNotebook* aParent, const wx
|
||||||
wxStaticText* m_staticText1 = new wxStaticText( m_scrolledWindow1, wxID_ANY,
|
wxStaticText* m_staticText1 = new wxStaticText( m_scrolledWindow1, wxID_ANY,
|
||||||
contributor->GetCategory() + wxT( ":" ),
|
contributor->GetCategory() + wxT( ":" ),
|
||||||
wxDefaultPosition, wxDefaultSize, 0 );
|
wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText1->SetFont( wxFont( -1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false,
|
m_staticText1->SetFont( wxFont( -1, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
|
||||||
|
wxFONTWEIGHT_BOLD, false,
|
||||||
wxEmptyString ) ); // bold font
|
wxEmptyString ) ); // bold font
|
||||||
m_staticText1->Wrap( -1 );
|
m_staticText1->Wrap( -1 );
|
||||||
fgSizer1->Add( m_staticText1, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
|
fgSizer1->Add( m_staticText1, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
|
||||||
|
@ -444,7 +452,7 @@ void DIALOG_ABOUT::buildVersionInfoData( wxString& aMsg, bool aFormatHtml )
|
||||||
#define OFF "OFF" << eol
|
#define OFF "OFF" << eol
|
||||||
|
|
||||||
wxPlatformInfo platform;
|
wxPlatformInfo platform;
|
||||||
aMsg << "Application: " << m_info.GetAppName() << eol;
|
aMsg << "Application: " << m_titleName << eol;
|
||||||
aMsg << "Version: " << m_info.GetBuildVersion() << eol;
|
aMsg << "Version: " << m_info.GetBuildVersion() << eol;
|
||||||
aMsg << "Libraries:" << eol;
|
aMsg << "Libraries:" << eol;
|
||||||
aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() << eol;
|
aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() << eol;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
|
* Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
|
||||||
* Copyright (C) 2010-2017 KiCad Developers, see CHANGELOG.TXT for contributors.
|
* Copyright (C) 2010-2019 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -49,6 +49,7 @@ private:
|
||||||
wxBitmap m_picTranslators;
|
wxBitmap m_picTranslators;
|
||||||
wxBitmap m_picPackagers;
|
wxBitmap m_picPackagers;
|
||||||
wxBitmap m_picLicense;
|
wxBitmap m_picLicense;
|
||||||
|
wxString m_titleName;
|
||||||
|
|
||||||
ABOUT_APP_INFO& m_info;
|
ABOUT_APP_INFO& m_info;
|
||||||
|
|
||||||
|
|
|
@ -196,6 +196,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
m_libMgr = nullptr;
|
m_libMgr = nullptr;
|
||||||
m_unit = 1;
|
m_unit = 1;
|
||||||
m_convert = 1;
|
m_convert = 1;
|
||||||
|
m_AboutTitle = "LibEdit";
|
||||||
|
|
||||||
// Delayed initialization
|
// Delayed initialization
|
||||||
if( g_LastTextSize == -1 )
|
if( g_LastTextSize == -1 )
|
||||||
|
|
|
@ -334,6 +334,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||||
m_undoItem = NULL;
|
m_undoItem = NULL;
|
||||||
m_hasAutoSave = true;
|
m_hasAutoSave = true;
|
||||||
m_FrameSize = ConvertDialogToPixels( wxSize( 500, 350 ) ); // default in case of no prefs
|
m_FrameSize = ConvertDialogToPixels( wxSize( 500, 350 ) ); // default in case of no prefs
|
||||||
|
m_AboutTitle = "Eeschema";
|
||||||
|
|
||||||
SetForceHVLines( true );
|
SetForceHVLines( true );
|
||||||
SetSpiceAjustPassiveValues( false );
|
SetSpiceAjustPassiveValues( false );
|
||||||
|
|
|
@ -93,9 +93,11 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||||
m_SelNetnameBox = nullptr;
|
m_SelNetnameBox = nullptr;
|
||||||
m_SelAperAttributesBox = nullptr;
|
m_SelAperAttributesBox = nullptr;
|
||||||
m_displayMode = 0;
|
m_displayMode = 0;
|
||||||
|
m_AboutTitle = "GerbView";
|
||||||
|
|
||||||
int fileHistorySize;
|
int fileHistorySize;
|
||||||
Pgm().CommonSettings()->Read( FILE_HISTORY_SIZE_KEY, &fileHistorySize, DEFAULT_FILE_HISTORY_SIZE );
|
Pgm().CommonSettings()->Read( FILE_HISTORY_SIZE_KEY, &fileHistorySize,
|
||||||
|
DEFAULT_FILE_HISTORY_SIZE );
|
||||||
m_drillFileHistory.SetMaxFiles( fileHistorySize );
|
m_drillFileHistory.SetMaxFiles( fileHistorySize );
|
||||||
m_zipFileHistory.SetMaxFiles( fileHistorySize );
|
m_zipFileHistory.SetMaxFiles( fileHistorySize );
|
||||||
m_jobFileHistory.SetMaxFiles( fileHistorySize );
|
m_jobFileHistory.SetMaxFiles( fileHistorySize );
|
||||||
|
@ -893,6 +895,7 @@ void GERBVIEW_FRAME::SetVisibleElementColor( int aLayerID, COLOR4D aColor )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
COLOR4D GERBVIEW_FRAME::GetNegativeItemsColor()
|
COLOR4D GERBVIEW_FRAME::GetNegativeItemsColor()
|
||||||
{
|
{
|
||||||
if( IsElementVisible( LAYER_NEGATIVE_OBJECTS ) )
|
if( IsElementVisible( LAYER_NEGATIVE_OBJECTS ) )
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2015 Jean-Pierre Charras, jp.charras wanadoo.fr
|
* Copyright (C) 2009-2015 Jean-Pierre Charras, jp.charras wanadoo.fr
|
||||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
|
||||||
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -87,20 +87,20 @@ enum id_librarytype {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class EDA_BASE_FRAME
|
* The base frame for deriving all KiCad main window classes.
|
||||||
* is the base frame for deriving all KiCad main window classes. This class is not
|
*
|
||||||
* intended to be used directly. It provides support for automatic calls to
|
* This class is not intended to be used directly. It provides support for automatic calls
|
||||||
* a SaveSettings() function. SaveSettings() for a derived class can choose
|
* to SaveSettings() function. SaveSettings() for a derived class can choose to do nothing,
|
||||||
* to do nothing, or rely on basic SaveSettings() support in this base class to do
|
* or rely on basic SaveSettings() support in this base class to do most of the work by
|
||||||
* most of the work by calling it from the derived class's SaveSettings().
|
* calling it from the derived class's SaveSettings().
|
||||||
* <p>
|
* <p>
|
||||||
* This class is not a KIWAY_PLAYER because KICAD_MANAGER_FRAME is derived from it
|
* This class is not a KIWAY_PLAYER because KICAD_MANAGER_FRAME is derived from it
|
||||||
* and that class is not a player.
|
* and that class is not a player.
|
||||||
|
* </p>
|
||||||
*/
|
*/
|
||||||
class EDA_BASE_FRAME : public wxFrame
|
class EDA_BASE_FRAME : public wxFrame
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Function windowClosing
|
|
||||||
* (with its unexpected name so it does not collide with the real OnWindowClose()
|
* (with its unexpected name so it does not collide with the real OnWindowClose()
|
||||||
* function provided in derived classes) is called just before a window
|
* function provided in derived classes) is called just before a window
|
||||||
* closing, and is used to call a derivation specific
|
* closing, and is used to call a derivation specific
|
||||||
|
@ -148,7 +148,6 @@ protected:
|
||||||
static constexpr int KICAD_AUI_TB_STYLE = wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_PLAIN_BACKGROUND;
|
static constexpr int KICAD_AUI_TB_STYLE = wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_PLAIN_BACKGROUND;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetBackupSuffix
|
|
||||||
* @return the suffix to be appended to the file extension on backup
|
* @return the suffix to be appended to the file extension on backup
|
||||||
*/
|
*/
|
||||||
static wxString GetBackupSuffix()
|
static wxString GetBackupSuffix()
|
||||||
|
@ -157,7 +156,6 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetAutoSaveFilePrefix
|
|
||||||
* @return the string to prepend to a file name for automatic save.
|
* @return the string to prepend to a file name for automatic save.
|
||||||
*/
|
*/
|
||||||
static wxString GetAutoSaveFilePrefix()
|
static wxString GetAutoSaveFilePrefix()
|
||||||
|
@ -166,37 +164,35 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function onAutoSaveTimer
|
* Handle the auto save timer event.
|
||||||
* handles the auto save timer event.
|
|
||||||
*/
|
*/
|
||||||
void onAutoSaveTimer( wxTimerEvent& aEvent );
|
void onAutoSaveTimer( wxTimerEvent& aEvent );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function autoSaveRequired
|
* Return the auto save status of the application.
|
||||||
* returns the auto save status of the application. Override this function if
|
*
|
||||||
* your derived frame supports automatic file saving.
|
* Override this function if your derived frame supports automatic file saving.
|
||||||
*/
|
*/
|
||||||
virtual bool isAutoSaveRequired() const { return false; }
|
virtual bool isAutoSaveRequired() const { return false; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function doAutoSave
|
* This should be overridden by the derived class to handle the auto save feature.
|
||||||
* should be overridden by the derived class to handle the auto save feature.
|
|
||||||
*
|
*
|
||||||
* @return true if the auto save was successful otherwise false.
|
* @return true if the auto save was successful otherwise false.
|
||||||
*/
|
*/
|
||||||
virtual bool doAutoSave();
|
virtual bool doAutoSave();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function config
|
* Return the wxConfigBase used in SaveSettings().
|
||||||
* returns the wxConfigBase used in SaveSettings(), and is overloaded in
|
*
|
||||||
* KICAD_MANAGER_FRAME
|
* This is overloaded in #KICAD_MANAGER_FRAME
|
||||||
*/
|
*/
|
||||||
virtual wxConfigBase* config();
|
virtual wxConfigBase* config();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function sys_search
|
* Return a SEARCH_STACK pertaining to entire program.
|
||||||
* returns a SEARCH_STACK pertaining to entire program, and is overloaded in
|
*
|
||||||
* KICAD_MANAGER_FRAME
|
* This is overloaded in #KICAD_MANAGER_FRAME
|
||||||
*/
|
*/
|
||||||
virtual const SEARCH_STACK& sys_search();
|
virtual const SEARCH_STACK& sys_search();
|
||||||
|
|
||||||
|
@ -210,8 +206,7 @@ public:
|
||||||
~EDA_BASE_FRAME();
|
~EDA_BASE_FRAME();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function ProcessEvent
|
* Override the default process event handler to implement the auto save feature.
|
||||||
* overrides the default process event handler to implement the auto save feature.
|
|
||||||
*
|
*
|
||||||
* @warning If you override this function in a derived class, make sure you call
|
* @warning If you override this function in a derived class, make sure you call
|
||||||
* down to this or the auto save feature will be disabled.
|
* down to this or the auto save feature will be disabled.
|
||||||
|
@ -236,16 +231,14 @@ public:
|
||||||
void PrintMsg( const wxString& text );
|
void PrintMsg( const wxString& text );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function InstallPreferences
|
* Allow a frame to load its preference panels (if any) into the preferences dialog.
|
||||||
* allows a Frame to load its preference panels (if any) into the preferences
|
*
|
||||||
* dialog.
|
|
||||||
* @param aParent a paged dialog into which the preference panels should be installed
|
* @param aParent a paged dialog into which the preference panels should be installed
|
||||||
*/
|
*/
|
||||||
virtual void InstallPreferences( PAGED_DIALOG* aParent ) { }
|
virtual void InstallPreferences( PAGED_DIALOG* aParent ) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function LoadSettings
|
* Load common frame parameters from a configuration file.
|
||||||
* loads common frame parameters from a configuration file.
|
|
||||||
*
|
*
|
||||||
* Don't forget to call the base method or your frames won't
|
* Don't forget to call the base method or your frames won't
|
||||||
* remember their positions and sizes.
|
* remember their positions and sizes.
|
||||||
|
@ -253,8 +246,7 @@ public:
|
||||||
virtual void LoadSettings( wxConfigBase* aCfg );
|
virtual void LoadSettings( wxConfigBase* aCfg );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SaveSettings
|
* Saves common frame parameters to a configuration data file.
|
||||||
* saves common frame parameters to a configuration data file.
|
|
||||||
*
|
*
|
||||||
* Don't forget to call the base class's SaveSettings() from
|
* Don't forget to call the base class's SaveSettings() from
|
||||||
* your derived SaveSettings() otherwise the frames won't remember their
|
* your derived SaveSettings() otherwise the frames won't remember their
|
||||||
|
@ -263,7 +255,6 @@ public:
|
||||||
virtual void SaveSettings( wxConfigBase* aCfg );
|
virtual void SaveSettings( wxConfigBase* aCfg );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function ConfigBaseName
|
|
||||||
* @return a base name prefix used in Load/Save settings to build
|
* @return a base name prefix used in Load/Save settings to build
|
||||||
* the full name of keys used in config.
|
* the full name of keys used in config.
|
||||||
* This is usually the name of the frame set by CTOR, unless m_configFrameName
|
* This is usually the name of the frame set by CTOR, unless m_configFrameName
|
||||||
|
@ -280,8 +271,8 @@ public:
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function SaveProjectSettings
|
* Save changes to the project settings to the project (.pro) file.
|
||||||
* saves changes to the project settings to the project (.pro) file.
|
*
|
||||||
* The method is virtual so you can override it to call the suitable save method.
|
* The method is virtual so you can override it to call the suitable save method.
|
||||||
* The base method do nothing
|
* The base method do nothing
|
||||||
* @param aAskForSave = true to open a dialog before saving the settings
|
* @param aAskForSave = true to open a dialog before saving the settings
|
||||||
|
@ -291,9 +282,9 @@ public:
|
||||||
// Read/Save and Import/export hotkeys config
|
// Read/Save and Import/export hotkeys config
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function WriteHotkeyConfig
|
|
||||||
* Store the current hotkey list
|
* Store the current hotkey list
|
||||||
* It is stored using the standard wxConfig mechanism or a file.
|
*
|
||||||
|
* The hotkey list is stored using the standard wxConfig mechanism or a file.
|
||||||
*
|
*
|
||||||
* @param aDescList = pointer to the current hotkey list.
|
* @param aDescList = pointer to the current hotkey list.
|
||||||
* @param aFullFileName = a wxString pointer to a full file name.
|
* @param aFullFileName = a wxString pointer to a full file name.
|
||||||
|
@ -301,34 +292,35 @@ public:
|
||||||
* the output format is: shortcut "key" "function"
|
* the output format is: shortcut "key" "function"
|
||||||
* lines starting with # are comments
|
* lines starting with # are comments
|
||||||
*/
|
*/
|
||||||
virtual int WriteHotkeyConfig( struct EDA_HOTKEY_CONFIG* aDescList, wxString* aFullFileName = NULL );
|
virtual int WriteHotkeyConfig( struct EDA_HOTKEY_CONFIG* aDescList,
|
||||||
|
wxString* aFullFileName = NULL );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function ImportHotkeyConfigFromFile
|
|
||||||
* Prompt the user for an old hotkey file to read, and read it.
|
* Prompt the user for an old hotkey file to read, and read it.
|
||||||
|
*
|
||||||
* @param aDescList = current hotkey list descr. to initialize.
|
* @param aDescList = current hotkey list descr. to initialize.
|
||||||
* @param aDefaultShortname = a default short name (extention not needed)
|
* @param aDefaultShortname = a default short name (extension not needed)
|
||||||
* like eechema, kicad...
|
* like eechema, kicad...
|
||||||
*/
|
*/
|
||||||
void ImportHotkeyConfigFromFile( EDA_HOTKEY_CONFIG* aDescList,
|
void ImportHotkeyConfigFromFile( EDA_HOTKEY_CONFIG* aDescList,
|
||||||
const wxString& aDefaultShortname );
|
const wxString& aDefaultShortname );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function ExportHotkeyConfigToFile
|
|
||||||
* Prompt the user for an old hotkey file to read, and read it.
|
* Prompt the user for an old hotkey file to read, and read it.
|
||||||
|
*
|
||||||
* @param aDescList = current hotkey list descr. to initialize.
|
* @param aDescList = current hotkey list descr. to initialize.
|
||||||
* @param aDefaultShortname = a default short name (extention not needed)
|
* @param aDefaultShortname = a default short name (extension not needed)
|
||||||
* like eechema, kicad...
|
* like eechema, kicad...
|
||||||
*/
|
*/
|
||||||
void ExportHotkeyConfigToFile( EDA_HOTKEY_CONFIG* aDescList,
|
void ExportHotkeyConfigToFile( EDA_HOTKEY_CONFIG* aDescList,
|
||||||
const wxString& aDefaultShortname );
|
const wxString& aDefaultShortname );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function GetFileFromHistory
|
* Fetches the file name from the file history list.
|
||||||
* fetches the file name from the file history list.
|
*
|
||||||
* and removes the selected file, if this file does not exists
|
* This removes the selected file, if this file does not exist. The menu is also updated,
|
||||||
* Note also the menu is updated, if wxFileHistory::UseMenu
|
* if wxFileHistory::UseMenu was called at init time
|
||||||
* was called at init time
|
*
|
||||||
* @param cmdId The command ID associated with the \a aFileHistory object.
|
* @param cmdId The command ID associated with the \a aFileHistory object.
|
||||||
* @param type Please document me!
|
* @param type Please document me!
|
||||||
* @param aFileHistory The wxFileHistory in use. If null, the main application file
|
* @param aFileHistory The wxFileHistory in use. If null, the main application file
|
||||||
|
@ -339,10 +331,10 @@ public:
|
||||||
wxFileHistory* aFileHistory = NULL );
|
wxFileHistory* aFileHistory = NULL );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function UpdateFileHistory
|
* Update the list of recently opened files.
|
||||||
* Updates the list of recently opened files.
|
*
|
||||||
* Note also the menu is updated, if wxFileHistory::UseMenu
|
* The menu is also updated, if wxFileHistory::UseMenu was called at init time.
|
||||||
* was called at init time
|
*
|
||||||
* @param FullFileName The full file name including the path.
|
* @param FullFileName The full file name including the path.
|
||||||
* @param aFileHistory The wxFileHistory in use.
|
* @param aFileHistory The wxFileHistory in use.
|
||||||
* If NULL, the main application file history is used.
|
* If NULL, the main application file history is used.
|
||||||
|
@ -354,15 +346,14 @@ public:
|
||||||
wxString GetMruPath() const { return m_mruPath; }
|
wxString GetMruPath() const { return m_mruPath; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function ReCreateMenuBar
|
* Recreates the menu bar.
|
||||||
* Creates recreates the menu bar.
|
*
|
||||||
* Needed when the language is changed
|
* Needed when the language is changed
|
||||||
*/
|
*/
|
||||||
virtual void ReCreateMenuBar();
|
virtual void ReCreateMenuBar();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function IsWritable
|
* Checks if \a aFileName can be written.
|
||||||
* checks if \a aFileName can be written.
|
|
||||||
* <p>
|
* <p>
|
||||||
* The function performs a number of tests on \a aFileName to verify that it
|
* The function performs a number of tests on \a aFileName to verify that it
|
||||||
* can be saved. If \a aFileName defines a path with no file name, them the
|
* can be saved. If \a aFileName defines a path with no file name, them the
|
||||||
|
@ -380,8 +371,7 @@ public:
|
||||||
bool IsWritable( const wxFileName& aFileName );
|
bool IsWritable( const wxFileName& aFileName );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function CheckForAutoSaveFile
|
* Check if an auto save file exists for \a aFileName and takes the appropriate
|
||||||
* checks if an auto save file exists for \a aFileName and takes the appropriate
|
|
||||||
* action depending on the user input.
|
* action depending on the user input.
|
||||||
* <p>
|
* <p>
|
||||||
* If an auto save file exists for \a aFileName, the user is prompted if they wish
|
* If an auto save file exists for \a aFileName, the user is prompted if they wish
|
||||||
|
@ -396,25 +386,23 @@ public:
|
||||||
void CheckForAutoSaveFile( const wxFileName& aFileName );
|
void CheckForAutoSaveFile( const wxFileName& aFileName );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function ShowChangedLanguage
|
* Redraw the menus and what not in current language.
|
||||||
* redraws the menus and what not in current language.
|
|
||||||
*/
|
*/
|
||||||
virtual void ShowChangedLanguage();
|
virtual void ShowChangedLanguage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function CommonSettingsChanged
|
|
||||||
* Notification event that some of the common (suite-wide) settings have changed.
|
* Notification event that some of the common (suite-wide) settings have changed.
|
||||||
* Update menus, toolbars, local variables, etc.
|
* Update menus, toolbars, local variables, etc.
|
||||||
*/
|
*/
|
||||||
virtual void CommonSettingsChanged();
|
virtual void CommonSettingsChanged();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function PostCommandMenuEvent
|
|
||||||
*
|
|
||||||
* Post a menu event to the frame, which can be used to trigger actions
|
* Post a menu event to the frame, which can be used to trigger actions
|
||||||
* bound to menu items.
|
* bound to menu items.
|
||||||
*/
|
*/
|
||||||
bool PostCommandMenuEvent( int evt_type );
|
bool PostCommandMenuEvent( int evt_type );
|
||||||
|
|
||||||
|
const wxString& GetAboutTitle() const { return m_AboutTitle; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -450,7 +438,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function HToolbar
|
|
||||||
* Turn *this to a horizontal toolbar for KiCad.
|
* Turn *this to a horizontal toolbar for KiCad.
|
||||||
*/
|
*/
|
||||||
EDA_PANE& HToolbar()
|
EDA_PANE& HToolbar()
|
||||||
|
@ -465,7 +452,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function VToolbar
|
|
||||||
* Turn *this into a vertical toolbar for KiCad.
|
* Turn *this into a vertical toolbar for KiCad.
|
||||||
*/
|
*/
|
||||||
EDA_PANE& VToolbar()
|
EDA_PANE& VToolbar()
|
||||||
|
@ -480,7 +466,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Palette
|
|
||||||
* Turn *this into a captioned palette suitable for a symbol tree, layers manager, etc.
|
* Turn *this into a captioned palette suitable for a symbol tree, layers manager, etc.
|
||||||
*/
|
*/
|
||||||
EDA_PANE& Palette()
|
EDA_PANE& Palette()
|
||||||
|
@ -491,7 +476,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Canvas
|
|
||||||
* Turn *this into an undecorated pane suitable for a drawing canvas.
|
* Turn *this into an undecorated pane suitable for a drawing canvas.
|
||||||
*/
|
*/
|
||||||
EDA_PANE& Canvas()
|
EDA_PANE& Canvas()
|
||||||
|
@ -504,7 +488,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function Messages
|
|
||||||
* Turn *this into a messages pane for KiCad.
|
* Turn *this into a messages pane for KiCad.
|
||||||
*/
|
*/
|
||||||
EDA_PANE& Messages()
|
EDA_PANE& Messages()
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||||
* Copyright (C) 2013 CERN (www.cern.ch)
|
* Copyright (C) 2013 CERN (www.cern.ch)
|
||||||
* Copyright (C) 2004-2018 KiCad Developers, see change_log.txt for contributors.
|
* Copyright (C) 2004-2019 KiCad Developers, see change_log.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -62,6 +62,7 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent,
|
||||||
m_active_project = false;
|
m_active_project = false;
|
||||||
m_leftWinWidth = 60;
|
m_leftWinWidth = 60;
|
||||||
m_manager_Hotkeys_Descr = NULL;
|
m_manager_Hotkeys_Descr = NULL;
|
||||||
|
m_AboutTitle = "KiCad";
|
||||||
|
|
||||||
// Create the status line (bottom of the frame)
|
// Create the status line (bottom of the frame)
|
||||||
static const int dims[3] = { -1, -1, 100 };
|
static const int dims[3] = { -1, -1, 100 };
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 CERN
|
* Copyright (C) 2013 CERN
|
||||||
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2017-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
* @author Jean-Pierre Charras, jp.charras at wanadoo.fr
|
* @author Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -49,9 +49,6 @@
|
||||||
#include <wildcards_and_files_ext.h>
|
#include <wildcards_and_files_ext.h>
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
|
|
||||||
/*************************/
|
|
||||||
/* class PL_EDITOR_FRAME */
|
|
||||||
/*************************/
|
|
||||||
|
|
||||||
PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
EDA_DRAW_FRAME( aKiway, aParent, FRAME_PL_EDITOR, wxT( "PlEditorFrame" ),
|
EDA_DRAW_FRAME( aKiway, aParent, FRAME_PL_EDITOR, wxT( "PlEditorFrame" ),
|
||||||
|
@ -70,6 +67,7 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
m_originSelectChoice = 0;
|
m_originSelectChoice = 0;
|
||||||
SetDrawBgColor( WHITE ); // default value, user option (WHITE/BLACK)
|
SetDrawBgColor( WHITE ); // default value, user option (WHITE/BLACK)
|
||||||
SetShowPageLimits( true );
|
SetShowPageLimits( true );
|
||||||
|
m_AboutTitle = "PlEditor";
|
||||||
|
|
||||||
m_designTreeWidth = 150;
|
m_designTreeWidth = 150;
|
||||||
m_propertiesFrameWidth = 200;
|
m_propertiesFrameWidth = 200;
|
||||||
|
@ -185,7 +183,8 @@ void PL_EDITOR_FRAME::OnCloseWindow( wxCloseEvent& Event )
|
||||||
{
|
{
|
||||||
if( GetScreen()->IsModify() )
|
if( GetScreen()->IsModify() )
|
||||||
{
|
{
|
||||||
if( !HandleUnsavedChanges( this, _( "The current page layout has been modified. Save changes?" ),
|
if( !HandleUnsavedChanges( this,
|
||||||
|
_( "The current page layout has been modified. Save changes?" ),
|
||||||
[&]()->bool { return saveCurrentPageLayout(); } ) )
|
[&]()->bool { return saveCurrentPageLayout(); } ) )
|
||||||
{
|
{
|
||||||
Event.Veto();
|
Event.Veto();
|
||||||
|
@ -325,7 +324,7 @@ void PL_EDITOR_FRAME::UpdateStatusBar()
|
||||||
// Display Zoom level:
|
// Display Zoom level:
|
||||||
EDA_DRAW_FRAME::UpdateStatusBar();
|
EDA_DRAW_FRAME::UpdateStatusBar();
|
||||||
|
|
||||||
// coodinate origin can be the paper Top Left corner,
|
// coordinate origin can be the paper Top Left corner,
|
||||||
// or each of 4 page corners
|
// or each of 4 page corners
|
||||||
// We know the origin, and the orientation of axis
|
// We know the origin, and the orientation of axis
|
||||||
wxPoint originCoord;
|
wxPoint originCoord;
|
||||||
|
|
|
@ -218,6 +218,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
||||||
m_hotkeysDescrList = g_Module_Editor_Hotkeys_Descr;
|
m_hotkeysDescrList = g_Module_Editor_Hotkeys_Descr;
|
||||||
m_FrameSize = ConvertDialogToPixels( wxSize( 500, 350 ) ); // default in case of no prefs
|
m_FrameSize = ConvertDialogToPixels( wxSize( 500, 350 ) ); // default in case of no prefs
|
||||||
m_canvasType = aBackend;
|
m_canvasType = aBackend;
|
||||||
|
m_AboutTitle = "ModEdit";
|
||||||
|
|
||||||
// Give an icon
|
// Give an icon
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
|
|
|
@ -335,6 +335,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
m_ZoneFillsDirty = true;
|
m_ZoneFillsDirty = true;
|
||||||
|
|
||||||
m_rotationAngle = 900;
|
m_rotationAngle = 900;
|
||||||
|
m_AboutTitle = "Pcbnew";
|
||||||
|
|
||||||
// Create GAL canvas
|
// Create GAL canvas
|
||||||
EDA_DRAW_PANEL_GAL* galCanvas = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ),
|
EDA_DRAW_PANEL_GAL* galCanvas = new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ),
|
||||||
|
|
Loading…
Reference in New Issue