FIX: direct jump to enable 'Windows Media Player'
Change-Id: If5eeb82162293cd20583f65aae1fa75f70aac25d
This commit is contained in:
parent
618aebfb79
commit
efd20d0a84
|
@ -1,5 +1,9 @@
|
||||||
#include "wxMediaCtrl2.h"
|
#include "wxMediaCtrl2.h"
|
||||||
#include "I18N.hpp"
|
#include "I18N.hpp"
|
||||||
|
#include "GUI_App.hpp"
|
||||||
|
#ifdef __WIN32__
|
||||||
|
#include <versionhelpers.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
wxMediaCtrl2::wxMediaCtrl2(wxWindow *parent)
|
wxMediaCtrl2::wxMediaCtrl2(wxWindow *parent)
|
||||||
{
|
{
|
||||||
|
@ -24,11 +28,15 @@ void wxMediaCtrl2::Load(wxURI url)
|
||||||
{
|
{
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
if (m_imp == nullptr) {
|
if (m_imp == nullptr) {
|
||||||
auto res = wxMessageBox(_L("Windows Media Player is required for this task! Shall I take you to the guide page of 'Get Windows Media Player'?"), _L("Error"), wxOK | wxCANCEL);
|
Slic3r::GUI::wxGetApp().CallAfter([] {
|
||||||
if (res == wxOK) {
|
auto res = wxMessageBox(_L("Windows Media Player is required for this task! Do you want to enable 'Windows Media Player' for your operation system?"), _L("Error"), wxOK | wxCANCEL);
|
||||||
wxString url = "https://support.microsoft.com/en-au/windows/get-windows-media-player-81718e0d-cfce-25b1-aee3-94596b658287";
|
if (res == wxOK) {
|
||||||
wxExecute("cmd /c start " + url, wxEXEC_HIDE_CONSOLE);
|
wxString url = IsWindows10OrGreater()
|
||||||
}
|
? "ms-settings:optionalfeatures?activationSource=SMC-Article-14209"
|
||||||
|
: "https://support.microsoft.com/en-au/windows/get-windows-media-player-81718e0d-cfce-25b1-aee3-94596b658287";
|
||||||
|
wxExecute("cmd /c start " + url, wxEXEC_HIDE_CONSOLE);
|
||||||
|
}
|
||||||
|
});
|
||||||
m_error = 2;
|
m_error = 2;
|
||||||
wxMediaEvent event(wxEVT_MEDIA_STATECHANGED);
|
wxMediaEvent event(wxEVT_MEDIA_STATECHANGED);
|
||||||
event.SetId(GetId());
|
event.SetId(GetId());
|
||||||
|
|
Loading…
Reference in New Issue