Commit 47bfe663 authored by charras's avatar charras
Browse files

Setting a new language now update the layer manager.

parent 1661d6d4
Loading
Loading
Loading
Loading
+17 −0
Original line number Original line Diff line number Diff line
@@ -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.
 * Load common frame parameters from configuration.
+2 −2
Original line number Original line Diff line number Diff line
@@ -6,10 +6,10 @@
#endif
#endif


#ifndef KICAD_BUILD_VERSION
#ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2010-02-21)"
#define KICAD_BUILD_VERSION "(2010-02-26)"
#endif
#endif


#define VERSION_STABILITY "RC4"
#define VERSION_STABILITY "RC5"


/** Function GetBuildVersion()
/** Function GetBuildVersion()
 * Return the build date and version
 * Return the build date and version
+5 −9
Original line number Original line Diff line number Diff line
@@ -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 )
void WinEDA_DrawFrame::SetLanguage( wxCommandEvent& event )
{
{
    int id = event.GetId();
    WinEDA_BasicFrame::SetLanguage( event );

    wxGetApp().SetLanguageIdentifier( id );
    if ( wxGetApp().SetLanguage() )
    {
        wxLogDebug( wxT( "Recreating menu bar due to language change." ) );
        ReCreateMenuBar();
        Refresh();
    }
}
}


/**
/**
+4 −6
Original line number Original line Diff line number Diff line
@@ -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 )
void WinEDA_CvpcbFrame::SetLanguage( wxCommandEvent& event )
{
{
    int id = event.GetId();
    WinEDA_BasicFrame::SetLanguage( event );

    wxGetApp().SetLanguageIdentifier( id );
    wxGetApp().SetLanguage();
    ReCreateMenuBar();
    Refresh();
}
}




+14 −0
Original line number Original line Diff line number Diff line
@@ -77,6 +77,9 @@ GERBER_LAYER_WIDGET::GERBER_LAYER_WIDGET( WinEDA_GerberFrame* aParent, wxWindow*


    AppendRenderRows( renderRows, DIM(renderRows) );
    AppendRenderRows( renderRows, DIM(renderRows) );
    
    
    // Update default tabs labels for gerbview
    SetLayersManagerTabsText( );

    //-----<Popup menu>-------------------------------------------------
    //-----<Popup menu>-------------------------------------------------
    // handle the popup menu over the layer window.
    // handle the popup menu over the layer window.
    m_LayerScrolledWindow->Connect( wxEVT_RIGHT_DOWN,
    m_LayerScrolledWindow->Connect( wxEVT_RIGHT_DOWN,
@@ -91,6 +94,16 @@ GERBER_LAYER_WIDGET::GERBER_LAYER_WIDGET( WinEDA_GerberFrame* aParent, wxWindow*
    // using installRightLayerClickHandler
    // 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()
void GERBER_LAYER_WIDGET::installRightLayerClickHandler()
{
{
@@ -175,6 +188,7 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
}
}





void GERBER_LAYER_WIDGET::ReFill()
void GERBER_LAYER_WIDGET::ReFill()
{
{
    BOARD*  brd = myframe->GetBoard();
    BOARD*  brd = myframe->GetBoard();
Loading