Update of /cvsroot/audacity/audacity-src/src/effects/nyquist
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv22303/effects/nyquist

Modified Files:
        Nyquist.cpp 
Log Message:
Layout 'effects' OK/Cancel buttons consistently on all platforms (I hope!).  
ShuttleGUI changes by Leland.

Index: Nyquist.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/nyquist/Nyquist.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- Nyquist.cpp 30 Jun 2007 20:50:39 -0000      1.56
+++ Nyquist.cpp 29 Jul 2007 11:02:35 -0000      1.57
@@ -52,6 +52,7 @@
 #include "../../AudacityApp.h"
 #include "../../LabelTrack.h"
 #include "../../Internat.h"
+#include "../../ShuttleGui.h"
 
 #include "Nyquist.h"
 
@@ -326,7 +327,7 @@
       if (result == wxID_CANCEL)
          return false;
 
-      if (result == wxID_MORE)
+      if (result == eDebugID)
          mDebug = true;
       else
          mDebug = false;
@@ -381,7 +382,7 @@
    if (result == wxID_CANCEL)
       return false;
    
-   if (result == wxID_MORE)
+   if (result == eDebugID)
       mDebug = true;
    else
       mDebug = false;
@@ -713,7 +714,7 @@
 BEGIN_EVENT_TABLE(NyquistDialog, wxDialog)
    EVT_BUTTON(wxID_OK, NyquistDialog::OnOk)
    EVT_BUTTON(wxID_CANCEL, NyquistDialog::OnCancel)
-   EVT_BUTTON(wxID_MORE, NyquistDialog::OnDebug)
+   EVT_BUTTON(eDebugID, NyquistDialog::OnDebug)
    EVT_COMMAND_RANGE(ID_NYQ_SLIDER, ID_NYQ_SLIDER+99,
                      wxEVT_COMMAND_SLIDER_UPDATED, NyquistDialog::OnSlider)
    EVT_COMMAND_RANGE(ID_NYQ_TEXT, ID_NYQ_TEXT+99,
@@ -732,8 +733,6 @@
    mInHandler = true; // prevents race condition on MSW
 
    wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
-   wxBoxSizer *hSizer;
-   wxButton   *button;
 
    if (info.Length() > 0) {
       wxControl  *item;
@@ -820,19 +819,7 @@
    }
    mainSizer->Add(grid, 0, wxALIGN_CENTRE | wxALL, 5);
 
-   hSizer = new wxBoxSizer(wxHORIZONTAL);
-
-   button = new wxButton(this, wxID_CANCEL, _("&Cancel"));
-   hSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);
-
-   button = new wxButton(this, wxID_MORE, _("&Debug"));
-   hSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);
-
-   button = new wxButton(this, wxID_OK, _("&OK"));
-   button->SetDefault();
-   hSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);
-
-   mainSizer->Add(hSizer, 0, wxALIGN_CENTRE | wxALL, 5);
+   mainSizer->Add(CreateStdButtonSizer(this, 
eDebugButton|eCancelButton|eOkButton), 0, wxEXPAND);
 
    mInHandler = false;
 
@@ -955,7 +942,7 @@
 {
    // Transfer data
 
-   EndModal(wxID_MORE);
+   EndModal(eDebugID);
 }
 
 /**********************************************************/
@@ -963,7 +950,7 @@
 BEGIN_EVENT_TABLE(NyquistInputDialog, wxDialog)
    EVT_BUTTON(wxID_OK, NyquistInputDialog::OnOk)
    EVT_BUTTON(wxID_CANCEL, NyquistInputDialog::OnCancel)
-   EVT_BUTTON(wxID_MORE, NyquistInputDialog::OnDebug)
+   EVT_BUTTON(eDebugID, NyquistInputDialog::OnDebug)
 END_EVENT_TABLE()
 
 NyquistInputDialog::NyquistInputDialog(wxWindow * parent, wxWindowID id,
@@ -986,20 +973,8 @@
                                  wxTE_MULTILINE);
    mainSizer->Add(mCommandText, 0, wxALIGN_LEFT | wxALL, 10);
 
-   hSizer = new wxBoxSizer(wxHORIZONTAL);
-
-   button = new wxButton(this, wxID_CANCEL, _("&Cancel"));
-   hSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);
-
-   button = new wxButton(this, wxID_MORE, _("&Debug"));
-   hSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);
-
-   button = new wxButton(this, wxID_OK, _("&OK"));
-   button->SetDefault();
-   hSizer->Add(button, 0, wxALIGN_CENTRE | wxALL, 5);
-
-   mainSizer->Add(hSizer, 0, wxALIGN_CENTRE |
-                  wxLEFT | wxBOTTOM | wxRIGHT, 5);
+   // Debug, OK, & Cancel buttons
+   mainSizer->Add(CreateStdButtonSizer(this, 
eDebugButton|eCancelButton|eOkButton), 0, wxEXPAND);
 
    SetAutoLayout(true);
    SetSizer(mainSizer);
@@ -1028,7 +1003,7 @@
 {
    // Transfer data
 
-   EndModal(wxID_MORE);
+   EndModal(eDebugID);
 }
 
 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to