*** empty log message ***

svn path=/trunk/boinc/; revision=11786
This commit is contained in:
Rom Walton 2007-01-06 05:14:26 +00:00
parent 43d9de25ce
commit dfac6eb739
5 changed files with 97 additions and 2 deletions

View File

@ -174,3 +174,10 @@ David 5 Jan 2007
clientgui/
BOINCGridCtrl.cpp,h
WelcomPage.cpp
Rom 5 Jan 2007
- MGR: Fix the help handling code for the Mac UI conventions.
clientgui/
sg_DlgMessages.cpp, .h
sg_DlgPreferences.cpp, .h

View File

@ -67,6 +67,7 @@ BEGIN_EVENT_TABLE( CPanelMessages, wxPanel )
EVT_BUTTON( wxID_OK, CPanelMessages::OnOK )
EVT_BUTTON(ID_COPYAll, CPanelMessages::OnMessagesCopyAll)
EVT_BUTTON(ID_COPYSELECTED, CPanelMessages::OnMessagesCopySelected)
EVT_BUTTON(ID_SIMPLE_HELP, CPanelMessages::OnButtonHelp)
////@end CPanelPreferences event table entries
END_EVENT_TABLE()
@ -248,9 +249,30 @@ void CPanelMessages::CreateControls()
itemBoxSizer4->Add(itemBitmapButton44, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
#ifndef __WXMSW__
#ifdef __WXMAC__
wxBitmapButton* itemButton45 = new wxBitmapButton(
this,
ID_SIMPLE_HELP,
*pSkinSimple->GetHelpButton()->GetBitmap(),
wxDefaultPosition,
wxSize(
(*pSkinSimple->GetHelpButton()->GetBitmap()).GetWidth(),
(*pSkinSimple->GetHelpButton()->GetBitmap()).GetHeight()
),
wxBU_AUTODRAW
);
if ( pSkinSimple->GetHelpButton()->GetBitmapClicked() != NULL ) {
itemButton45->SetBitmapSelected(*pSkinSimple->GetHelpButton()->GetBitmapClicked());
}
#ifdef wxUSE_TOOLTIPS
itemButton45->SetToolTip(new wxToolTip(_("Get help with BOINC")););
#endif
itemBoxSizer4->Add(itemButton45, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
#else
wxContextHelpButton* itemButton45 = new wxContextHelpButton(this);
itemBoxSizer4->Add(itemButton45, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
#endif
#endif
}
@ -408,6 +430,25 @@ void CPanelMessages::OnMessagesCopySelected( wxCommandEvent& WXUNUSED(event) ) {
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP
*/
void CPanelMessages::OnButtonHelp( wxCommandEvent& WXUNUSED(event) ) {
wxLogTrace(wxT("Function Start/End"), wxT("CPanelMessages::OnHelp - Function Begin"));
std::string url;
url = wxGetApp().GetSkinManager()->GetAdvanced()->GetCompanyWebsite().mb_str();
canonicalize_master_url(url);
wxString wxurl;
wxurl.Printf(wxT("%smanager_links.php?target=simple"), url.c_str());
wxHyperLink::ExecuteLink(wxurl);
wxLogTrace(wxT("Function Start/End"), wxT("CPanelMessages::OnHelp - Function End"));
}
bool CPanelMessages::OnSaveState(wxConfigBase* pConfig) {
wxString strBaseConfigLocation = wxEmptyString;
wxListItem liColumnInfo;

View File

@ -107,6 +107,9 @@ public:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_COPYSELECTED
void OnMessagesCopySelected( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP
void OnButtonHelp( wxCommandEvent& event );
////@end CPanelMessages event handler declarations
////@begin CPanelMessages member function declarations

View File

@ -208,6 +208,7 @@ BEGIN_EVENT_TABLE( CPanelPreferences, wxPanel )
EVT_CHECKBOX( ID_CUSTOMIZEPREFERENCES, CPanelPreferences::OnCustomizePreferencesClick )
EVT_COMBOBOX( ID_WORKBETWEENBEGIN, CPanelPreferences::OnWorkBetweenBeginSelected )
EVT_COMBOBOX( ID_CONNECTBETWEENBEGIN, CPanelPreferences::OnConnectBetweenBeginSelected )
EVT_BUTTON(ID_SIMPLE_HELP, CPanelPreferences::OnButtonHelp)
////@end CPanelPreferences event table entries
END_EVENT_TABLE()
@ -486,8 +487,29 @@ void CPanelPreferences::CreateControls()
itemBoxSizer44->Add(itemBitmapButton45, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
#ifndef __WXMSW__
wxContextHelpButton* itemButton46 = new wxContextHelpButton(this);
itemBoxSizer44->Add(itemButton46, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
#ifdef __WXMAC__
wxBitmapButton* itemButton46 = new wxBitmapButton(
this,
ID_SIMPLE_HELP,
*pSkinSimple->GetHelpButton()->GetBitmap(),
wxDefaultPosition,
wxSize(
(*pSkinSimple->GetHelpButton()->GetBitmap()).GetWidth(),
(*pSkinSimple->GetHelpButton()->GetBitmap()).GetHeight()
),
wxBU_AUTODRAW
);
if ( pSkinSimple->GetHelpButton()->GetBitmapClicked() != NULL ) {
itemButton46->SetBitmapSelected(*pSkinSimple->GetHelpButton()->GetBitmapClicked());
}
#ifdef wxUSE_TOOLTIPS
itemButton45->SetToolTip(new wxToolTip(_("Get help with BOINC")););
#endif
itemBoxSizer4->Add(itemButton45, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
#else
wxContextHelpButton* itemButton45 = new wxContextHelpButton(this);
itemBoxSizer4->Add(itemButton45, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
#endif
#endif
// Set validators
@ -532,6 +554,25 @@ void CPanelPreferences::OnConnectBetweenBeginSelected( wxCommandEvent& /*event*/
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP
*/
void CPanelPreferences::OnButtonHelp( wxCommandEvent& WXUNUSED(event) ) {
wxLogTrace(wxT("Function Start/End"), wxT("CPanelPreferences::OnHelp - Function Begin"));
std::string url;
url = wxGetApp().GetSkinManager()->GetAdvanced()->GetCompanyWebsite().mb_str();
canonicalize_master_url(url);
wxString wxurl;
wxurl.Printf(wxT("%smanager_links.php?target=simple"), url.c_str());
wxHyperLink::ExecuteLink(wxurl);
wxLogTrace(wxT("Function Start/End"), wxT("CPanelPreferences::OnHelp - Function End"));
}
/*!
* wxEVT_ERASE_BACKGROUND event handler for ID_DLGPREFERENCES
*/

View File

@ -109,6 +109,9 @@ public:
/// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_CONNECTBETWEENBEGIN
void OnConnectBetweenBeginSelected( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP
void OnButtonHelp( wxCommandEvent& event );
////@end CPanelPreferences event handler declarations
////@begin CPanelPreferences member function declarations