X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/98159dd8b62759836ee48049e581e4c2be542cf0..f87584b55268e165f15de6f8ae34c99df72e5896:/src/generic/hyperlink.cpp diff --git a/src/generic/hyperlink.cpp b/src/generic/hyperlink.cpp index 54c6a9a092..50693dd9d0 100644 --- a/src/generic/hyperlink.cpp +++ b/src/generic/hyperlink.cpp @@ -17,15 +17,11 @@ // Pre-compiled header stuff //--------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "hyperlink.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_HYPERLINKCTRL @@ -38,9 +34,13 @@ #ifndef WX_PRECOMP #include "wx/utils.h" // for wxLaunchDefaultBrowser + #include "wx/dcclient.h" + #include "wx/menu.h" + #include "wx/log.h" #endif #include "wx/clipbrd.h" +#include "wx/dataobj.h" // ============================================================================ // implementation @@ -82,7 +82,7 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id, if(url.empty()) SetURL(label); else - SetUrl(url); + SetURL(url); if(label.empty()) SetLabel(url); @@ -218,12 +218,14 @@ void wxHyperlinkCtrl::OnLeaveWindow(wxMouseEvent& WXUNUSED(event)) void wxHyperlinkCtrl::OnPopUpCopy( wxCommandEvent& WXUNUSED(event) ) { +#if wxUSE_CLIPBOARD if (!wxTheClipboard->Open()) return; wxTextDataObject *data = new wxTextDataObject( m_url ); wxTheClipboard->SetData( data ); wxTheClipboard->Close(); +#endif // wxUSE_CLIPBOARD } #endif // wxUSE_HYPERLINKCTRL