Update of /cvsroot/audacity/audacity-src/src/prefs
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8631

Modified Files:
        SpectrumPrefs.cpp SpectrumPrefs.h 
Log Message:
Change the frequency gain setting to allow entry of a dB/decade value instead 
of just a checkbox
(it should be switched to a slider in the future)

Index: SpectrumPrefs.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/prefs/SpectrumPrefs.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- SpectrumPrefs.h     7 Jul 2009 02:32:55 -0000       1.17
+++ SpectrumPrefs.h     9 Jul 2009 02:43:22 -0000       1.18
@@ -46,6 +46,7 @@
    wxTextCtrl *mMaxFreq;
    wxTextCtrl *mGain;
    wxTextCtrl *mRange;
+   wxTextCtrl *mFrequencyGain;
 
    wxArrayString mSizeChoices;
    wxArrayInt mSizeCodes;

Index: SpectrumPrefs.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/prefs/SpectrumPrefs.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- SpectrumPrefs.cpp   7 Jul 2009 02:32:55 -0000       1.31
+++ SpectrumPrefs.cpp   9 Jul 2009 02:43:21 -0000       1.32
@@ -153,6 +153,12 @@
                          wxT("/Spectrum/Range"),
                          80,
                          8);
+
+         mFrequencyGain =
+            S.TieTextBox(_("Frequency gain: (dB/dec)"),
+                    wxT("/Spectrum/FrequencyGain"),
+                    0,
+                    4);
       }
       S.EndTwoColumn();
 
@@ -160,10 +166,6 @@
                     wxT("/Spectrum/Grayscale"),
                     false);
 
-      S.TieCheckBox(_("Use a frequency-proportional scale factor"),
-                    wxT("/Spectrum/FrequencyGain"),
-                    false);
-
 #ifdef EXPERIMENTAL_FFT_Y_GRID
       S.TieCheckBox(_("Show a grid along the &Y-axis"),
                     wxT("/Spectrum/FFTYGrid"),
@@ -245,6 +247,19 @@
       return false;
    }
 
+   long frequencygain;
+   if (!mFrequencyGain->GetValue().ToLong(&frequencygain)) {
+      wxMessageBox(_("The frequency gain must be an integer"));
+      return false;
+   }
+   if (frequencygain < 0) {
+      wxMessageBox(_("The frequency gain cannot be negative"));
+      return false;
+   }
+   if (frequencygain > 60) {
+      wxMessageBox(_("The frequency gain must be no more than 60 dB/dec"));
+      return false;
+   }
 #ifdef EXPERIMENTAL_FIND_NOTES
    long findNotesMinA;
    if (!mFindNotesMinA->GetValue().ToLong(&findNotesMinA)) {


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to