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 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.
+2 −2
Original line number Diff line number Diff line
@@ -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
+5 −9
Original line number 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 )
{
    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 );
}

/**
+4 −6
Original line number 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 )
{
    int id = event.GetId();

    wxGetApp().SetLanguageIdentifier( id );
    wxGetApp().SetLanguage();
    ReCreateMenuBar();
    Refresh();
    WinEDA_BasicFrame::SetLanguage( event );
}


+14 −0
Original line number Diff line number Diff line
@@ -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();
Loading