dolphin/Source/Core/DolphinWX/Src/WxUtils.cpp
nakeee ab93b00385 Ported wxutils from soap branch (Should make launch and explore work in Linux and osx as well) please test on windows.
Fixed a compile bug and a small bug in the cdutils(thanks lp).



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2420 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-02-24 19:31:32 +00:00

29 lines
566 B
C++

#include "Common.h"
#include <wx/wx.h>
#include <wx/string.h>
namespace WxUtils {
// Launch a file according to its mime type
void Launch(const char *filename)
{
if (! ::wxLaunchDefaultBrowser(wxString::FromAscii(filename))) {
// WARN_LOG
}
}
// Launch an file explorer window on a certain path
void Explore(const char *path)
{
wxString wxPath = wxString::FromAscii(path);
// Default to file
if (! wxPath.Contains(wxT("://"))) {
wxPath = wxT("file://") + wxPath;
}
if (! ::wxLaunchDefaultBrowser(wxPath)) {
// WARN_LOG
}
}
}