forked from mia/Aegisub
Use wxLaunchDefaultBrowser instead of custom-built solution for opening URL's
Originally committed to SVN as r1064.
This commit is contained in:
parent
50c14d9067
commit
07cc2d8042
1 changed files with 3 additions and 6 deletions
|
@ -41,6 +41,7 @@
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
#include <wx/msgdlg.h>
|
#include <wx/msgdlg.h>
|
||||||
#include <wx/mimetype.h>
|
#include <wx/mimetype.h>
|
||||||
|
#include <wx/utils.h>
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "frame_main.h"
|
#include "frame_main.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
@ -114,7 +115,7 @@ bool AegisubApp::OnInit() {
|
||||||
AssExportFilterChain::PrepareFilters();
|
AssExportFilterChain::PrepareFilters();
|
||||||
|
|
||||||
// Set association
|
// Set association
|
||||||
#ifndef DEBUG
|
#ifndef _DEBUG
|
||||||
RegistryAssociate();
|
RegistryAssociate();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -370,11 +371,7 @@ void AegisubApp::GetFolderName () {
|
||||||
////////////
|
////////////
|
||||||
// Open URL
|
// Open URL
|
||||||
void AegisubApp::OpenURL(wxString url) {
|
void AegisubApp::OpenURL(wxString url) {
|
||||||
wxFileType *type = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("html"));
|
wxLaunchDefaultBrowser(url, wxBROWSER_NEW_WINDOW);
|
||||||
if (type) {
|
|
||||||
wxString command = type->GetOpenCommand(url);
|
|
||||||
if (!command.empty()) wxExecute(command);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue