- MGR: Remove some old wxWidgets 2.4 cruft for dealing with Hyperlinks.

wxWidgets now natively supports them.
        
    clientgui/
        AccountInfoPage.cpp, .h
        AccountManagerInfoPage.cpp
        AdvancedFrame.cpp
        BOINCBaseFrame.cpp, .h
        BOINCGUI.cst (deleted)
        BOINCGUI.pjd (deleted)
        BOINCTaskBar.cpp
        BOINCWizards.h
        DlgAbout.cpp, .h
        DlgAdvPreferences.cpp
        DlgEventLog.cpp
        hyperlink.cpp, .h (deleted)
        ProjectInfoPage.cpp
        sg_BoincSimpleGUI.cpp
        sg_DlgMessages.cpp
        sg_DlgPreferences.cpp
        sg_ProjectsComponent.cpp
        sg_StatImageLoader.cpp
        stdwx.h
        ViewProjects.cpp
        ViewWork.cpp
        WelcomePage.cpp
        WizardAttachProject.cpp
    win_build/
        boinc_ss.vcproj
        boincmgr.vcproj
        libboinc_staticcrt.vcproj

svn path=/trunk/boinc/; revision=19982
This commit is contained in:
Rom Walton 2009-12-19 05:16:41 +00:00
parent 2de31e383a
commit 791040689d
31 changed files with 81 additions and 10240 deletions

View File

@ -10376,3 +10376,36 @@ Charlie 18 Dec 2009
mac_build/
boinc.xcodeproj/
project.pbxproj
Rom 19 Dec 2009
- MGR: Remove some old wxWidgets 2.4 cruft for dealing with Hyperlinks.
wxWidgets now natively supports them.
clientgui/
AccountInfoPage.cpp, .h
AccountManagerInfoPage.cpp
AdvancedFrame.cpp
BOINCBaseFrame.cpp, .h
BOINCGUI.cst (deleted)
BOINCGUI.pjd (deleted)
BOINCTaskBar.cpp
BOINCWizards.h
DlgAbout.cpp, .h
DlgAdvPreferences.cpp
DlgEventLog.cpp
hyperlink.cpp, .h (deleted)
ProjectInfoPage.cpp
sg_BoincSimpleGUI.cpp
sg_DlgMessages.cpp
sg_DlgPreferences.cpp
sg_ProjectsComponent.cpp
sg_StatImageLoader.cpp
stdwx.h
ViewProjects.cpp
ViewWork.cpp
WelcomePage.cpp
WizardAttachProject.cpp
win_build/
boinc_ss.vcproj
boincmgr.vcproj
libboinc_staticcrt.vcproj

View File

@ -33,7 +33,6 @@
#include "MainDocument.h"
#include "wx/valgen.h"
#include "wx/valtext.h"
#include "hyperlink.h"
#include "ValidateEmailAddress.h"
#include "BOINCWizards.h"
#include "BOINCBaseWizard.h"
@ -137,8 +136,8 @@ void CAccountInfoPage::CreateControls()
m_pCookieDetectionFailedStaticCtrl->Hide();
itemBoxSizer57->Add(m_pCookieDetectionFailedStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
m_pCookieDetectionFailedCtrl = new wxHyperLink;
m_pCookieDetectionFailedCtrl->Create( itemWizardPage56, ID_ACCOUNTCOOKIEDETECTIONFAILEDCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_pCookieDetectionFailedCtrl = new wxHyperlinkCtrl;
m_pCookieDetectionFailedCtrl->Create( itemWizardPage56, ID_ACCOUNTCOOKIEDETECTIONFAILEDCTRL, wxEmptyString, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxNO_BORDER | wxHL_ALIGN_LEFT | wxHL_CONTEXTMENU );
m_pCookieDetectionFailedCtrl->Hide();
itemBoxSizer57->Add(m_pCookieDetectionFailedCtrl, 0, wxALIGN_LEFT|wxALL, 5);
@ -203,8 +202,8 @@ void CAccountInfoPage::CreateControls()
m_pAccountManagerLinkLabelStaticCtrl->Create( itemWizardPage56, ID_ACCOUNTLINKLABELSTATICCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer57->Add(m_pAccountManagerLinkLabelStaticCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_pAccountForgotPasswordCtrl = new wxHyperLink;
m_pAccountForgotPasswordCtrl->Create( itemWizardPage56, ID_ACCOUNTFORGOTPASSWORDCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_pAccountForgotPasswordCtrl = new wxHyperlinkCtrl;
m_pAccountForgotPasswordCtrl->Create( itemWizardPage56, ID_ACCOUNTFORGOTPASSWORDCTRL, wxEmptyString, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxNO_BORDER | wxHL_ALIGN_LEFT | wxHL_CONTEXTMENU );
itemBoxSizer57->Add(m_pAccountForgotPasswordCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
// Set validators

View File

@ -93,7 +93,7 @@ public:
////@begin CAccountInfoPage member variables
wxStaticText* m_pTitleStaticCtrl;
wxStaticText* m_pCookieDetectionFailedStaticCtrl;
wxHyperLink* m_pCookieDetectionFailedCtrl;
wxHyperlinkCtrl* m_pCookieDetectionFailedCtrl;
wxStaticText* m_pAccountQuestionStaticCtrl;
wxRadioButton* m_pAccountCreateCtrl;
wxRadioButton* m_pAccountUseExistingCtrl;
@ -109,7 +109,7 @@ public:
wxString m_strAccountEmailAddress;
wxString m_strAccountPassword;
wxString m_strAccountConfirmPassword;
wxHyperLink* m_pAccountForgotPasswordCtrl;
wxHyperlinkCtrl* m_pAccountForgotPasswordCtrl;
////@end CAccountInfoPage member variables
};

View File

@ -32,7 +32,6 @@
#include "BOINCGUIApp.h"
#include "SkinManager.h"
#include "MainDocument.h"
#include "hyperlink.h"
#include "ValidateURL.h"
#include "BOINCWizards.h"
#include "BOINCBaseWizard.h"
@ -312,7 +311,7 @@ void CAccountManagerInfoPage::OnProjectItemChange( ProjectListCtrlEvent& event )
*/
void CAccountManagerInfoPage::OnProjectItemDisplay( ProjectListCtrlEvent& event ) {
wxHyperLink::ExecuteLink( event.GetURL() );
wxLaunchDefaultBrowser( event.GetURL() );
}
/*!

View File

@ -1593,7 +1593,7 @@ void CAdvancedFrame::OnHelp(wxHelpEvent& event) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnHelpBOINCManager - Function End"));
@ -1613,7 +1613,7 @@ void CAdvancedFrame::OnHelpBOINC(wxCommandEvent& event) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnHelpBOINC - Function End"));

View File

@ -26,7 +26,6 @@
#include "miofile.h"
#include "parse.h"
#include "error_numbers.h"
#include "hyperlink.h"
#include "BOINCGUIApp.h"
#include "SkinManager.h"
#include "MainDocument.h"
@ -653,11 +652,6 @@ void CBOINCBaseFrame::ShowAlert( const wxString title, const wxString message, c
}
void CBOINCBaseFrame::ExecuteBrowserLink(const wxString &strLink) {
wxHyperLink::ExecuteLink(strLink);
}
bool CBOINCBaseFrame::SaveState() {
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCBaseFrame::SaveState - Function Begin"));

View File

@ -91,8 +91,6 @@ public:
const FrameAlertEventType alert_event_type = AlertNormal
);
void ExecuteBrowserLink( const wxString& strLink );
bool Show( bool bShow = true );
virtual bool SaveState();

View File

@ -1,30 +0,0 @@
[wxHyperLink]
Description=
BaseClass=
IncludeFilename=hyperlink.h
ImageFilename=
TileImage=0
ImageHAlignment=2
ImageVAlignment=2
CustomArguments=%PARENT%, %IDENTIFIER%, %POSITION%, %SIZE%, %STYLE%
CustomCtorArguments=
Styles=
ExtraStyles=
DefaultWidth=-1
DefaultHeight=-1
ShowInheritedProperties=1
IsContainer=0
Label=%Label%
Colour=FFFFFF
BorderStyle=wxSIMPLE_BORDER
[wxHyperLink/Properties]
[wxHyperLink/Properties/Label]
Type=wxString
Kind=0
Editor=default
DefaultValue=
Setter=
Getter=
XRCTag=
Description=
Translateable=1

File diff suppressed because it is too large Load Diff

View File

@ -202,7 +202,7 @@ void CTaskBarIcon::OnOpenWebsite(wxCommandEvent& WXUNUSED(event)) {
pDoc->rpc.acct_mgr_info(ami);
url = wxString(ami.acct_mgr_url.c_str(), wxConvUTF8);
pFrame->ExecuteBrowserLink(url);
wxLaunchDefaultBrowser(url);
wxLogTrace(wxT("Function Start/End"), wxT("CTaskBarIcon::OnOpenWebsite - Function End"));
}

View File

@ -137,11 +137,6 @@ class CErrProxyInfoPage;
class CErrProxyPage;
// Forward declare special controls
//
class wxHyperLink;
// Wizard Detection
//
#define IS_ATTACHTOPROJECTWIZARD() \

View File

@ -183,8 +183,8 @@ void CDlgAbout::CreateControls() {
itemStaticText14->Create( itemDialog1, wxID_STATIC, _("Berkeley Open Infrastructure for Network Computing"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer2->Add(itemStaticText14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_AboutBOINCURLCtrl = new wxHyperLink;
m_AboutBOINCURLCtrl->Create( itemDialog1, ID_ABOUTBOINCLINK, wxT("http://boinc.berkeley.edu/"), wxDefaultPosition, wxDefaultSize, wxNO_BORDER );
m_AboutBOINCURLCtrl = new wxHyperlinkCtrl;
m_AboutBOINCURLCtrl->Create( itemDialog1, ID_ABOUTBOINCLINK, wxT("http://boinc.berkeley.edu/"), wxT("http://boinc.berkeley.edu/"), wxDefaultPosition, wxDefaultSize, wxNO_BORDER | wxHL_ALIGN_CENTRE | wxHL_CONTEXTMENU );
itemBoxSizer2->Add(m_AboutBOINCURLCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxStaticLine* itemStaticLine15 = new wxStaticLine;

View File

@ -28,7 +28,6 @@
////@begin includes
#include "wx/valgen.h"
#include "hyperlink.h"
#include "wx/statline.h"
////@end includes
@ -37,7 +36,6 @@
*/
////@begin forward declarations
class wxHyperLink;
////@end forward declarations
/*!
@ -108,7 +106,7 @@ public:
wxStaticText* m_AboutBOINCTitleCtrl;
wxStaticBitmap* m_AboutBOINCLogoCtrl;
wxStaticText* m_AboutBOINCSloganCtrl;
wxHyperLink* m_AboutBOINCURLCtrl;
wxHyperlinkCtrl* m_AboutBOINCURLCtrl;
wxString m_strVersion;
wxString m_strWidgetsVersion;
////@end CDlgAbout member variables

View File

@ -24,7 +24,6 @@
#include "MainDocument.h"
#include "BOINCBaseFrame.h"
#include "SkinManager.h"
#include "hyperlink.h"
#include "Events.h"
#include "error_numbers.h"
#include "version.h"
@ -713,7 +712,7 @@ void CDlgAdvPreferences::OnHelp(wxCommandEvent& ev) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
ev.GetId()
);
wxGetApp().GetFrame()->ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
}

View File

@ -32,7 +32,6 @@
#include "SkinManager.h"
#include "MainDocument.h"
#include "BOINCBaseFrame.h"
#include "hyperlink.h"
#include "version.h"
#include "DlgEventLogListCtrl.h"
#include "DlgEventLog.h"
@ -282,7 +281,7 @@ void CDlgEventLog::OnHelp(wxHelpEvent& event) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
wxGetApp().GetFrame()->ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CDlgEventLog::OnHelp - Function End"));
@ -616,7 +615,7 @@ void CDlgEventLog::OnButtonHelp( wxCommandEvent& event ) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
wxGetApp().GetFrame()->ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CDlgEventLog::OnHelp - Function End"));

View File

@ -33,7 +33,6 @@
#include "BOINCGUIApp.h"
#include "SkinManager.h"
#include "MainDocument.h"
#include "hyperlink.h"
#include "ValidateURL.h"
#include "BOINCWizards.h"
#include "BOINCBaseWizard.h"
@ -447,7 +446,7 @@ void CProjectInfoPage::OnProjectItemChange( ProjectListCtrlEvent& event ) {
*/
void CProjectInfoPage::OnProjectItemDisplay( ProjectListCtrlEvent& event ) {
wxHyperLink::ExecuteLink( event.GetURL() );
wxLaunchDefaultBrowser( event.GetURL() );
}

View File

@ -537,7 +537,7 @@ void CViewProjects::OnProjectWebsiteClicked( wxEvent& event ) {
pFrame->UpdateStatusText(_("Launching browser..."));
int website_task_index = event.GetId() - ID_TASK_PROJECT_WEB_PROJDEF_MIN;
pFrame->ExecuteBrowserLink(
wxLaunchDefaultBrowser(
m_TaskGroups[1]->m_Tasks[website_task_index]->m_strWebSiteLink
);

View File

@ -546,7 +546,7 @@ void CViewWork::OnProjectWebsiteClicked( wxEvent& event ) {
pFrame->UpdateStatusText(_("Launching browser..."));
int website_task_index = event.GetId() - ID_TASK_PROJECT_WEB_PROJDEF_MIN;
pFrame->ExecuteBrowserLink(
wxLaunchDefaultBrowser(
m_TaskGroups[1]->m_Tasks[website_task_index]->m_strWebSiteLink
);

View File

@ -35,7 +35,6 @@
#include "BOINCBaseWizard.h"
#include "WizardAttachProject.h"
#include "WelcomePage.h"
#include "hyperlink.h"
////@begin XPM images
////@end XPM images
@ -343,7 +342,7 @@ void CWelcomePage::OnChangeApplications( wxCommandEvent& /* event */ ) {
wxASSERT(pWAP);
wxASSERT(wxDynamicCast(pWAP, CWizardAttachProject));
wxHyperLink::ExecuteLink(wxT("http://www.worldcommunitygrid.org/ms/viewMyProjects.do"));
wxLaunchDefaultBrowser(wxT("http://www.worldcommunitygrid.org/ms/viewMyProjects.do"));
pWAP->SimulateCancelButton();
wxLogTrace(wxT("Function Start/End"), wxT("CWelcomePage::OnChangeApplications - Function End"));

View File

@ -28,7 +28,6 @@
#include "error_numbers.h"
#include "wizardex.h"
#include "error_numbers.h"
#include "hyperlink.h"
#include "browser.h"
#include "BOINCGUIApp.h"
#include "SkinManager.h"
@ -658,17 +657,16 @@ void CWizardAttachProject::_ProcessCancelEvent( wxWizardExEvent& event ) {
*/
void CWizardAttachProject::OnFinished( wxWizardExEvent& event ) {
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
if (IsAccountManagerWizard) {
// Attached to an account manager
if (!m_strReturnURL.empty() && GetAttachedToProjectSuccessfully()) {
pFrame->ExecuteBrowserLink(m_strReturnURL);
wxLaunchDefaultBrowser(m_strReturnURL);
}
} else {
// Attached to a project
if (GetAccountCreatedSuccessfully() && GetAttachedToProjectSuccessfully()) {
pFrame->ExecuteBrowserLink(GetProjectURL() + wxT("account_finish.php?auth=") + GetProjectAuthenticator());
wxLaunchDefaultBrowser(GetProjectURL() + wxT("account_finish.php?auth=") + GetProjectAuthenticator());
}
}

View File

@ -1,206 +0,0 @@
//////////////////////////////////////////////////////////////////////////////
// File: hyperlink.cpp
// Purpose: wxHyperLink control
// Maintainer: Wyo
// Created: 2003-04-07
// RCS-ID: $Id$
// Copyright: (c) 2004 wxCode
// Licence: wxWindows
//////////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------------------------
// information
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// headers
//----------------------------------------------------------------------------
#include "stdwx.h"
#include "diagnostics.h"
#include "util.h"
#include "mfile.h"
#include "miofile.h"
#include "parse.h"
#include "error_numbers.h"
#include "Events.h"
#include "BOINCGUIApp.h"
#include "SkinManager.h"
#include "hyperlink.h" // wxHyperLink control
//----------------------------------------------------------------------------
// resources
//----------------------------------------------------------------------------
//============================================================================
// declarations
//============================================================================
//============================================================================
// implementation
//============================================================================
//----------------------------------------------------------------------------
// wxHyperLink
//----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS (wxHyperLink, wxStaticText)
BEGIN_EVENT_TABLE (wxHyperLink, wxStaticText)
EVT_ENTER_WINDOW (wxHyperLink::OnWindowEnter)
EVT_LEAVE_WINDOW (wxHyperLink::OnWindowLeave)
EVT_LEFT_DCLICK (wxHyperLink::OnLinkActivate)
EVT_LEFT_DOWN (wxHyperLink::OnLinkActivate)
END_EVENT_TABLE()
bool wxHyperLink::Create (wxWindow *parent,
wxWindowID id,
const wxString &label,
const wxPoint &pos,
const wxSize &size,
long style,
const wxString &name) {
bool okay = FALSE;
// create static text
okay = wxStaticText::Create (parent, id, label, pos, size, style, name);
wxASSERT_MSG (okay, wxT("Failed to create wxStaticText, needed by wxHyperLink!"));
// initialize variables
m_URL = wxEmptyString;
m_Marked = false;
m_Visited = false;
m_MarkedColour = wxColour (wxT("DARK GREY"));
m_NormalColour = wxColour (wxT("BLUE"));
m_VisitedColour = wxColour (wxT("PURPLE"));
m_HoverCursor = wxCursor (wxCURSOR_HAND);
// set foreground colour
SetForegroundColour (m_NormalColour);
wxFont font = GetFont();
font.SetUnderlined (true);
SetFont (font);
// get background colour
m_BackgroundColour = GetBackgroundColour ();
return okay;
} // Create
//----------------------------------------------------------------------------
// event handlers
void wxHyperLink::OnWindowEnter (wxMouseEvent &WXUNUSED(event)) {
SetCursor (m_HoverCursor);
Refresh();
}
void wxHyperLink::OnWindowLeave (wxMouseEvent &WXUNUSED(event)) {
SetCursor (wxNullCursor);
Refresh();
}
void wxHyperLink::OnLinkActivate (wxMouseEvent &WXUNUSED(event)) {
m_Visited = TRUE;
SetForegroundColour (m_VisitedColour);
SetBackgroundColour (m_BackgroundColour);
Refresh();
if (m_URL.IsEmpty()) {
ExecuteLink (GetLabel());
}else{
ExecuteLink (m_URL);
}
}
//----------------------------------------------------------------------------
// settings functions
wxCursor wxHyperLink::GetHoverCursor () {
return m_HoverCursor;
}
void wxHyperLink::SetHoverCursor (wxCursor cursor) {
m_HoverCursor = cursor;
}
wxColour wxHyperLink::GetMarkedColour () {
return m_MarkedColour;
}
void wxHyperLink::SetMarkedColour (wxColour colour) {
m_MarkedColour = colour;
}
wxColour wxHyperLink::GetNormalColour () {
return m_NormalColour;
}
void wxHyperLink::SetNormalColour (wxColour colour) {
m_NormalColour = colour;
if (!m_Visited) {
SetForegroundColour (m_NormalColour);
}else{
SetForegroundColour (m_VisitedColour);
}
Refresh();
}
wxColour wxHyperLink::GetVisitedColour () {
return m_VisitedColour;
}
void wxHyperLink::SetVisitedColour (wxColour colour) {
m_VisitedColour = colour;
if (!m_Visited) {
SetForegroundColour (m_NormalColour);
}else{
SetForegroundColour (m_VisitedColour);
}
Refresh();
}
wxString wxHyperLink::GetURL () {
return m_URL;
}
void wxHyperLink::SetURL (const wxString &url) {
m_URL = url;
}
void wxHyperLink::ExecuteLink (const wxString &strLink) {
if (!wxLaunchDefaultBrowser(strLink)) {
wxString strDialogTitle = wxEmptyString;
wxString strDialogMessage = wxEmptyString;
// %s is the application name
// i.e. 'BOINC Manager', 'GridRepublic Manager'
strDialogTitle.Printf(
_("%s - Can't find web browser"),
wxGetApp().GetSkinManager()->GetAdvanced()->GetApplicationName().c_str()
);
// 1st %s is the application name
// i.e. 'BOINC Manager', 'GridRepublic Manager'
// 2nd %s is the URL that the browser is supposed to
// open.
// 3rd %s is the application name
// i.e. 'BOINC Manager', 'GridRepublic Manager'
strDialogMessage.Printf(
_("%s tried to display the web page\n\t%s\nbut couldn't find a web browser.\nTo fix this, set the environment variable\nBROWSER to the path of your web browser,\nthen restart the %s."),
wxGetApp().GetSkinManager()->GetAdvanced()->GetApplicationName().c_str(),
strLink.c_str(),
wxGetApp().GetSkinManager()->GetAdvanced()->GetApplicationName().c_str()
);
::wxGetApp().SafeMessageBox(
strDialogMessage,
strDialogTitle,
wxOK | wxICON_INFORMATION
);
}
}
const char *BOINC_RCSID_d587835b7e="$Id$";

View File

@ -1,106 +0,0 @@
//////////////////////////////////////////////////////////////////////////////
// File: hyperlink.h
// Purpose: wxHyperLink control
// Maintainer: Wyo
// Created: 2003-04-07
// RCS-ID: $Id$
// Copyright: (c) 2004 wxCode
// Licence: wxWindows
//////////////////////////////////////////////////////////////////////////////
#ifndef _MY_HYPERLINK_H_
#define _MY_HYPERLINK_H_
#ifdef __GNUG__
#pragma implementation "hyperlink.h"
#endif
//----------------------------------------------------------------------------
// information
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// headers
//----------------------------------------------------------------------------
//! wxWidgets headers
//============================================================================
// declarations
//============================================================================
//----------------------------------------------------------------------------
//!
//----------------------------------------------------------------------------
//! wxHyperLink
class wxHyperLink: public wxStaticText {
DECLARE_DYNAMIC_CLASS (wxHyperLink)
public:
//! default constructor
wxHyperLink () {}
//! create constructor
wxHyperLink (wxWindow *parent,
wxWindowID id,
const wxString &label = wxEmptyString,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = 0,
const wxString &name = _T("HyperLink")) {
Create (parent, id, label, pos, size, style, name);
}
// function create
bool Create (wxWindow *parent,
wxWindowID id,
const wxString &label = wxEmptyString,
const wxPoint &pos = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style = 0,
const wxString &name = _T("HyperLink"));
// event handlers
void OnWindowEnter (wxMouseEvent& event);
void OnWindowLeave (wxMouseEvent& event);
void OnLinkActivate (wxMouseEvent& event);
// get/set settings
wxCursor GetHoverCursor ();
void SetHoverCursor (wxCursor cursor);
wxColour GetMarkedColour ();
void SetMarkedColour (wxColour colour);
wxColour GetNormalColour ();
void SetNormalColour (wxColour colour);
wxColour GetVisitedColour ();
void SetVisitedColour (wxColour colour);
wxString GetURL ();
void SetURL (const wxString &url);
//! execute according to mimetype
static void ExecuteLink (const wxString &link);
private:
//! hypertext variables
wxString m_URL;
bool m_Marked;
bool m_Visited;
//! style settings
wxCursor m_HoverCursor;
wxColour m_MarkedColour;
wxColour m_NormalColour;
wxColour m_VisitedColour;
wxColour m_BackgroundColour;
DECLARE_EVENT_TABLE()
};
#endif // _MY_HYPERLINK_H_

View File

@ -281,7 +281,7 @@ void CSimpleFrame::OnHelpBOINC(wxCommandEvent& event) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnHelpBOINC - Function End"));
@ -301,7 +301,7 @@ void CSimpleFrame::OnHelp(wxHelpEvent& event) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnHelp - Function End"));

View File

@ -32,7 +32,6 @@
#include "SkinManager.h"
#include "MainDocument.h"
#include "BOINCBaseFrame.h"
#include "hyperlink.h"
#include "version.h"
#include "sg_DlgMessages.h"
@ -452,7 +451,7 @@ void CPanelMessages::OnButtonHelp( wxCommandEvent& event ) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
wxGetApp().GetFrame()->ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CPanelMessages::OnHelp - Function End"));
@ -844,7 +843,7 @@ void CDlgMessages::OnHelp(wxHelpEvent& event) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
wxGetApp().GetFrame()->ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CDlgMessages::OnHelp - Function End"));

View File

@ -31,7 +31,6 @@
#include "SkinManager.h"
#include "MainDocument.h"
#include "BOINCBaseFrame.h"
#include "hyperlink.h"
#include "version.h"
#include "sg_CustomControls.h"
@ -574,7 +573,7 @@ void CPanelPreferences::OnButtonHelp( wxCommandEvent& event ) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
wxGetApp().GetFrame()->ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CPanelPreferences::OnHelp - Function End"));
@ -1080,7 +1079,7 @@ void CDlgPreferences::OnHelp(wxHelpEvent& event) {
wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
event.GetId()
);
wxGetApp().GetFrame()->ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
}
wxLogTrace(wxT("Function Start/End"), wxT("CDlgPreferences::OnHelp - Function End"));

View File

@ -27,7 +27,6 @@
#include "parse.h"
#include "error_numbers.h"
#include "Events.h"
#include "hyperlink.h"
#include "BOINCGUIApp.h"
#include "SkinManager.h"
#include "MainDocument.h"
@ -406,7 +405,7 @@ void CProjectsComponent::OnHelp(wxCommandEvent& event) {
event.GetId()
);
wxGetApp().GetFrame()->ExecuteBrowserLink(wxurl);
wxLaunchDefaultBrowser(wxurl);
wxLogTrace(wxT("Function Start/End"), wxT("CProjectsComponent::OnHelp - Function End"));
}

View File

@ -174,7 +174,7 @@ void StatImageLoader::OnMenuLinkClicked(wxCommandEvent& event)
CBOINCBaseFrame* pFrame = wxDynamicCast(m_parent->GetParent(),CBOINCBaseFrame);
wxASSERT(pFrame);
wxASSERT(wxDynamicCast(pFrame, CBOINCBaseFrame));
pFrame->ExecuteBrowserLink(wxString(m_prjUrl.c_str(),wxConvUTF8));
wxLaunchDefaultBrowser(wxString(m_prjUrl.c_str(),wxConvUTF8));
} else{
int menuId = menuIDevt - WEBSITE_URL_MENU_ID;
PROJECT* project = pDoc->state.lookup_project(m_prjUrl);
@ -183,7 +183,7 @@ void StatImageLoader::OnMenuLinkClicked(wxCommandEvent& event)
CBOINCBaseFrame* pFrame = wxDynamicCast(m_parent->GetParent(),CBOINCBaseFrame);
wxASSERT(pFrame);
wxASSERT(wxDynamicCast(pFrame, CBOINCBaseFrame));
pFrame->ExecuteBrowserLink(wxString(project->gui_urls[menuId].url.c_str(),wxConvUTF8));
wxLaunchDefaultBrowser(wxString(project->gui_urls[menuId].url.c_str(),wxConvUTF8));
}
}

View File

@ -111,10 +111,9 @@
#include <wx/fs_mem.h>
#include <wx/dnd.h>
#include <wx/htmllbox.h>
#include <wx/hyperlink.h>
#ifdef _WIN32
// Visual Studio 2005 has extended the C Run-Time Library by including "secure"
// runtime functions and deprecating the previous function prototypes. Since
// we need to use the previous prototypes to maintain compatibility with other

View File

@ -611,6 +611,10 @@
RelativePath="..\lib\network.cpp"
>
</File>
<File
RelativePath="..\lib\notice.cpp"
>
</File>
<File
RelativePath="..\lib\parse.cpp"
>
@ -696,6 +700,10 @@
RelativePath="..\lib\network.h"
>
</File>
<File
RelativePath="..\lib\notice.h"
>
</File>
<File
RelativePath="..\lib\parse.h"
>

View File

@ -1668,22 +1668,6 @@
RelativePath="..\clientgui\browser.h"
>
</File>
<File
RelativePath="..\clientgui\hyperlink.cpp"
>
</File>
<File
RelativePath="..\clientgui\hyperlink.h"
>
</File>
<File
RelativePath="..\clientgui\Localization.cpp"
>
</File>
<File
RelativePath="..\clientgui\Localization.h"
>
</File>
<File
RelativePath="..\clientgui\LogBOINC.cpp"
>

View File

@ -1007,6 +1007,10 @@
RelativePath="..\lib\network.cpp"
>
</File>
<File
RelativePath="..\lib\notice.cpp"
>
</File>
<File
RelativePath="..\lib\parse.cpp"
>
@ -1357,6 +1361,10 @@
RelativePath="..\lib\network.h"
>
</File>
<File
RelativePath="..\lib\notice.h"
>
</File>
<File
RelativePath="..\lib\parse.h"
>