X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/657a8a359826e46a7fc458216403f54deca34989..6f3f38980f10a935f3b47dbf0d3b4643e96a4be2:/src/common/hyperlnkcmn.cpp diff --git a/src/common/hyperlnkcmn.cpp b/src/common/hyperlnkcmn.cpp index 582147736d..32bf30c51c 100644 --- a/src/common/hyperlnkcmn.cpp +++ b/src/common/hyperlnkcmn.cpp @@ -42,6 +42,12 @@ // implementation // ============================================================================ +#if wxUSE_EXTENDED_RTTI + wxIMPLEMENT_DYNAMIC_CLASS_XTI( wxHyperlinkCtrl, wxControl, "wx/hyperlink.h") +#else + wxIMPLEMENT_DYNAMIC_CLASS( wxHyperlinkCtrl, wxControl ) +#endif // wxUSE_EXTENDED_RTTI + IMPLEMENT_DYNAMIC_CLASS(wxHyperlinkEvent, wxCommandEvent) wxDEFINE_EVENT( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEvent ); @@ -77,8 +83,12 @@ void wxHyperlinkCtrlBase::SendEvent() wxString url = GetURL(); wxHyperlinkEvent linkEvent(this, GetId(), url); if (!GetEventHandler()->ProcessEvent(linkEvent)) // was the event skipped ? + { if (!wxLaunchDefaultBrowser(url)) + { wxLogWarning(wxT("Could not launch the default browser with url '%s' !"), url.c_str()); + } + } } #endif // wxUSE_HYPERLINKCTRL