Update of /cvsroot/audacity/audacity-src/src/widgets
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv681/src/widgets

Modified Files:
        Meter.cpp 
Log Message:
Translate the "L" and "R" strings at meter paint time rather than only on meter 
creation so they change language without an Audacity re-start. Makes the 
variables local scope to their function rather than member variables in the 
class. Based on patch by Ed Musgrove


Index: Meter.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/Meter.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- Meter.cpp   13 Sep 2009 21:26:31 -0000      1.67
+++ Meter.cpp   26 Dec 2009 23:42:48 -0000      1.68
@@ -245,11 +245,6 @@
    mPeakPeakPen = wxPen(theTheme.Colour( clrMeterPeak),        1, wxSOLID);
    mDisabledPen = wxPen(theTheme.Colour( clrMeterDisabledPen), 1, wxSOLID);
 
-   /* i18n-hint: One-letter abbreviation for Left, in VU Meter */
-   mLeftText = _("L");
-   /* i18n-hint: One-letter abbreviation for Right, in VU Meter */
-   mRightText = _("R");
-
    mLeftSize = wxSize(0, 0);
    mRightSize = wxSize(0, 0);
 
@@ -943,6 +938,11 @@
 void Meter::HandlePaint(wxDC &dc)
 {
    int i;
+   /* i18n-hint: One-letter abbreviation for Left, in VU Meter */
+   wxString mLeftText = _("L");  // used in a couple of places in this method.
+   // not a class member so it changes when the UI language is changed.
+   /* i18n-hint: One-letter abbreviation for Right, in VU Meter */
+   wxString mRightText = _("R");
 
    dc.SetFont(GetFont());
    if (mLeftSize.x == 0) { // Not yet initialized to dc.


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to