diff --git a/checkin_notes b/checkin_notes index e9b6f68766..3f04eec41e 100755 --- a/checkin_notes +++ b/checkin_notes @@ -11836,3 +11836,15 @@ Rom 20 Oct 2006 sg_DlgPreferences.cpp sg_ViewTabPage.cpp, .h +Charlie 29 Oct 2006 + - Mac: Work around Simple GUI problem drawing background bitmaps on + Erase events; use a wxStaticBitmap instead. + - Mac: more changes to XCode project to better build Simple GUI. + + clientgui/ + BOINCGUIApp.cpp + sg_BoincSimpleGUI.cpp, h + sg_DlgPreferences.cpp, h + mac_build/ + boinc.xcodeproj/ + project.pbxproj diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index f2c1e91ffa..6ac5e81247 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -926,11 +926,6 @@ void CBOINCGUIApp::FireReloadSkin() { if (m_pTaskBarIcon) { m_pTaskBarIcon->FireReloadSkin(); } -#ifdef __WXMAC__ -// if (m_pMacSystemMenu) { -// m_pMacSystemMenu->BuildMenu(); -// } -#endif } diff --git a/clientgui/sg_BoincSimpleGUI.cpp b/clientgui/sg_BoincSimpleGUI.cpp index 6b5a91903d..8163bc1cfd 100644 --- a/clientgui/sg_BoincSimpleGUI.cpp +++ b/clientgui/sg_BoincSimpleGUI.cpp @@ -55,7 +55,9 @@ IMPLEMENT_DYNAMIC_CLASS(CSimpleFrame, CBOINCBaseFrame) BEGIN_EVENT_TABLE(CSimpleFrame, CBOINCBaseFrame) EVT_SIZE(CSimpleFrame::OnSize) - EVT_ERASE_BACKGROUND(CSimpleFrame::OnEraseBackground) +#ifndef __WXMAC__ + EVT_ERASE_BACKGROUND(CSimpleFrame::OnEraseBackground) +#endif EVT_FRAME_CONNECT(CSimpleFrame::OnConnect) EVT_FRAME_RELOADSKIN(CSimpleFrame::OnReloadSkin) EVT_TIMER(ID_SIMPLEFRAMERENDERTIMER, CSimpleFrame::OnFrameRender) @@ -69,7 +71,12 @@ CSimpleFrame::CSimpleFrame() { CSimpleFrame::CSimpleFrame(wxString title, wxIcon* icon) : - CBOINCBaseFrame((wxFrame *)NULL, ID_SIMPLEFRAME, title, wxDefaultPosition, wxSize(416, 570), + CBOINCBaseFrame((wxFrame *)NULL, ID_SIMPLEFRAME, title, wxDefaultPosition, +#ifdef __WXMAC__ + wxSize(409, 561), +#else + wxSize(416, 570), +#endif wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE) { wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::CSimpleFrame - Overloaded Constructor Function Begin")); @@ -273,6 +280,9 @@ void CSimpleFrame::OnReloadSkin(CFrameEvent& WXUNUSED(event)) { wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnReloadSkin - Function Start")); CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple(); +#ifdef __WXMAC__ + m_pBackground_Bmp->SetBitmap(*pSkinSimple->GetBackgroundImage()->GetBitmap()); +#endif wxASSERT(pSkinSimple); wxASSERT(wxDynamicCast(pSkinSimple, CSkinSimple)); @@ -395,6 +405,10 @@ void CSimpleFrame::InitEmptyView() //Set Background color SetBackgroundColour(*pSkinSimple->GetBackgroundImage()->GetBackgroundColor()); +#ifdef __WXMAC__ + m_pBackground_Bmp = new wxStaticBitmap(this, wxID_ANY, *pSkinSimple->GetBackgroundImage()->GetBitmap()); +#endif + // Flex Grid Sizer mainSizer = new wxFlexGridSizer(3,2); SetSizer(mainSizer); diff --git a/clientgui/sg_BoincSimpleGUI.h b/clientgui/sg_BoincSimpleGUI.h index 8d9dbdeffd..55c8bdcd71 100644 --- a/clientgui/sg_BoincSimpleGUI.h +++ b/clientgui/sg_BoincSimpleGUI.h @@ -80,7 +80,9 @@ public: wxBitmap *bm39cImg0; wxBitmap *btmpIcnSleeping; - + #ifdef __WXMAC__ + wxStaticBitmap* m_pBackground_Bmp; +#endif wxTimer* m_pFrameRenderTimer; DECLARE_EVENT_TABLE() diff --git a/clientgui/sg_DlgPreferences.cpp b/clientgui/sg_DlgPreferences.cpp index 1ec10803ad..80ef428df4 100644 --- a/clientgui/sg_DlgPreferences.cpp +++ b/clientgui/sg_DlgPreferences.cpp @@ -186,7 +186,9 @@ IMPLEMENT_DYNAMIC_CLASS( CDlgPreferences, wxDialog ) BEGIN_EVENT_TABLE( CDlgPreferences, wxDialog ) ////@begin CDlgPreferences event table entries +#ifndef __WXMAC__ EVT_ERASE_BACKGROUND( CDlgPreferences::OnEraseBackground ) +#endif EVT_CHECKBOX( ID_CUSTOMIZEPREFERENCES, CDlgPreferences::OnCustomizePreferencesClick ) EVT_BUTTON( wxID_OK, CDlgPreferences::OnOK ) ////@end CDlgPreferences event table entries @@ -267,6 +269,10 @@ void CDlgPreferences::CreateControls() CDlgPreferences* itemDialog1 = this; +#ifdef __WXMAC__ + // wxStaticBitmap* background_bmp = + new wxStaticBitmap( itemDialog1, wxID_ANY, *pSkinSimple->GetPreferencesDialogBackgroundImage()->GetBitmap() ); +#endif wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); itemDialog1->SetSizer(itemBoxSizer2); diff --git a/mac_build/boinc.xcodeproj/project.pbxproj b/mac_build/boinc.xcodeproj/project.pbxproj index 72f6146351..1fd106087b 100755 --- a/mac_build/boinc.xcodeproj/project.pbxproj +++ b/mac_build/boinc.xcodeproj/project.pbxproj @@ -985,7 +985,7 @@ DD344BEE07C5B1770043025C /* proxy_info.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = proxy_info.h; path = ../lib/proxy_info.h; sourceTree = SOURCE_ROOT; }; DD344BEF07C5B1770043025C /* proxy_info.C */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = proxy_info.C; path = ../lib/proxy_info.C; sourceTree = SOURCE_ROOT; }; DD35353107E1E05C00C4718D /* libboinc_api.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libboinc_api.a; sourceTree = BUILT_PRODUCTS_DIR; }; - DD3E15420A774397007E0084 /* sgBOINCManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = sgBOINCManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; + DD3E15420A774397007E0084 /* BOINCManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BOINCManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; DD407A4A07D2FB1200163EF5 /* libboinc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libboinc.a; sourceTree = BUILT_PRODUCTS_DIR; }; DD407AB707D2FC7D00163EF5 /* mem_usage.C */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = mem_usage.C; path = ../lib/mem_usage.C; sourceTree = SOURCE_ROOT; }; DD407AB807D2FC7D00163EF5 /* mem_usage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = mem_usage.h; path = ../lib/mem_usage.h; sourceTree = SOURCE_ROOT; }; @@ -1395,7 +1395,7 @@ DDD0953F0A3EDD2500C95BA4 /* switcher */, DD1AFEBA0A512D8700EE5B82 /* BOINC Installer.app */, DDFF2AD30A53D4AE002BC19D /* setprojectgrp */, - DD3E15420A774397007E0084 /* sgBOINCManager.app */, + DD3E15420A774397007E0084 /* BOINCManager.app */, DDD997D80AC3D1DD00D0DACF /* AppStats */, ); name = Products; @@ -1943,7 +1943,7 @@ ); name = sg_mgr_boinc; productName = mgr_boinc; - productReference = DD3E15420A774397007E0084 /* sgBOINCManager.app */; + productReference = DD3E15420A774397007E0084 /* BOINCManager.app */; productType = "com.apple.product-type.application"; }; DD407A4907D2FB1200163EF5 /* libboinc */ = { @@ -2300,14 +2300,14 @@ files = ( ); inputPaths = ( - "${BUILT_PRODUCTS_DIR}/sgBOINCManager.app/Contents/MacOS/sgBOINCManager", + "${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager", ); outputPaths = ( "${BUILT_PRODUCTS_DIR}/SymbolTables/sgBOINCManager", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "mv \"${BUILT_PRODUCTS_DIR}/sgBOINCManager.app/Contents/MacOS/sgBOINCManager\" \"${BUILT_PRODUCTS_DIR}/sgBOINCManager.app/Contents/MacOS/BOINCManager\"\n\nif [ \"$BUILD_STYLE\" = \"i386_Deployment\" ] || [ \"$BUILD_STYLE\" = \"ppc_Deployment\" ] || [ \"$BUILD_STYLE\" = \"Deployment\" ]; then\n mkdir \"${BUILT_PRODUCTS_DIR}/SymbolTables\"\n lipo \"${BUILT_PRODUCTS_DIR}/sgBOINCManager.app/Contents/MacOS/BOINCManager\" -thin i386 -output \"$TARGET_BUILD_DIR/SymbolTables/sgBOINCManager_i386\"\n lipo \"${BUILT_PRODUCTS_DIR}/sgBOINCManager.app/Contents/MacOS/BOINCManager\" -thin ppc -output \"$TARGET_BUILD_DIR/SymbolTables/sgBOINCManager_ppc\"\n /usr/bin/strip \"${BUILT_PRODUCTS_DIR}/sgBOINCManager.app/Contents/MacOS/BOINCManager\"\nfi\n"; + shellScript = "if [ \"$BUILD_STYLE\" = \"i386_Deployment\" ] || [ \"$BUILD_STYLE\" = \"ppc_Deployment\" ] || [ \"$BUILD_STYLE\" = \"Deployment\" ]; then\n mkdir \"${BUILT_PRODUCTS_DIR}/SymbolTables\"\n lipo \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\" -thin i386 -output \"$TARGET_BUILD_DIR/SymbolTables/sgBOINCManager_i386\"\n lipo \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\" -thin ppc -output \"$TARGET_BUILD_DIR/SymbolTables/sgBOINCManager_ppc\"\n /usr/bin/strip \"${BUILT_PRODUCTS_DIR}/sgBOINCManager.app/Contents/MacOS/BOINCManager\"\nfi\n"; }; DD3E15380A774397007E0084 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2335,7 +2335,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "chown -R ${USER}:${GROUP} \"${BUILT_PRODUCTS_DIR}/sgBOINCManager.app\"\nchmod g+s \"${BUILT_PRODUCTS_DIR}/sgBOINCManager.app/Contents/MacOS/BOINCManager\"\nchmod u+s,g+s \"${BUILT_PRODUCTS_DIR}/sgBOINCManager.app/Contents/Resources/boinc\"\n"; + shellScript = "chown -R ${USER}:${GROUP} \"${BUILT_PRODUCTS_DIR}/BOINCManager.app\"\nchmod g+s \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager\"\nchmod u+s,g+s \"${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/Resources/boinc\"\n"; }; DD46A43A088D1BEE00052C57 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -2358,10 +2358,10 @@ files = ( ); inputPaths = ( - "${BUILT_PRODUCTS_DIR}/sgBOINCManager.app/Contents/MacOS/BOINCManager", + "${BUILT_PRODUCTS_DIR}/BOINCManager.app/Contents/MacOS/BOINCManager", ); outputPaths = ( - "${BUILT_PRODUCTS_DIR}/SymbolTables/BOINCManager_i386", + "${BUILT_PRODUCTS_DIR}/SymbolTables/sgBOINCManager_i386", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -3263,7 +3263,7 @@ "-lm", ); OTHER_REZFLAGS = ""; - PRODUCT_NAME = sgBOINCManager; + PRODUCT_NAME = BOINCManager; SECTORDER_FLAGS = ""; SKIP_INSTALL = NO; UNSTRIPPED_PRODUCT = YES; @@ -3322,7 +3322,7 @@ "-lm", ); OTHER_REZFLAGS = ""; - PRODUCT_NAME = sgBOINCManager; + PRODUCT_NAME = BOINCManager; SECTORDER_FLAGS = ""; SKIP_INSTALL = NO; UNSTRIPPED_PRODUCT = YES; @@ -3381,7 +3381,7 @@ "-lm", ); OTHER_REZFLAGS = ""; - PRODUCT_NAME = sgBOINCManager; + PRODUCT_NAME = BOINCManager; SECTORDER_FLAGS = ""; SKIP_INSTALL = NO; UNSTRIPPED_PRODUCT = YES; @@ -3441,7 +3441,7 @@ "-lm", ); OTHER_REZFLAGS = ""; - PRODUCT_NAME = sgBOINCManager; + PRODUCT_NAME = BOINCManager; SECTORDER_FLAGS = ""; SKIP_INSTALL = NO; UNSTRIPPED_PRODUCT = YES; @@ -4511,7 +4511,7 @@ "-lm", ); OTHER_REZFLAGS = ""; - PRODUCT_NAME = sgBOINCManager; + PRODUCT_NAME = BOINCManager; SECTORDER_FLAGS = ""; SKIP_INSTALL = NO; UNSTRIPPED_PRODUCT = YES; @@ -4570,7 +4570,7 @@ "-lm", ); OTHER_REZFLAGS = ""; - PRODUCT_NAME = sgBOINCManager; + PRODUCT_NAME = BOINCManager; SECTORDER_FLAGS = ""; SKIP_INSTALL = NO; UNSTRIPPED_PRODUCT = YES;