From 073340a33a0f839db8dd2dd3d3623da82056074c Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 22 Dec 2006 04:25:36 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11714 --- checkin_notes | 8 ++++++++ clientgui/sg_DlgMessages.cpp | 20 +++++++++++++------- clientgui/sg_DlgMessages.h | 2 +- clientgui/sg_DlgPreferences.cpp | 10 +++++++--- clientgui/sg_ProjectsComponent.cpp | 12 +++++++++++- clientgui/sg_ProjectsComponent.h | 1 + clientgui/stdwx.h | 1 + 7 files changed, 42 insertions(+), 12 deletions(-) diff --git a/checkin_notes b/checkin_notes index 6ad27b8ca7..679dbd372d 100755 --- a/checkin_notes +++ b/checkin_notes @@ -13621,3 +13621,11 @@ Rom 21 Dec 2006 lib/ diagnostics_win.C +Rom 21 Dec 2006 + - MGR: Add context help to the BSG. + + clientgui/ + sg_DlgMessages.cpp, .h + sg_DlgPreferences.cpp + sg_ProjectsComponent.cpp, .h + stdwx.h diff --git a/clientgui/sg_DlgMessages.cpp b/clientgui/sg_DlgMessages.cpp index 9535630aa6..d5312b478a 100644 --- a/clientgui/sg_DlgMessages.cpp +++ b/clientgui/sg_DlgMessages.cpp @@ -215,6 +215,12 @@ void CPanelMessages::CreateControls() itemBitmapButton44->SetBitmapSelected(*pSkinSimple->GetCloseButton()->GetBitmapClicked()); } itemBoxSizer4->Add(itemBitmapButton44, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + +#ifndef __WXMSW__ + wxContextHelpButton* itemButton45 = new wxContextHelpButton(this); + itemBoxSizer4->Add(itemButton45, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); +#endif + } @@ -664,19 +670,19 @@ bool CDlgMessages::Create( wxWindow* parent, wxWindowID id, const wxString& capt if (strCaption.IsEmpty()) { strCaption = _("BOINC Manager - Messages"); } - wxDialog::Create( parent, id, strCaption, pos, size, style ); - - Freeze(); - - - CreateControls(); #ifdef __WXDEBUG__ SetBackgroundColour(wxColour(255, 0, 255)); #endif SetBackgroundStyle(wxBG_STYLE_CUSTOM); SetForegroundColour(*wxBLACK); - SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); + SetExtraStyle(GetExtraStyle()|wxDIALOG_EX_CONTEXTHELP|wxWS_EX_BLOCK_EVENTS); + + wxDialog::Create( parent, id, strCaption, pos, size, style ); + + Freeze(); + + CreateControls(); GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); diff --git a/clientgui/sg_DlgMessages.h b/clientgui/sg_DlgMessages.h index c59b88e391..2c11c2d15f 100644 --- a/clientgui/sg_DlgMessages.h +++ b/clientgui/sg_DlgMessages.h @@ -47,7 +47,7 @@ class CSGUIListCtrl; ////@begin control identifiers #define ID_DLGMESSAGES 10000 -#define SYMBOL_CDLGMESSAGES_STYLE wxRESIZE_BORDER|wxCLOSE_BOX|wxCAPTION|wxCLIP_CHILDREN +#define SYMBOL_CDLGMESSAGES_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER #define SYMBOL_CDLGMESSAGES_TITLE wxT("") #define SYMBOL_CDLGMESSAGES_IDNAME ID_DLGMESSAGES #define SYMBOL_CDLGMESSAGES_SIZE wxDefaultSize diff --git a/clientgui/sg_DlgPreferences.cpp b/clientgui/sg_DlgPreferences.cpp index 0ca615e724..925139c30a 100644 --- a/clientgui/sg_DlgPreferences.cpp +++ b/clientgui/sg_DlgPreferences.cpp @@ -464,6 +464,10 @@ 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); +#endif // Set validators m_SkinSelectorCtrl->SetValidator( wxGenericValidator(& m_strSkinSelector) ); @@ -946,15 +950,15 @@ bool CDlgPreferences::Create( wxWindow* parent, wxWindowID id, const wxString& c if (strCaption.IsEmpty()) { strCaption = _("BOINC Manager - Preferences"); } - wxDialog::Create( parent, id, strCaption, pos, size, style ); - #ifdef __WXDEBUG__ SetBackgroundColour(wxColour(255, 0, 255)); #endif SetBackgroundStyle(wxBG_STYLE_CUSTOM); SetForegroundColour(*wxBLACK); - SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); + SetExtraStyle(GetExtraStyle()|wxDIALOG_EX_CONTEXTHELP|wxWS_EX_BLOCK_EVENTS); + + wxDialog::Create( parent, id, strCaption, pos, size, style ); Freeze(); diff --git a/clientgui/sg_ProjectsComponent.cpp b/clientgui/sg_ProjectsComponent.cpp index 2e3ec0f8aa..15f5686017 100644 --- a/clientgui/sg_ProjectsComponent.cpp +++ b/clientgui/sg_ProjectsComponent.cpp @@ -99,7 +99,7 @@ void CProjectsComponent::CreateComponent() this, -1, *pSkinSimple->GetAttachProjectButton()->GetBitmap(), - wxPoint(235,7), + wxPoint(214,7), wxSize(81,18), wxBU_AUTODRAW ); @@ -109,6 +109,16 @@ void CProjectsComponent::CreateComponent() ); } btnAddProj->SetToolTip(ttAddProject); + + /// Help + btnHelp=new wxContextHelpButton( + this, + wxID_CONTEXT_HELP, + wxPoint(300,7), + wxDefaultSize, + wxBU_AUTODRAW + ); + /// Line lnMyProjTop = new CTransparentStaticLine(this, wxID_ANY, wxPoint(29,29),wxSize(292,1)); diff --git a/clientgui/sg_ProjectsComponent.h b/clientgui/sg_ProjectsComponent.h index b715d81ac0..27373df481 100644 --- a/clientgui/sg_ProjectsComponent.h +++ b/clientgui/sg_ProjectsComponent.h @@ -53,6 +53,7 @@ public: wxBitmapButton *btnArwLeft; wxBitmapButton *btnArwRight; wxBitmapButton *btnAddProj; + wxContextHelpButton *btnHelp; wxBitmapButton *btnMessages; wxBitmapButton *btnAlertMessages; wxBitmapButton *btnPause; diff --git a/clientgui/stdwx.h b/clientgui/stdwx.h index b6693c730f..314c6d6557 100644 --- a/clientgui/stdwx.h +++ b/clientgui/stdwx.h @@ -103,6 +103,7 @@ #include #include #include +#include #ifdef _WIN32