diff --git a/client/win/res/icon.ico b/client/win/res/icon.ico index 2bc3437e09..3a0f88f28c 100644 Binary files a/client/win/res/icon.ico and b/client/win/res/icon.ico differ diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp index d1b7d17d16..f13f297e43 100644 --- a/clientgui/AdvancedFrame.cpp +++ b/clientgui/AdvancedFrame.cpp @@ -220,7 +220,7 @@ CAdvancedFrame::CAdvancedFrame(wxString title, wxIcon* icon, wxIcon* icon32, wxP // Initialize Application #ifdef __WXMSW__ - SetIcon(wxICON(APP_ICON)); + SetIcons(wxICON(BOINCGUIAPP)); #else wxIconBundle icons; icons.AddIcon(*icon); diff --git a/clientgui/BOINCGUIApp.rc b/clientgui/BOINCGUIApp.rc index f4b391935e..c41921d67f 100644 --- a/clientgui/BOINCGUIApp.rc +++ b/clientgui/BOINCGUIApp.rc @@ -1,6 +1,5 @@ // Microsoft Visual C++ generated resource script. // -#include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -22,28 +21,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -#if defined(_GRIDREPUBLIC) -APP_ICON ICON "res\\gridrepublic.ico" -#elif defined(_PROGRESSTHRUPROCESSORS) -APP_ICON ICON "res\\progress.ico" -#elif defined(_CHARITYENGINE) -APP_ICON ICON "res\\ce.ico" -#elif defined(_WCG) -APP_ICON ICON "res\\wcg.ico" -#else -APP_ICON ICON "res\\boincguiApp.ico" -#endif - -///////////////////////////////////////////////////////////////////////////// - - ///////////////////////////////////////////////////////////////////////////// #endif // Neutral resources @@ -75,6 +52,22 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Icon // +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +#if defined(_GRIDREPUBLIC) +BOINCGUIAPP ICON "res\\gridrepublic.ico" +#elif defined(_PROGRESSTHRUPROCESSORS) +BOINCGUIAPP ICON "res\\progress.ico" +#elif defined(_CHARITYENGINE) +BOINCGUIAPP ICON "res\\ce.ico" +#elif defined(_WCG) +BOINCGUIAPP ICON "res\\wcg.ico" +#else +BOINCGUIAPP ICON "res\\boincguiapp.ico" +#endif + +///////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////// // // Bitmap @@ -87,18 +80,13 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // 1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE BEGIN "#include \r\n" "#include ""win_config.h""\r\n" "\0" END -3 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "\0" END diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 3643d55c65..022099cb3f 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -555,21 +555,19 @@ int CMainDocument::OnExit() { int CMainDocument::OnPoll() { + CBOINCBaseFrame* pFrame = wxGetApp().GetFrame(); int iRetVal = 0; int otherInstanceID; wxString hostName = wxGetApp().GetClientHostNameArg(); - int portNum = wxGetApp().GetClientRPCPortArg(); wxString password = wxGetApp().GetClientPasswordArg(); + int portNum = wxGetApp().GetClientRPCPortArg(); wxASSERT(wxDynamicCast(m_pClientManager, CBOINCClientManager)); wxASSERT(wxDynamicCast(m_pNetworkConnection, CNetworkConnection)); - if (!m_bClientStartCheckCompleted) { + if (!m_bClientStartCheckCompleted && pFrame) { m_bClientStartCheckCompleted = true; - CBOINCBaseFrame* pFrame = wxGetApp().GetFrame(); - wxASSERT(wxDynamicCast(pFrame, CBOINCBaseFrame)); - if (IsComputerNameLocal(hostName)) { otherInstanceID = wxGetApp().IsAnotherInstanceRunning(); if (otherInstanceID) { diff --git a/clientgui/res/BOINCGUIApp.ico b/clientgui/res/BOINCGUIApp.ico index 2bc3437e09..3a0f88f28c 100644 Binary files a/clientgui/res/BOINCGUIApp.ico and b/clientgui/res/BOINCGUIApp.ico differ diff --git a/clientgui/resource.h b/clientgui/resource.h index 4470166293..ecc55ad0de 100644 --- a/clientgui/resource.h +++ b/clientgui/resource.h @@ -2,8 +2,7 @@ // Microsoft Visual C++ generated include file. // Used by BOINCGUIApp.rc // -#define APP_ICON 0 -#define APP_ICON2 1 +#define ICON_BOINCGUIAPP 0 // Next default values for new objects // diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp index 780efd11bd..caa8a79015 100755 --- a/clientgui/sg_BoincSimpleFrame.cpp +++ b/clientgui/sg_BoincSimpleFrame.cpp @@ -96,7 +96,7 @@ CSimpleFrame::CSimpleFrame(wxString title, wxIcon* icon, wxIcon* icon32, wxPoint // Initialize Application #ifdef __WXMSW__ - SetIcon(wxICON(APP_ICON)); + SetIcons(wxICON(BOINCGUIAPP)); #else wxIconBundle icons; icons.AddIcon(*icon); diff --git a/clientscr/res/icon.ico b/clientscr/res/icon.ico index 2bc3437e09..3a0f88f28c 100644 Binary files a/clientscr/res/icon.ico and b/clientscr/res/icon.ico differ