Update of /cvsroot/audacity/audacity-src/src/export
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv3293/export

Modified Files:
        Export.cpp ExportCL.cpp ExportFLAC.cpp ExportMP2.cpp 
        ExportMP3.cpp ExportMultiple.cpp ExportOGG.cpp ExportPCM.cpp 
Log Message:
Layout 'effects' OK/Cancel buttons consistently on all platforms.

Index: Export.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/Export.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- Export.cpp  17 May 2007 03:24:27 -0000      1.59
+++ Export.cpp  29 Jul 2007 19:52:09 -0000      1.60
@@ -968,16 +968,7 @@
    
    vertSizer->Add( horSizer, 0, wxALIGN_CENTRE | wxALL, 5 );
 
-   horSizer = new wxBoxSizer( wxHORIZONTAL );
-   
-   wxButton *cancel = new wxButton( this, wxID_CANCEL, _( "&Cancel" ) );
-   horSizer->Add( cancel, 0, wxALIGN_CENTRE | wxALL, 5 );
-
-   wxButton *ok = new wxButton( this, wxID_OK, _( "&OK" ) );
-   ok->SetDefault();
-   horSizer->Add( ok, 0, wxALIGN_CENTRE | wxALL, 5 );
-
-   vertSizer->Add( horSizer, 0, wxALIGN_CENTRE | wxALL, 5 );
+   vertSizer->Add( CreateStdButtonSizer(this, eCancelButton|eOkButton), 0, 
wxEXPAND );
 
    SetAutoLayout( true );
    SetSizer( vertSizer );

Index: ExportOGG.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportOGG.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- ExportOGG.cpp       23 Jul 2007 21:28:02 -0000      1.33
+++ ExportOGG.cpp       29 Jul 2007 19:52:09 -0000      1.34
@@ -90,17 +90,9 @@
       S.EndStatic();
    }
    S.EndHorizontalLay();
-   S.StartHorizontalLay(wxALIGN_CENTER, false);
-   {
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-      S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-#else
-      S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-#endif
-   }
-   GetSizer()->AddSpacer(5);
+
+   S.AddStandardButtons();
+
    Layout();
    Fit();
    SetMinSize(GetSize());

Index: ExportMP3.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportMP3.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- ExportMP3.cpp       31 May 2007 03:01:05 -0000      1.70
+++ ExportMP3.cpp       29 Jul 2007 19:52:09 -0000      1.71
@@ -346,17 +346,9 @@
       S.EndStatic();
    }
    S.EndHorizontalLay();
-   S.StartHorizontalLay(wxALIGN_CENTER, false);
-   {
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-      S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-#else
-      S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-#endif
-   }
-   GetSizer()->AddSpacer(5);
+
+   S.AddStandardButtons();
+
    Layout();
    Fit();
    SetMinSize(GetSize());
@@ -527,21 +519,11 @@
             S.Id(ID_DLOAD).AddButton(_("Download..."), wxALIGN_RIGHT);
          }
          S.EndMultiColumn();
-         S.SetBorder(5);
-         S.StartHorizontalLay(wxALIGN_BOTTOM | wxALIGN_CENTER, false);
-         {
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-            S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-            S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-#else
-            S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-            S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-#endif
-         }
-         S.EndHorizontalLay();
+
+         S.AddStandardButtons();
       }
       S.EndVerticalLay();
-      GetSizer()->AddSpacer(5);
+
       Layout();
       Fit();
       SetMinSize(GetSize());
@@ -1923,22 +1905,10 @@
       }
       S.EndStatic();
 
-      S.SetBorder(5);
-      S.StartHorizontalLay(wxALIGN_BOTTOM | wxALIGN_CENTER, false);
-      {
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-         S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-         S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-#else
-         S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-         S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-#endif
-      }
-      S.EndHorizontalLay();
+      S.AddStandardButtons();
    }
    S.EndVerticalLay();
 
-   d.GetSizer()->AddSpacer(5);
    d.Layout();
    d.Fit();
    d.SetMinSize(d.GetSize());

Index: ExportCL.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportCL.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- ExportCL.cpp        23 Jul 2007 21:01:09 -0000      1.20
+++ ExportCL.cpp        29 Jul 2007 19:52:09 -0000      1.21
@@ -89,17 +89,9 @@
       S.EndStatic();
    }
    S.EndHorizontalLay();
-   S.StartHorizontalLay(wxALIGN_CENTER, false);
-   {
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-      S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-#else
-      S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-#endif
-   }
-   GetSizer()->AddSpacer(5);
+
+   S.AddStandardButtons();
+
    Layout();
    Fit();
    SetMinSize(GetSize());

Index: ExportMP2.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportMP2.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ExportMP2.cpp       24 May 2007 10:09:42 -0000      1.11
+++ ExportMP2.cpp       29 Jul 2007 19:52:09 -0000      1.12
@@ -126,17 +126,9 @@
       S.EndStatic();
    }
    S.EndHorizontalLay();
-   S.StartHorizontalLay(wxALIGN_CENTER, false);
-   {
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-      S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-#else
-      S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-#endif
-   }
-   GetSizer()->AddSpacer(5);
+
+   S.AddStandardButtons();
+
    Layout();
    Fit();
    SetMinSize(GetSize());

Index: ExportPCM.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportPCM.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- ExportPCM.cpp       7 May 2007 03:55:27 -0000       1.33
+++ ExportPCM.cpp       29 Jul 2007 19:52:09 -0000      1.34
@@ -111,7 +111,7 @@
 /// 
 ExportPCMOptions::ExportPCMOptions(wxWindow *parent)
 :  wxDialog(NULL, wxID_ANY,
-            wxString(_("Specify WAV Options")),
+            wxString(_("Specify PCM Options")),
             wxDefaultPosition, wxDefaultSize,
             wxDEFAULT_DIALOG_STYLE | wxSTAY_ON_TOP)
 {
@@ -156,7 +156,6 @@
 
    PopulateOrExchange(S);
 
-   GetSizer()->AddSpacer(5);
    Layout();
    Fit();
    Center();
@@ -192,17 +191,9 @@
       S.EndStatic();
    }
    S.EndHorizontalLay();
-   S.StartHorizontalLay(wxALIGN_CENTER, false);
-   {
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-      mOk = S.Id(wxID_OK).AddButton(_("&OK"));
-#else
-      mOk = S.Id(wxID_OK).AddButton(_("&OK"));
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-#endif
-      mOk->SetDefault();
-   }
+
+   S.AddStandardButtons();
+   mOk = (wxButton *)wxWindow::FindWindowById(wxID_OK, this);
 
    ValidateChoices();
 

Index: ExportFLAC.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportFLAC.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ExportFLAC.cpp      1 Jun 2007 04:24:04 -0000       1.14
+++ ExportFLAC.cpp      29 Jul 2007 19:52:09 -0000      1.15
@@ -108,17 +108,9 @@
       S.EndStatic();
    }
    S.EndHorizontalLay();
-   S.StartHorizontalLay(wxALIGN_CENTER, false);
-   {
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-      S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-#else
-      S.Id(wxID_OK).AddButton(_("&OK"))->SetDefault();
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-#endif
-   }
-   GetSizer()->AddSpacer(5);
+
+   S.AddStandardButtons();
+
    Layout();
    Fit();
    SetMinSize(GetSize());

Index: ExportMultiple.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/export/ExportMultiple.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- ExportMultiple.cpp  3 Jun 2007 19:56:48 -0000       1.29
+++ ExportMultiple.cpp  29 Jul 2007 19:52:09 -0000      1.30
@@ -100,7 +100,6 @@
    PopulateOrExchange(S);
    mInitialized = true;
 
-   GetSizer()->AddSpacer(5);
    Layout();
    Fit();
    SetMinSize(GetSize());
@@ -295,19 +294,11 @@
          .AddCheckBox(_("Overwrite existing files"), wxT("true"));
    }
    S.EndHorizontalLay();
-      
-   S.StartHorizontalLay(wxALIGN_CENTER, false);
-   {
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-      mExport = S.Id(wxID_OK).AddButton(_("E&xport"));
-#else
-      mExport = S.Id(wxID_OK).AddButton(_("E&xport"));
-      S.Id(wxID_CANCEL).AddButton(_("&Cancel"));
-#endif
-      mExport->SetDefault();
-   }
-   S.EndHorizontalLay();
+
+   S.AddStandardButtons();
+   mExport = (wxButton *)wxWindow::FindWindowById(wxID_OK, this);
+   mExport->SetLabel(_("E&xport"));
+
 }
 
 void ExportMultiple::EnableControls()


-------------------------------------------------------------------------
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