Update of /cvsroot/audacity/audacity-src/src/effects
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv32120/effects
Modified Files:
Tag: Audacity_UmixIt
Equalization.cpp Equalization.h
Log Message:
UI changes: About box, ControlToolBar, EQ, and AdornedRulerPanel.
Index: Equalization.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/Equalization.cpp,v
retrieving revision 1.8.2.5.2.1
retrieving revision 1.8.2.5.2.2
diff -u -d -r1.8.2.5.2.1 -r1.8.2.5.2.2
--- Equalization.cpp 18 Apr 2007 01:34:53 -0000 1.8.2.5.2.1
+++ Equalization.cpp 20 Apr 2007 01:22:35 -0000 1.8.2.5.2.2
@@ -23,7 +23,6 @@
#include <wx/dcmemory.h>
#include <wx/intl.h>
#include <wx/string.h>
-#include <wx/radiobox.h>
#include "Equalization.h"
#include "../Envelope.h"
@@ -555,12 +554,26 @@
// WDR: event table for EqualizationDialog
+#define ID_TEXT 10000
+#define ID_FILTERPANEL 10001
+#if (AUDACITY_BRANDING != BRAND_THINKLABS)
+ #define ID_CLEAR 10002
+ #define ID_LOADCURVE 10003
+#else
+ #define ID_RADIOBOX_CURVE 10005
+#endif
+#define ID_BUTTON_PREVIEW 10004
+
BEGIN_EVENT_TABLE(EqualizationDialog,wxDialog)
EVT_BUTTON( wxID_OK, EqualizationDialog::OnOk )
EVT_BUTTON( wxID_CANCEL, EqualizationDialog::OnCancel )
EVT_SIZE( EqualizationDialog::OnSize )
- EVT_BUTTON( ID_CLEAR, EqualizationDialog::OnClear )
- EVT_BUTTON( ID_LOADCURVE, EqualizationDialog::OnLoadCurve )
+ #if (AUDACITY_BRANDING != BRAND_THINKLABS)
+ EVT_BUTTON( ID_CLEAR, EqualizationDialog::OnClear )
+ EVT_BUTTON( ID_LOADCURVE, EqualizationDialog::OnLoadCurve )
+ #else
+ EVT_RADIOBOX(ID_RADIOBOX_CURVE, EqualizationDialog::OnRadioBoxCurve)
+ #endif
EVT_BUTTON(ID_BUTTON_PREVIEW, EqualizationDialog::OnPreview)
END_EVENT_TABLE()
@@ -591,6 +604,10 @@
mFilterFunc = filterFunc;
mWindowSize = windowSize;
+
+ #if (AUDACITY_BRANDING == BRAND_THINKLABS)
+ this->setCurve(mEnvelope, predefined->GetSelection());
+ #endif
}
bool EqualizationDialog::Validate()
@@ -693,6 +710,19 @@
mPanel->Refresh(false);
}
+#if (AUDACITY_BRANDING == BRAND_THINKLABS) // custom curves for Thinklabs
+ void EqualizationDialog::OnRadioBoxCurve( wxCommandEvent &event )
+ {
+ int nSelection = predefined->GetSelection();
+ wxCommandEvent dummyEvent;
+ if (nSelection == EffectEqualization::nCurveTypes)
+ // "Clear" is the last radio, but not a curve.
+ this->OnClear(dummyEvent);
+ else
+ // It's a curve.
+ this->OnLoadCurve(dummyEvent);
+ }
+#endif
void EqualizationDialog::setCurve(Envelope *env, int currentCurve)
{
@@ -733,7 +763,7 @@
wxStaticText *item1 =
new wxStaticText(parent, -1,
#if (AUDACITY_BRANDING == BRAND_THINKLABS) // custom
curves for Thinklabs
- _("Equalization,
by Mitch Golden, Vaughan Johnson, && Clive Smith"),
+ _("Equalization,
by Mitch Golden, Vaughan Johnson, && Clive Smith\n\nClick points and drag on
the curve to customize."),
#else
_("Equalization,
by Mitch Golden && Vaughan Johnson"),
#endif
@@ -749,37 +779,54 @@
item0->Add( item2, 1, wxGROW|wxALIGN_CENTRE|wxALL, 4);
- wxBoxSizer *item3 = new wxBoxSizer( wxHORIZONTAL );
-
- wxButton *item4a = new wxButton( parent, ID_LOADCURVE, _("Load Predefined
Curve"),
- wxDefaultPosition, wxDefaultSize, 0 );
- item3->Add( item4a, 0, wxALIGN_CENTRE|wxLEFT, 4);
+ #if (AUDACITY_BRANDING != BRAND_THINKLABS)
+ wxBoxSizer *item3 = new wxBoxSizer( wxHORIZONTAL );
- item3->Add(80, 4); // horizontal spacer
+ wxButton *item4a = new wxButton( parent, ID_LOADCURVE, _("Load
Predefined Curve"),
+ wxDefaultPosition, wxDefaultSize, 0 );
+ item3->Add( item4a, 0, wxALIGN_CENTRE|wxLEFT, 4);
- wxButton *item4b = new wxButton( parent, ID_CLEAR, _("Clear"),
- wxDefaultPosition, wxDefaultSize, 0 );
- item3->Add( item4b, 0, wxALIGN_CENTRE|wxRIGHT, 4);
+ item3->Add(80, 4); // horizontal spacer
- item0->Add( item3, 0, wxALIGN_CENTER | wxALL, 0);
+ wxButton *item4b = new wxButton( parent, ID_CLEAR, _("Clear"),
+ wxDefaultPosition, wxDefaultSize, 0 );
+ item3->Add( item4b, 0, wxALIGN_CENTRE|wxRIGHT, 4);
+ item0->Add( item3, 0, wxALIGN_CENTER | wxALL, 0);
+ #endif
// predefined curves
wxBoxSizer *item9 = new wxBoxSizer( wxVERTICAL );
- wxString formats[EffectEqualization::nCurveTypes];
+ #if (AUDACITY_BRANDING == BRAND_THINKLABS)
+ wxString formats[EffectEqualization::nCurveTypes + 1]; // Clear is now a
radio button, but not a curve.
+ formats[EffectEqualization::nCurveTypes] = _("Clear");
+ #else
+ wxString formats[EffectEqualization::nCurveTypes];
+ #endif
int i;
for(i=0;i<EffectEqualization::nCurveTypes;i++) {
formats[i] = EffectEqualization::curveNames[i];
}
- wxRadioBox *predefined = new wxRadioBox(parent, -1, _("Predefined:"),
- wxDefaultPosition, wxDefaultSize,
- EffectEqualization::nCurveTypes,
- formats,
- 3,
- wxRA_SPECIFY_COLS);
+ wxRadioBox *predefined =
+ new wxRadioBox(parent,
+ #if (AUDACITY_BRANDING == BRAND_THINKLABS)
+ ID_RADIOBOX_CURVE,
+ #else
+ -1,
+ #endif
+ _("Predefined:"),
+ wxDefaultPosition, wxDefaultSize,
+ #if (AUDACITY_BRANDING == BRAND_THINKLABS)
+ EffectEqualization::nCurveTypes + 1,
+ #else
+ EffectEqualization::nCurveTypes,
+ #endif
+ formats,
+ 3,
+ wxRA_SPECIFY_COLS);
((EqualizationDialog *)parent)->predefined = predefined;
Index: Equalization.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/Equalization.h,v
retrieving revision 1.4.6.1
retrieving revision 1.4.6.2
diff -u -d -r1.4.6.1 -r1.4.6.2
--- Equalization.h 18 Apr 2007 01:34:53 -0000 1.4.6.1
+++ Equalization.h 20 Apr 2007 01:22:35 -0000 1.4.6.2
@@ -121,12 +121,6 @@
// Declare window functions
-#define ID_TEXT 10000
-#define ID_FILTERPANEL 10001
-#define ID_CLEAR 10002
-#define ID_LOADCURVE 10003
-#define ID_BUTTON_PREVIEW 10004
-
wxSizer *MakeEqualizationDialog( double loFreq, double hiFreq,
Envelope *env,
EqualizationPanel **pan,
@@ -164,6 +158,9 @@
void OnCancel( wxCommandEvent &event );
void OnLoadCurve( wxCommandEvent &event );
void OnSize( wxSizeEvent &event );
+ #if (AUDACITY_BRANDING == BRAND_THINKLABS)
+ void OnRadioBoxCurve( wxCommandEvent &event );
+ #endif
void setCurve(Envelope *env, int currentCurve);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs