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

Modified Files:
        MixerToolBar.cpp MixerToolBar.h 
Log Message:
Unshow recording slider when the mixer doesn't work.


Index: MixerToolBar.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/toolbars/MixerToolBar.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- MixerToolBar.h      29 Mar 2009 03:39:08 -0000      1.3
+++ MixerToolBar.h      24 Nov 2009 03:03:25 -0000      1.4
@@ -17,6 +17,7 @@
 class wxSize;
 class wxPoint;
 class wxChoice;
+class wxStaticBitmap;
 
 class ASlider;
 
@@ -56,6 +57,7 @@
 
    wxBitmap *mPlayBitmap;
    wxBitmap *mRecordBitmap;
+   wxStaticBitmap *mRecordSB;
 
    ASlider *mInputSlider;
    ASlider *mOutputSlider;

Index: MixerToolBar.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/toolbars/MixerToolBar.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- MixerToolBar.cpp    23 Nov 2009 08:30:58 -0000      1.15
+++ MixerToolBar.cpp    24 Nov 2009 03:03:25 -0000      1.16
@@ -94,9 +94,10 @@
 
    mRecordBitmap = new wxBitmap(theTheme.Bitmap(bmpMic));
 
-   Add(new wxStaticBitmap(this,
+   mRecordSB = new wxStaticBitmap(this,
                           wxID_ANY, 
-                          *mRecordBitmap), 0, wxALIGN_CENTER);
+                          *mRecordBitmap);
+   Add(mRecordSB, 0, wxALIGN_CENTER);
 
    mInputSlider = new ASlider(this, wxID_ANY, _("Input Volume"),
                               wxDefaultPosition, wxSize(130, 25));
@@ -148,6 +149,10 @@
    // Show or hide the control based on input sources
    mInputSourceChoice->Show( inputSources.GetCount() != 0 );
 
+   // Show or hide the input slider based on whether it works
+   mInputSlider->Show(gAudioIO->InputMixerWorks());
+   mRecordSB->Show(gAudioIO->InputMixerWorks());
+
    UpdateControls();
 
 #endif
@@ -221,6 +226,10 @@
 
    // Show or hide the control based on input sources
    mInputSourceChoice->Show( inputSources.GetCount() != 0 );
+   
+   // Show or hide the input slider based on whether it works
+   mInputSlider->Show(gAudioIO->InputMixerWorks());
+   mRecordSB->Show(gAudioIO->InputMixerWorks());
 
    // Layout the toolbar
    Layout();


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to