mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-18 16:41:14 +02:00
Additional changes for wx3
These are mostly for getting it to build on Linux, but I've also created new configs in Visual Studio to make it easier to switch between wx2 and wx3. For Linux, you have to tell configure where to find the wx3 version of the wx-config script and, since some distros build wxWidgets v3 against GTK+ v3, you may also need to enable gtk3 with something like: ./configure --enable-gtk3 WX_CONFIG=/usr/bin/wx-config-3.0 On Windows, I've added "wx3-Debug" and "wx3-Release" to the existing "Debug" and "Release" configurations. They depend on you having your WXWIN environment variable pointing to your wx2 directory and a new WXWIN3 environment variable pointing to your wx3 directory. For instance, I have: WXWIN=C:\Users\yam\Documents\wxWidgets-2.8.13 WXWIN3=C:\Users\yam\Documents\wxWidgets-3.0.2 Doing this allows you to switch freely among the 4 configurations without having to get out of Visual Studio and monkey around with the environment. The project files will also add the location of the wxWidgets DLLs to the PATH when running Audacity from within Visual Studio. They add %WXWIN%\lib\vc_dll or %WXWIN3%\lib\vc_dll at the beginning of the PATH variable as appropriate. I expect that once we convert to wx3 we'll just drop back down to the normal Debug and Release configurations, but this should make switching between wx2 and wx3 much easier during the transition.
This commit is contained in:
@@ -16,6 +16,24 @@ custom controls.
|
||||
|
||||
#include "FileDialog.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: common/fldlgcmn.cpp
|
||||
// Purpose: wxFileDialog common functions
|
||||
// Author: John Labenski
|
||||
// Modified by: Leland Lucius
|
||||
// Created: 14.06.03 (extracted from src/*/filedlg.cpp)
|
||||
// RCS-ID: $Id: FileDialog.cpp,v 1.8 2008-10-05 14:48:59 richardash1981 Exp $
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
//
|
||||
// Modified for Audacity to support an additional button on Save dialogs
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DEFINE_EVENT_TYPE(EVT_FILEDIALOG_SELECTION_CHANGED);
|
||||
DEFINE_EVENT_TYPE(EVT_FILEDIALOG_FILTER_CHANGED);
|
||||
DEFINE_EVENT_TYPE(EVT_FILEDIALOG_ADD_CONTROLS);
|
||||
|
||||
void FileDialog::EnableButton(wxString label, fdCallback cb, void *data)
|
||||
{
|
||||
m_buttonlabel = label;
|
||||
@@ -31,20 +49,6 @@ void FileDialog::ClickButton(int index)
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: common/fldlgcmn.cpp
|
||||
// Purpose: wxFileDialog common functions
|
||||
// Author: John Labenski
|
||||
// Modified by: Leland Lucius
|
||||
// Created: 14.06.03 (extracted from src/*/filedlg.cpp)
|
||||
// RCS-ID: $Id: FileDialog.cpp,v 1.8 2008-10-05 14:48:59 richardash1981 Exp $
|
||||
// Copyright: (c) Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
//
|
||||
// Modified for Audacity to support an additional button on Save dialogs
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// FileDialog convenience functions
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -55,8 +59,7 @@ wxString FileSelector(const wxString & title,
|
||||
const wxString & defaultExtension,
|
||||
const wxString & filter,
|
||||
int flags,
|
||||
wxWindow *parent,
|
||||
wxString label, fdCallback cb, void *cbdata)
|
||||
wxWindow *parent)
|
||||
{
|
||||
// The defaultExtension, if non-empty, is
|
||||
// appended to the filename if the user fails to type an extension. The new
|
||||
@@ -79,12 +82,6 @@ wxString FileSelector(const wxString & title,
|
||||
defaultFileName, filter2,
|
||||
flags);
|
||||
|
||||
// Enable the extra button if desired
|
||||
if ((flags & wxFD_SAVE) && (cb != NULL))
|
||||
{
|
||||
fileDialog.EnableButton(label, cb, cbdata);
|
||||
}
|
||||
|
||||
// if filter is of form "All files (*)|*|..." set correct filter index
|
||||
if (!defaultExtension.empty() && filter2.find(wxT('|')) != wxString::npos)
|
||||
{
|
||||
|
Reference in New Issue
Block a user