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

Modified Files:
        BatchCommandDialog.cpp BatchProcessDialog.cpp LabelDialog.cpp 
        LangChoice.cpp Menus.cpp SmartRecordDialog.cpp Tags.cpp 
        TimeDialog.cpp 
Log Message:
Layout 'effects' OK/Cancel buttons consistently on all platforms.

Index: BatchProcessDialog.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/BatchProcessDialog.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- BatchProcessDialog.cpp      15 Apr 2007 02:23:41 -0000      1.21
+++ BatchProcessDialog.cpp      29 Jul 2007 19:52:04 -0000      1.22
@@ -468,7 +468,7 @@
    }
    S.EndHorizontalLay();
 
-   GetSizer()->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxALIGN_RIGHT | 
wxBOTTOM | wxRIGHT, 10);
+   S.AddStandardButtons();
 
    return;
 }

Index: SmartRecordDialog.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/SmartRecordDialog.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- SmartRecordDialog.cpp       31 May 2007 22:20:25 -0000      1.12
+++ SmartRecordDialog.cpp       29 Jul 2007 19:52:04 -0000      1.13
@@ -313,10 +313,7 @@
    }
    S.EndVerticalLay();
    
-   GetSizer()->Add(CreateStdDialogButtonSizer(wxOK | wxCANCEL),
-                   0,
-                   wxCENTER | wxBOTTOM,
-                   10);
+   S.AddStandardButtons();
 
    Layout();
    Fit();

Index: BatchCommandDialog.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/BatchCommandDialog.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- BatchCommandDialog.cpp      9 May 2007 06:09:16 -0000       1.11
+++ BatchCommandDialog.cpp      29 Jul 2007 19:52:04 -0000      1.12
@@ -100,7 +100,7 @@
    }
    S.EndVerticalLay();
 
-   GetSizer()->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxALIGN_RIGHT | 
wxBOTTOM, 10);
+   S.AddStandardButtons();
 
    for(int i=0;i<99;i++)
    {

Index: Tags.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Tags.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- Tags.cpp    31 May 2007 02:51:59 -0000      1.48
+++ Tags.cpp    29 Jul 2007 19:52:04 -0000      1.49
@@ -734,8 +734,6 @@
 //
 
 enum {
-   CancelID = wxID_CANCEL,
-   CloseID = wxID_OK,
    StaticTextID = 10000,
    TitleTextID,
    ArtistTextID,
@@ -763,8 +761,8 @@
    EVT_TEXT(CommentsTextID, TagsEditor::OnChange)
    EVT_CHOICE(GenreID, TagsEditor::OnChange)
    EVT_RADIOBOX(FormatID, TagsEditor::OnChange)
-   EVT_BUTTON(CancelID, TagsEditor::OnCancel)
-   EVT_BUTTON(CloseID, TagsEditor::OnClose)
+   EVT_BUTTON(wxID_CANCEL, TagsEditor::OnCancel)
+   EVT_BUTTON(wxID_OK, TagsEditor::OnClose)
    EVT_BUTTON(MoreID, TagsEditor::OnMore)
    EVT_BUTTON(FewerID, TagsEditor::OnFewer)
    EVT_BUTTON(ClearID, TagsEditor::OnClear)
@@ -1376,31 +1374,10 @@
 
       /***/
    
-   hSizer = new wxBoxSizer(wxHORIZONTAL);
-
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-   wxButton *cancel =
-       new wxButton(parent, CancelID, _("&Cancel"), wxDefaultPosition,
-                    wxDefaultSize, 0);
-   hSizer->Add(cancel, 0, wxALIGN_CENTRE | wxALL, 3);
-   wxButton *close =
-       new wxButton(parent, CloseID, _("&Done"), wxDefaultPosition,
-                    wxDefaultSize, 0);
-   hSizer->Add(close, 0, wxALIGN_CENTRE | wxALL, 3);
-#else
-   wxButton *close =
-       new wxButton(parent, CloseID, _("&Done"), wxDefaultPosition,
-                    wxDefaultSize, 0);
-   hSizer->Add(close, 0, wxALIGN_CENTRE | wxALL, 3);
-   wxButton *cancel =
-       new wxButton(parent, CancelID, _("&Cancel"), wxDefaultPosition,
-                    wxDefaultSize, 0);
-   hSizer->Add(cancel, 0, wxALIGN_CENTRE | wxALL, 3);
-#endif
-
-   mainSizer->Add(hSizer, 0, wxALIGN_RIGHT | wxALL, 7);
-
-   mainSizer->Add(1, 5, wxEXPAND);
+   mainSizer->Add(CreateStdButtonSizer(parent, eCancelButton|eOkButton), 0, 
wxEXPAND);
+   wxButton * OKButton;
+   OKButton = (wxButton *)wxWindow::FindWindowById(wxID_OK, this);
+   OKButton->SetLabel(_("&Done"));
 
    parent->SetSizer(mainSizer);
    parent->Layout();

Index: LabelDialog.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LabelDialog.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- LabelDialog.cpp     3 Jun 2007 05:18:23 -0000       1.13
+++ LabelDialog.cpp     29 Jul 2007 19:52:04 -0000      1.14
@@ -72,9 +72,7 @@
    ID_INSERTB,
    ID_REMOVE,
    ID_IMPORT,
-   ID_EXPORT,
-   ID_OK,
-   ID_CANCEL
+   ID_EXPORT
 };
 
 BEGIN_EVENT_TABLE(LabelDialog, wxDialog)
@@ -85,8 +83,8 @@
    EVT_BUTTON(ID_REMOVE,  LabelDialog::OnRemove)
    EVT_BUTTON(ID_IMPORT,  LabelDialog::OnImport)
    EVT_BUTTON(ID_EXPORT,  LabelDialog::OnExport)
-   EVT_BUTTON(ID_OK,      LabelDialog::OnOK)
-   EVT_BUTTON(ID_CANCEL,  LabelDialog::OnCancel)
+   EVT_BUTTON(wxID_OK,      LabelDialog::OnOK)
+   EVT_BUTTON(wxID_CANCEL,  LabelDialog::OnCancel)
    EVT_COMMAND(wxID_ANY, EVT_TIMETEXTCTRL_UPDATED, LabelDialog::OnUpdate)
 END_EVENT_TABLE()
 
@@ -131,15 +129,7 @@
    vs->Add(hs, 0, wxEXPAND | wxCENTER | wxALL, 5);
 
    // Create the exit buttons
-   hs = new wxBoxSizer(wxHORIZONTAL);
-#if defined(__WXGTK20__) || defined(__WXMAC__)
-   hs->Add(new wxButton(this, ID_CANCEL, _("&Cancel")), 1, wxCENTER | wxALL, 
5);
-   hs->Add(new wxButton(this, wxID_OK, _("&OK")), 1, wxCENTER | wxALL, 5);
-#else
-   hs->Add(new wxButton(this, wxID_OK, _("&OK")), 1, wxCENTER | wxALL, 5);
-   hs->Add(new wxButton(this, wxID_CANCEL, _("&Cancel")), 1, wxCENTER | wxALL, 
5);
-#endif
-   vs->Add(hs, 0, wxALIGN_RIGHT | wxALL, 5);
+   vs->Add(CreateStdButtonSizer(this, eCancelButton|eOkButton), 0, wxEXPAND);
 
    // Make it so
    SetSizer(vs);

Index: LangChoice.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/LangChoice.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- LangChoice.cpp      15 Jun 2006 14:26:13 -0000      1.6
+++ LangChoice.cpp      29 Jul 2007 19:52:04 -0000      1.7
@@ -27,6 +27,7 @@
 
 #include "LangChoice.h"
 #include "Languages.h"
+#include "ShuttleGui.h"
 
 class LangChoiceDialog:public wxDialog {
 public:
@@ -100,9 +101,7 @@
    mainSizer->Add(hSizer,
                   0, wxALL, 8);
 
-   wxButton *ok = new wxButton(this, wxID_OK, _("OK"));
-   ok->SetDefault();
-   mainSizer->Add(ok, 0, wxALIGN_CENTRE | wxALL, 8);
+   mainSizer->Add(CreateStdButtonSizer(this, eOkButton), 0, wxEXPAND);
 
    SetAutoLayout(true);
    SetSizer(mainSizer);

Index: TimeDialog.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TimeDialog.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- TimeDialog.cpp      22 Jul 2006 22:52:49 -0000      1.3
+++ TimeDialog.cpp      29 Jul 2007 19:52:07 -0000      1.4
@@ -67,10 +67,7 @@
       S.EndStatic();
    }
    S.EndVerticalLay();
-   GetSizer()->Add(CreateButtonSizer(wxOK | wxCANCEL),
-                   0,
-                   wxCENTER | wxBOTTOM,
-                   10);
+   S.AddStandardButtons();
 
    TransferDataToWindow();
 

Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.333
retrieving revision 1.334
diff -u -d -r1.333 -r1.334
--- Menus.cpp   29 Jul 2007 02:15:36 -0000      1.333
+++ Menus.cpp   29 Jul 2007 19:52:04 -0000      1.334
@@ -4273,11 +4273,7 @@
    }
    S.EndHorizontalLay();
    
-   S.StartHorizontalLay(wxALIGN_RIGHT, false);
-   {
-      S.Id(wxID_OK).AddButton(wxT("OK"));
-   }
-   S.EndHorizontalLay();
+   S.AddStandardButtons(eOkButton);
 
    dlg.Center();
    dlg.ShowModal();


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