mirror of https://github.com/PCSX2/pcsx2.git
wx: Fix `pxExplore` on macOS (#4989)
* wx: Fix `pxExplore` on macOS Trying to open file urls in a browser does not actually launch a file explorer in macOS * wx: Remove pxExplore/pxLaunch Was barely used
This commit is contained in:
parent
6cd8b34abb
commit
9c0582a103
|
@ -78,7 +78,7 @@ void Panels::DirPickerPanel::Explore_Click( wxCommandEvent &evt )
|
|||
path.Mkdir();
|
||||
}
|
||||
|
||||
pxExplore( path.ToString() );
|
||||
wxLaunchDefaultApplication(path.ToString());
|
||||
}
|
||||
|
||||
// There are two constructors. See the details for the 'label' parameter below for details.
|
||||
|
|
|
@ -650,33 +650,3 @@ wxString pxGetAppName()
|
|||
pxAssert(wxTheApp);
|
||||
return wxTheApp->GetAppName();
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Launches the specified file according to its mime type
|
||||
//
|
||||
void pxLaunch(const wxString& filename)
|
||||
{
|
||||
wxLaunchDefaultBrowser(filename);
|
||||
}
|
||||
|
||||
void pxLaunch(const char* filename)
|
||||
{
|
||||
pxLaunch(fromUTF8(filename));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Launches a file explorer window on the specified path. If the given path is not
|
||||
// a qualified URI (with a prefix:// ), file:// is automatically prepended. This
|
||||
// bypasses wxWidgets internal filename checking, which can end up launching things
|
||||
// through browser more often than desired.
|
||||
//
|
||||
void pxExplore(const wxString& path)
|
||||
{
|
||||
wxLaunchDefaultBrowser(!path.Contains(L"://") ? L"file://" + path : path);
|
||||
}
|
||||
|
||||
void pxExplore(const char* path)
|
||||
{
|
||||
pxExplore(fromUTF8(path));
|
||||
}
|
||||
|
|
|
@ -802,9 +802,3 @@ extern void pxSetToolTip(wxWindow& wind, const wxString& src);
|
|||
extern wxFont pxGetFixedFont(int ptsize = 8, wxFontWeight weight = wxFONTWEIGHT_NORMAL, bool underline = false);
|
||||
|
||||
extern pxDialogCreationFlags pxDialogFlags();
|
||||
|
||||
extern void pxExplore(const wxString& path);
|
||||
extern void pxExplore(const char* path);
|
||||
|
||||
extern void pxLaunch(const wxString& path);
|
||||
extern void pxLaunch(const char* path);
|
||||
|
|
Loading…
Reference in New Issue