diff --git a/checkin_notes b/checkin_notes index 63b2c40c21..6e3cafeb2c 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7919,3 +7919,14 @@ Rom 16 Aug 2007 sg_DlgPreferences.cpp sg_ProjectsComponent.cpp SkinManager.cpp, .h + +Rom 16 Aug 2007 + - MGR: Make sure all the dialogs contain the application name + and do not have BOINC Manager hard coded in them. + + clientgui/ + AdvancedFrame.cpp + DlgAbout.h + DlgAdvPreferencesBase.cpp, .h + DlgOptions.cpp, .h + DlgSelectComputer.cpp, .h diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index 3d6df1bafd..9b4064d9d6 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -502,7 +502,7 @@ bool CAdvancedFrame::CreateMenu() { ); if (is_acct_mgr_detected) { strMenuName.Printf( - _("&Stop using %s"), + _("&Stop using %s..."), wxString(ami.acct_mgr_name.c_str(), wxConvUTF8).c_str() ); menuAdvanced->Append( @@ -1206,7 +1206,7 @@ void CAdvancedFrame::OnSelectComputer(wxCommandEvent& WXUNUSED(event)) { void CAdvancedFrame::OnClientShutdown(wxCommandEvent& WXUNUSED(event)) { wxCommandEvent evtSelectNewComputer(wxEVT_COMMAND_MENU_SELECTED, ID_FILESELECTCOMPUTER); CMainDocument* pDoc = wxGetApp().GetDocument(); - CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); + CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); CDlgGenericMessage dlg(this); wxString strDialogTitle = wxEmptyString; wxString strDialogMessage = wxEmptyString; @@ -1226,7 +1226,7 @@ void CAdvancedFrame::OnClientShutdown(wxCommandEvent& WXUNUSED(event)) { // %s is the application name // i.e. 'BOINC Manager', 'GridRepublic Manager' strDialogTitle.Printf( - _("Shutdown the current client..."), + _("%s - Shutdown the current client..."), pSkinAdvanced->GetApplicationName().c_str() ); @@ -1390,6 +1390,7 @@ void CAdvancedFrame::OnAccountManagerDetach(wxCommandEvent& WXUNUSED(event)) { wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnAccountManagerDetach - Function Begin")); CMainDocument* pDoc = wxGetApp().GetDocument(); + CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); wxInt32 iAnswer = 0; wxString strTitle = wxEmptyString; wxString strMessage = wxEmptyString; @@ -1397,6 +1398,8 @@ void CAdvancedFrame::OnAccountManagerDetach(wxCommandEvent& WXUNUSED(event)) { wxASSERT(pDoc); wxASSERT(wxDynamicCast(pDoc, CMainDocument)); + wxASSERT(pSkinAdvanced); + wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced)); if (!pDoc->IsUserAuthorized()) return; @@ -1406,7 +1409,8 @@ void CAdvancedFrame::OnAccountManagerDetach(wxCommandEvent& WXUNUSED(event)) { pDoc->rpc.acct_mgr_info(ami); strTitle.Printf( - _("BOINC Manager - Detach from %s"), + _("%s - Detach from %s"), + pSkinAdvanced->GetApplicationName().c_str(), wxString(ami.acct_mgr_name.c_str(), wxConvUTF8).c_str() ); strMessage.Printf( diff --git a/clientgui/DlgAbout.h b/clientgui/DlgAbout.h index 94db42f436..a980c4049b 100644 --- a/clientgui/DlgAbout.h +++ b/clientgui/DlgAbout.h @@ -49,7 +49,7 @@ class wxHyperLink; ////@begin control identifiers #define ID_DIALOG 10000 #define SYMBOL_CDLGABOUT_STYLE wxDEFAULT_DIALOG_STYLE -#define SYMBOL_CDLGABOUT_TITLE _("About BOINC Manager") +#define SYMBOL_CDLGABOUT_TITLE wxT("") #define SYMBOL_CDLGABOUT_IDNAME ID_DIALOG #define SYMBOL_CDLGABOUT_SIZE wxSize(-1, -1) #define SYMBOL_CDLGABOUT_POSITION wxDefaultPosition diff --git a/clientgui/DlgAdvPreferencesBase.cpp b/clientgui/DlgAdvPreferencesBase.cpp index 1064c0322a..530d816573 100644 --- a/clientgui/DlgAdvPreferencesBase.cpp +++ b/clientgui/DlgAdvPreferencesBase.cpp @@ -5,24 +5,35 @@ // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif //__BORLANDC__ - -#ifndef WX_PRECOMP -#include -#endif //WX_PRECOMP +#include "stdwx.h" +#include "diagnostics.h" +#include "util.h" +#include "mfile.h" +#include "miofile.h" +#include "parse.h" +#include "LogBOINC.h" +#include "BOINCGUIApp.h" +#include "SkinManager.h" #include "DlgAdvPreferencesBase.h" /////////////////////////////////////////////////////////////////////////// -CDlgAdvPreferencesBase::CDlgAdvPreferencesBase( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : wxDialog( parent, id, title, pos, size, style ) +CDlgAdvPreferencesBase::CDlgAdvPreferencesBase( wxWindow* parent, int id, wxString title, wxPoint pos, wxSize size, int style ) : + wxDialog( parent, id, title, pos, size, style ) { - this->SetExtraStyle( wxWS_EX_VALIDATE_RECURSIVELY ); + wxString strCaption = title; + if (strCaption.IsEmpty()) { + CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); + wxASSERT(pSkinAdvanced); + wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced)); + + strCaption.Printf(_("%s - Preferences"), pSkinAdvanced->GetApplicationName().c_str()); + } + + this->SetExtraStyle( wxWS_EX_VALIDATE_RECURSIVELY ); this->Centre( wxBOTH ); + this->SetTitle(strCaption); wxBoxSizer* bSizer1; bSizer1 = new wxBoxSizer( wxVERTICAL ); diff --git a/clientgui/DlgAdvPreferencesBase.h b/clientgui/DlgAdvPreferencesBase.h index 598d74910e..ad5a75f4ce 100644 --- a/clientgui/DlgAdvPreferencesBase.h +++ b/clientgui/DlgAdvPreferencesBase.h @@ -200,7 +200,7 @@ class CDlgAdvPreferencesBase : public wxDialog wxButton* m_btnHelp; public: - CDlgAdvPreferencesBase( wxWindow* parent, int id = -1, wxString title = wxT("BOINC Manager - Preferences"), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 547,526 ), int style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + CDlgAdvPreferencesBase( wxWindow* parent, int id = -1, wxString title = wxT(""), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 547,526 ), int style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); }; diff --git a/clientgui/DlgOptions.cpp b/clientgui/DlgOptions.cpp index c820bc3bb3..f2ee1f9013 100644 --- a/clientgui/DlgOptions.cpp +++ b/clientgui/DlgOptions.cpp @@ -22,8 +22,15 @@ #endif #include "stdwx.h" +#include "diagnostics.h" +#include "util.h" +#include "mfile.h" +#include "miofile.h" +#include "parse.h" +#include "LogBOINC.h" #include "BOINCGUIApp.h" #include "DlgOptions.h" +#include "SkinManager.h" ////@begin includes ////@end includes @@ -100,9 +107,18 @@ bool CDlgOptions::Create(wxWindow* parent, wxWindowID id, const wxString& captio m_SOCKSPasswordCtrl = NULL; ////@end CDlgOptions member initialisation + wxString strCaption = caption; + if (strCaption.IsEmpty()) { + CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); + wxASSERT(pSkinAdvanced); + wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced)); + + strCaption.Printf(_("%s - Options"), pSkinAdvanced->GetApplicationName().c_str()); + } + ////@begin CDlgOptions creation SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); - wxDialog::Create( parent, id, caption, pos, size, style ); + wxDialog::Create( parent, id, strCaption, pos, size, style ); CreateControls(); GetSizer()->Fit(this); diff --git a/clientgui/DlgOptions.h b/clientgui/DlgOptions.h index 555bd71f72..8bcf8f3fa5 100644 --- a/clientgui/DlgOptions.h +++ b/clientgui/DlgOptions.h @@ -46,7 +46,7 @@ ////@begin control identifiers #define ID_DIALOG 10000 #define SYMBOL_CDLGOPTIONS_STYLE wxDEFAULT_DIALOG_STYLE -#define SYMBOL_CDLGOPTIONS_TITLE _("BOINC Manager - Options") +#define SYMBOL_CDLGOPTIONS_TITLE wxT("") #define SYMBOL_CDLGOPTIONS_IDNAME ID_DIALOG #define SYMBOL_CDLGOPTIONS_SIZE wxDefaultSize #define SYMBOL_CDLGOPTIONS_POSITION wxDefaultPosition diff --git a/clientgui/DlgSelectComputer.cpp b/clientgui/DlgSelectComputer.cpp index 1b0c76f7c5..931cae0092 100644 --- a/clientgui/DlgSelectComputer.cpp +++ b/clientgui/DlgSelectComputer.cpp @@ -22,8 +22,15 @@ #endif #include "stdwx.h" +#include "diagnostics.h" +#include "util.h" +#include "mfile.h" +#include "miofile.h" +#include "parse.h" +#include "LogBOINC.h" #include "BOINCGUIApp.h" #include "MainDocument.h" +#include "SkinManager.h" ////@begin includes ////@end includes @@ -76,9 +83,18 @@ bool CDlgSelectComputer::Create( wxWindow* parent, wxWindowID id, const wxString m_ComputerPasswordCtrl = NULL; ////@end CDlgSelectComputer member initialisation + wxString strCaption = caption; + if (strCaption.IsEmpty()) { + CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced(); + wxASSERT(pSkinAdvanced); + wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced)); + + strCaption.Printf(_("%s - Select Computer"), pSkinAdvanced->GetApplicationName().c_str()); + } + ////@begin CDlgSelectComputer creation SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); - wxDialog::Create( parent, id, caption, pos, size, style ); + wxDialog::Create( parent, id, strCaption, pos, size, style ); CreateControls(); GetSizer()->Fit(this); diff --git a/clientgui/DlgSelectComputer.h b/clientgui/DlgSelectComputer.h index ebbd645a1b..87f89a50bb 100644 --- a/clientgui/DlgSelectComputer.h +++ b/clientgui/DlgSelectComputer.h @@ -46,7 +46,7 @@ ////@begin control identifiers #define ID_DIALOG 10000 #define SYMBOL_CDLGSELECTCOMPUTER_STYLE wxDEFAULT_DIALOG_STYLE -#define SYMBOL_CDLGSELECTCOMPUTER_TITLE _("BOINC Manager - Select Computer") +#define SYMBOL_CDLGSELECTCOMPUTER_TITLE wxT("") #define SYMBOL_CDLGSELECTCOMPUTER_IDNAME ID_DIALOG #define SYMBOL_CDLGSELECTCOMPUTER_SIZE wxSize(400, 300) #define SYMBOL_CDLGSELECTCOMPUTER_POSITION wxDefaultPosition