Setting a new language now update the layer manager.
This commit is contained in:
parent
1661d6d405
commit
47bfe663fd
|
@ -77,6 +77,23 @@ void WinEDA_BasicFrame::ReCreateMenuBar()
|
|||
|
||||
}
|
||||
|
||||
/** Vitual function SetLanguage
|
||||
* called on a language menu selection
|
||||
* when using a derived function, do not forget to call this one
|
||||
*/
|
||||
void WinEDA_BasicFrame::SetLanguage( wxCommandEvent& event )
|
||||
{
|
||||
int id = event.GetId();
|
||||
|
||||
wxGetApp().SetLanguageIdentifier( id );
|
||||
if ( wxGetApp().SetLanguage() )
|
||||
{
|
||||
wxLogDebug( wxT( "Recreating menu bar due to language change." ) );
|
||||
ReCreateMenuBar();
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load common frame parameters from configuration.
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
#endif
|
||||
|
||||
#ifndef KICAD_BUILD_VERSION
|
||||
#define KICAD_BUILD_VERSION "(2010-02-21)"
|
||||
#define KICAD_BUILD_VERSION "(2010-02-26)"
|
||||
#endif
|
||||
|
||||
#define VERSION_STABILITY "RC4"
|
||||
#define VERSION_STABILITY "RC5"
|
||||
|
||||
/** Function GetBuildVersion()
|
||||
* Return the build date and version
|
||||
|
|
|
@ -533,17 +533,13 @@ void WinEDA_DrawFrame::AdjustScrollBars()
|
|||
}
|
||||
|
||||
|
||||
/** function SetLanguage
|
||||
* called on a language menu selection
|
||||
* when using a derived function, do not forget to call this one
|
||||
*/
|
||||
void WinEDA_DrawFrame::SetLanguage( wxCommandEvent& event )
|
||||
{
|
||||
int id = event.GetId();
|
||||
|
||||
wxGetApp().SetLanguageIdentifier( id );
|
||||
if ( wxGetApp().SetLanguage() )
|
||||
{
|
||||
wxLogDebug( wxT( "Recreating menu bar due to language change." ) );
|
||||
ReCreateMenuBar();
|
||||
Refresh();
|
||||
}
|
||||
WinEDA_BasicFrame::SetLanguage( event );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -506,14 +506,12 @@ void WinEDA_CvpcbFrame::DisplayModule( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
/** Vitual function SetLanguage
|
||||
* called on a language menu selection
|
||||
*/
|
||||
void WinEDA_CvpcbFrame::SetLanguage( wxCommandEvent& event )
|
||||
{
|
||||
int id = event.GetId();
|
||||
|
||||
wxGetApp().SetLanguageIdentifier( id );
|
||||
wxGetApp().SetLanguage();
|
||||
ReCreateMenuBar();
|
||||
Refresh();
|
||||
WinEDA_BasicFrame::SetLanguage( event );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -77,6 +77,9 @@ GERBER_LAYER_WIDGET::GERBER_LAYER_WIDGET( WinEDA_GerberFrame* aParent, wxWindow*
|
|||
|
||||
AppendRenderRows( renderRows, DIM(renderRows) );
|
||||
|
||||
// Update default tabs labels for gerbview
|
||||
SetLayersManagerTabsText( );
|
||||
|
||||
//-----<Popup menu>-------------------------------------------------
|
||||
// handle the popup menu over the layer window.
|
||||
m_LayerScrolledWindow->Connect( wxEVT_RIGHT_DOWN,
|
||||
|
@ -91,6 +94,16 @@ GERBER_LAYER_WIDGET::GERBER_LAYER_WIDGET( WinEDA_GerberFrame* aParent, wxWindow*
|
|||
// using installRightLayerClickHandler
|
||||
}
|
||||
|
||||
/** Function SetLayersManagerTabsText
|
||||
* Update the layer manager tabs labels
|
||||
* Useful when changing Language or to set labels to a non default value
|
||||
*/
|
||||
void GERBER_LAYER_WIDGET::SetLayersManagerTabsText( )
|
||||
{
|
||||
m_notebook->SetPageText(0, _("Layer") );
|
||||
m_notebook->SetPageText(1, _("Render") );
|
||||
}
|
||||
|
||||
|
||||
void GERBER_LAYER_WIDGET::installRightLayerClickHandler()
|
||||
{
|
||||
|
@ -175,6 +188,7 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
|
||||
void GERBER_LAYER_WIDGET::ReFill()
|
||||
{
|
||||
BOARD* brd = myframe->GetBoard();
|
||||
|
|
|
@ -77,6 +77,11 @@ public:
|
|||
void OnLayerVisible( int aLayer, bool isVisible, bool isFinal );
|
||||
void OnRenderColorChange( int aId, int aColor );
|
||||
void OnRenderEnable( int aId, bool isEnabled );
|
||||
/** Function SetLayersManagerTabsText
|
||||
* Update the layer manager tabs labels
|
||||
* Useful when changing Language or to set labels to a non default value
|
||||
*/
|
||||
void SetLayersManagerTabsText( );
|
||||
//-----</implement LAYER_WIDGET abstract callback functions>----------
|
||||
};
|
||||
|
||||
|
|
|
@ -182,8 +182,6 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
|
|||
|
||||
// LAYER_WIDGET is floatable, but initially docked at far right
|
||||
wxAuiPaneInfo lyrs;
|
||||
lyrs.MinSize( m_LayersManager->GetBestSize() ); // updated in ReFillLayerWidget
|
||||
lyrs.BestSize( m_LayersManager->GetBestSize() );
|
||||
lyrs.CloseButton( false );
|
||||
lyrs.Caption( _( "Visibles" ) );
|
||||
lyrs.IsFloatable();
|
||||
|
@ -210,9 +208,10 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
|
|||
m_auimgr.AddPane( MsgPanel,
|
||||
wxAuiPaneInfo( horiz ).Name( wxT( "MsgPanel" ) ).Bottom() );
|
||||
|
||||
ReFillLayerWidget(); // this is near end because contents establish size
|
||||
|
||||
m_auimgr.Update();
|
||||
|
||||
ReFillLayerWidget(); // this is near end because contents establish size
|
||||
}
|
||||
|
||||
|
||||
|
@ -485,3 +484,17 @@ void WinEDA_GerberFrame::syncLayerBox()
|
|||
m_SelLayerBox->SetSelection( getActiveLayer() );
|
||||
}
|
||||
|
||||
/** function SetLanguage
|
||||
* called on a language menu selection
|
||||
* Update Layer manager title and tabs texts
|
||||
*/
|
||||
void WinEDA_GerberFrame::SetLanguage( wxCommandEvent& event )
|
||||
{
|
||||
WinEDA_DrawFrame::SetLanguage( event );
|
||||
m_LayersManager->SetLayersManagerTabsText( );
|
||||
wxAuiPaneInfo& pane_info = m_auimgr.GetPane(m_LayersManager);
|
||||
pane_info.Caption( _( "Visibles" ) );
|
||||
m_auimgr.Update();
|
||||
|
||||
ReFillLayerWidget();
|
||||
}
|
||||
|
|
|
@ -179,6 +179,11 @@ public:
|
|||
*/
|
||||
virtual void SaveSettings();
|
||||
|
||||
/** function SetLanguage
|
||||
* called on a language menu selection
|
||||
*/
|
||||
virtual void SetLanguage( wxCommandEvent& event );
|
||||
|
||||
void Process_Special_Functions( wxCommandEvent& event );
|
||||
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
|
||||
void ReCreateHToolbar();
|
||||
|
|
|
@ -909,6 +909,12 @@ public:
|
|||
*/
|
||||
virtual void SaveSettings();
|
||||
|
||||
/** function SetLanguage
|
||||
* called on a language menu selection
|
||||
*/
|
||||
virtual void SetLanguage( wxCommandEvent& event );
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
|
|
@ -126,7 +126,11 @@ public:
|
|||
int ReadHotkeyConfigFile( const wxString& Filename,
|
||||
struct Ki_HotkeyInfoSectionDescriptor* DescList,
|
||||
bool verbose );
|
||||
void SetLanguage( wxCommandEvent& event );
|
||||
/** function SetLanguage
|
||||
* called on a language menu selection
|
||||
* when using a derived function, do not forget to call this one
|
||||
*/
|
||||
virtual void SetLanguage( wxCommandEvent& event );
|
||||
|
||||
wxString GetFileFromHistory( int cmdId, const wxString& type );
|
||||
void SetLastProject( const wxString& FullFileName );
|
||||
|
@ -230,7 +234,12 @@ public:
|
|||
void EraseMsgBox();
|
||||
void Process_PageSettings( wxCommandEvent& event );
|
||||
virtual void SetToolbars();
|
||||
void SetLanguage( wxCommandEvent& event );
|
||||
/** function SetLanguage
|
||||
* called on a language menu selection
|
||||
* when using a derived function, do not forget to call this one
|
||||
*/
|
||||
virtual void SetLanguage( wxCommandEvent& event );
|
||||
|
||||
virtual void ReCreateHToolbar() = 0;
|
||||
virtual void ReCreateVToolbar() = 0;
|
||||
virtual void ReCreateMenuBar();
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -99,6 +99,9 @@ PCB_LAYER_WIDGET::PCB_LAYER_WIDGET( WinEDA_PcbFrame* aParent, wxWindow* aFocusOw
|
|||
|
||||
AppendRenderRows( renderRows, DIM(renderRows) );
|
||||
|
||||
// Update default tabs labels for gerbview
|
||||
SetLayersManagerTabsText( );
|
||||
|
||||
//-----<Popup menu>-------------------------------------------------
|
||||
// handle the popup menu over the layer window.
|
||||
m_LayerScrolledWindow->Connect( wxEVT_RIGHT_DOWN,
|
||||
|
@ -196,6 +199,16 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
|
|||
}
|
||||
}
|
||||
|
||||
/** Function SetLayersManagerTabsText
|
||||
* Update the layer manager tabs labels
|
||||
* Useful when changing Language or to set labels to a non default value
|
||||
*/
|
||||
void PCB_LAYER_WIDGET::SetLayersManagerTabsText( )
|
||||
{
|
||||
m_notebook->SetPageText(0, _("Layer") );
|
||||
m_notebook->SetPageText(1, _("Render") );
|
||||
}
|
||||
|
||||
|
||||
void PCB_LAYER_WIDGET::ReFill()
|
||||
{
|
||||
|
|
|
@ -75,6 +75,11 @@ public:
|
|||
void OnLayerVisible( int aLayer, bool isVisible, bool isFinal );
|
||||
void OnRenderColorChange( int aId, int aColor );
|
||||
void OnRenderEnable( int aId, bool isEnabled );
|
||||
/** Function SetLayersManagerTabsText
|
||||
* Update the layer manager tabs labels
|
||||
* Useful when changing Language or to set labels to a non default value
|
||||
*/
|
||||
void SetLayersManagerTabsText( );
|
||||
//-----</implement LAYER_WIDGET abstract callback functions>----------
|
||||
};
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
|
|||
WinEDA_PcbFrame::Process_Special_Functions )
|
||||
|
||||
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
|
||||
WinEDA_DrawFrame::SetLanguage )
|
||||
WinEDA_PcbFrame::SetLanguage )
|
||||
|
||||
// menu Postprocess
|
||||
EVT_MENU( ID_PCB_GEN_POS_MODULES_FILE, WinEDA_PcbFrame::GenModulesPosition )
|
||||
|
@ -617,3 +617,15 @@ void WinEDA_PcbFrame::SetVisibleAlls( )
|
|||
m_Layers->SetRenderState( ii, true );
|
||||
}
|
||||
|
||||
/** function SetLanguage
|
||||
* called on a language menu selection
|
||||
*/
|
||||
void WinEDA_PcbFrame::SetLanguage( wxCommandEvent& event )
|
||||
{
|
||||
WinEDA_DrawFrame::SetLanguage( event );
|
||||
m_Layers->SetLayersManagerTabsText( );
|
||||
wxAuiPaneInfo& pane_info = m_auimgr.GetPane(m_Layers);
|
||||
pane_info.Caption( _( "Visibles" ) );
|
||||
m_auimgr.Update();
|
||||
ReFillLayerWidget();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
release version:
|
||||
2010 feb 21
|
||||
2010 feb 26
|
||||
files (.zip,.tgz):
|
||||
kicad-2010-02-21-RC4
|
||||
kicad-2010-02-26-RC5
|
||||
|
|
Loading…
Reference in New Issue