1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-13 14:13:32 +02:00

Fix TAB key navigation on Mac for all dialogs (not only for panels)

This commit is contained in:
Paul Licameli
2016-07-10 17:10:50 -04:00
parent e0f6ed9972
commit 84c0337aba
79 changed files with 206 additions and 207 deletions

View File

@@ -736,14 +736,14 @@ bool Importer::Import(const wxString &fName,
// ImportStreamDialog
//-------------------------------------------------------------------------
BEGIN_EVENT_TABLE( ImportStreamDialog,wxDialog )
BEGIN_EVENT_TABLE( ImportStreamDialog, wxDialogWrapper )
EVT_BUTTON( wxID_OK, ImportStreamDialog::OnOk )
EVT_BUTTON( wxID_CANCEL, ImportStreamDialog::OnCancel )
END_EVENT_TABLE()
ImportStreamDialog::ImportStreamDialog( ImportFileHandle *_mFile, wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &position, const wxSize& size, long style ):
wxDialog( parent, id, title, position, size, style | wxRESIZE_BORDER )
wxDialogWrapper( parent, id, title, position, size, style | wxRESIZE_BORDER )
{
SetName(GetTitle());

View File

@@ -15,10 +15,11 @@
#include <vector>
#include <wx/arrstr.h>
#include <wx/string.h>
#include <wx/dialog.h>
#include <wx/listbox.h>
#include <wx/tokenzr.h>
#include "../widgets/wxPanelWrapper.h"
class Tags;
class TrackFactory;
class Track;
@@ -157,7 +158,7 @@ private:
// ImportStreamDialog
//----------------------------------------------------------------------------
class ImportStreamDialog final : public wxDialog
class ImportStreamDialog final : public wxDialogWrapper
{
public:
// constructors and destructors

View File

@@ -242,7 +242,7 @@ static wxString AskCopyOrEdit()
// check the current preferences for whether or not we should ask the user about this.
if (oldAskPref) {
wxString newCopyPref = wxT("copy");
wxDialog dialog(NULL, -1, wxString(_("Warning")));
wxDialogWrapper dialog(nullptr, -1, wxString(_("Warning")));
dialog.SetName(dialog.GetTitle());
wxBoxSizer *vbox;

View File

@@ -57,7 +57,7 @@ and sample size to help you importing data of an unknown format.
#include "sndfile.h"
class ImportRawDialog final : public wxDialog {
class ImportRawDialog final : public wxDialogWrapper {
public:
ImportRawDialog(wxWindow * parent,
@@ -293,7 +293,7 @@ enum {
PlayID
};
BEGIN_EVENT_TABLE(ImportRawDialog, wxDialog)
BEGIN_EVENT_TABLE(ImportRawDialog, wxDialogWrapper)
EVT_BUTTON(wxID_OK, ImportRawDialog::OnOK)
EVT_BUTTON(wxID_CANCEL, ImportRawDialog::OnCancel)
EVT_BUTTON(PlayID, ImportRawDialog::OnPlay)
@@ -303,7 +303,7 @@ END_EVENT_TABLE()
ImportRawDialog::ImportRawDialog(wxWindow * parent,
int encoding, int channels,
int offset, double rate)
: wxDialog(parent, wxID_ANY, _("Import Raw Data"),
: wxDialogWrapper(parent, wxID_ANY, _("Import Raw Data"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
mEncoding(encoding),