From 7551e0f831de5d15c3ba728b2279bf66c7733616 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Thu, 24 Oct 2013 13:09:54 -0400 Subject: [PATCH] MGR: Add an Android icon to the list of supported platforms for a project that supports Android in the attach wizard. --- clientgui/ProjectInfoPage.cpp | 22 +++++++++++- clientgui/ProjectInfoPage.h | 1 + clientgui/res/androidicon.xpm | 40 +++++++++++++++++++++ clientgui/res/templates/google_android.gif | Bin 0 -> 943 bytes win_build/boincmgr.vcxproj | 1 + 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 clientgui/res/androidicon.xpm create mode 100644 clientgui/res/templates/google_android.gif diff --git a/clientgui/ProjectInfoPage.cpp b/clientgui/ProjectInfoPage.cpp index 3a52ad5613..cc6c753dbb 100644 --- a/clientgui/ProjectInfoPage.cpp +++ b/clientgui/ProjectInfoPage.cpp @@ -45,6 +45,7 @@ #include "res/freebsdicon.xpm" #include "res/atiicon.xpm" #include "res/nvidiaicon.xpm" +#include "res/androidicon.xpm" #include "res/blankicon.xpm" @@ -63,6 +64,7 @@ class CProjectInfo : public wxObject m_bProjectSupportsFreeBSD = false; m_bProjectSupportsCUDA = false; m_bProjectSupportsCAL = false; + m_bProjectSupportsAndroid = false; } public: @@ -79,6 +81,7 @@ public: bool m_bProjectSupportsFreeBSD; bool m_bProjectSupportsCUDA; bool m_bProjectSupportsCAL; + bool m_bProjectSupportsAndroid; }; IMPLEMENT_DYNAMIC_CLASS( CProjectInfo, wxObject ) @@ -164,6 +167,7 @@ bool CProjectInfoPage::Create( CBOINCBaseWizard* parent ) m_pProjectDetailsSupportedPlatformFreeBSDCtrl = NULL; m_pProjectDetailsSupportedPlatformATICtrl = NULL; m_pProjectDetailsSupportedPlatformNvidiaCtrl = NULL; + m_pProjectDetailsSupportedPlatformAndroidCtrl = NULL; m_pProjectDetailsSupportedPlatformBlankCtrl = NULL; m_pProjectURLStaticCtrl = NULL; m_pProjectURLCtrl = NULL; @@ -313,6 +317,9 @@ void CProjectInfoPage::CreateControls() m_pProjectDetailsSupportedPlatformNvidiaCtrl = new wxStaticBitmap( itemWizardPage23, wxID_STATIC, GetBitmapResource(wxT("nvidiaicon.xpm")), wxDefaultPosition, wxSize(16,16), 0 ); itemBoxSizer26->Add(m_pProjectDetailsSupportedPlatformNvidiaCtrl, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5); + m_pProjectDetailsSupportedPlatformAndroidCtrl = new wxStaticBitmap( itemWizardPage23, wxID_STATIC, GetBitmapResource(wxT("androidicon.xpm")), wxDefaultPosition, wxSize(16,16), 0 ); + itemBoxSizer26->Add(m_pProjectDetailsSupportedPlatformNvidiaCtrl, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5); + m_pProjectDetailsSupportedPlatformBlankCtrl = new wxStaticBitmap( itemWizardPage23, wxID_STATIC, GetBitmapResource(wxT("blankicon.xpm")), wxDefaultPosition, wxSize(16,16), 0 ); itemBoxSizer26->Add(m_pProjectDetailsSupportedPlatformBlankCtrl, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5); @@ -411,6 +418,11 @@ wxBitmap CProjectInfoPage::GetBitmapResource( const wxString& name ) wxBitmap bitmap(nvidiaicon_xpm); return bitmap; } + else if (name == wxT("androidicon.xpm")) + { + wxBitmap bitmap(androidicon_xpm); + return bitmap; + } else if (name == wxT("blankicon.xpm")) { wxBitmap bitmap(blankicon_xpm); @@ -504,12 +516,14 @@ void CProjectInfoPage::OnProjectSelected( wxCommandEvent& WXUNUSED(event) ) { m_pProjectDetailsSupportedPlatformFreeBSDCtrl->Hide(); m_pProjectDetailsSupportedPlatformATICtrl->Hide(); m_pProjectDetailsSupportedPlatformNvidiaCtrl->Hide(); + m_pProjectDetailsSupportedPlatformAndroidCtrl->Hide(); if (pProjectInfo->m_bProjectSupportsWindows) m_pProjectDetailsSupportedPlatformWindowsCtrl->Show(); if (pProjectInfo->m_bProjectSupportsMac) m_pProjectDetailsSupportedPlatformMacCtrl->Show(); if (pProjectInfo->m_bProjectSupportsLinux) m_pProjectDetailsSupportedPlatformLinuxCtrl->Show(); if (pProjectInfo->m_bProjectSupportsFreeBSD) m_pProjectDetailsSupportedPlatformFreeBSDCtrl->Show(); if (pProjectInfo->m_bProjectSupportsCAL) m_pProjectDetailsSupportedPlatformATICtrl->Show(); if (pProjectInfo->m_bProjectSupportsCUDA) m_pProjectDetailsSupportedPlatformNvidiaCtrl->Show(); + if (pProjectInfo->m_bProjectSupportsAndroid) m_pProjectDetailsSupportedPlatformAndroidCtrl->Show(); // Populate non-control data for use in other places of the wizard SetProjectURL( pProjectInfo->m_strURL ); @@ -576,6 +590,7 @@ void CProjectInfoPage::OnPageChanged( wxWizardExEvent& event ) { wxASSERT(m_pProjectDetailsSupportedPlatformFreeBSDCtrl); wxASSERT(m_pProjectDetailsSupportedPlatformATICtrl); wxASSERT(m_pProjectDetailsSupportedPlatformNvidiaCtrl); + wxASSERT(m_pProjectDetailsSupportedPlatformAndroidCtrl); wxASSERT(m_pProjectURLStaticCtrl); wxASSERT(m_pProjectURLCtrl); @@ -699,6 +714,10 @@ void CProjectInfoPage::OnPageChanged( wxWizardExEvent& event ) { pProjectInfo->m_bProjectSupportsFreeBSD = true; } + if (strProjectPlatform.Find(_T("android")) != wxNOT_FOUND) { + pProjectInfo->m_bProjectSupportsAndroid = true; + } + if (strProjectPlatform.Find(_T("[cuda")) != wxNOT_FOUND) { pProjectInfo->m_bProjectSupportsCUDA = true; if (!pDoc->state.host_info.coprocs.have_nvidia()) continue; @@ -723,13 +742,14 @@ void CProjectInfoPage::OnPageChanged( wxWizardExEvent& event ) { wxLogTrace( wxT("Function Status"), - wxT("CProjectInfoPage::OnPageChanged - Windows: '%d', Mac: '%d', Linux: '%d', FreeBSD: '%d', Nvidia: '%d', ATI: '%d', Platform: '%d'"), + wxT("CProjectInfoPage::OnPageChanged - Windows: '%d', Mac: '%d', Linux: '%d', FreeBSD: '%d', Nvidia: '%d', ATI: '%d', Android: '%d', Platform: '%d'"), pProjectInfo->m_bProjectSupportsWindows, pProjectInfo->m_bProjectSupportsMac, pProjectInfo->m_bProjectSupportsLinux, pProjectInfo->m_bProjectSupportsFreeBSD, pProjectInfo->m_bProjectSupportsCUDA, pProjectInfo->m_bProjectSupportsCAL, + pProjectInfo->m_bProjectSupportsAndroid, pProjectInfo->m_bSupportedPlatformFound ); } diff --git a/clientgui/ProjectInfoPage.h b/clientgui/ProjectInfoPage.h index 14e78b13c1..e6041b8e5e 100644 --- a/clientgui/ProjectInfoPage.h +++ b/clientgui/ProjectInfoPage.h @@ -129,6 +129,7 @@ public: wxStaticBitmap* m_pProjectDetailsSupportedPlatformFreeBSDCtrl; wxStaticBitmap* m_pProjectDetailsSupportedPlatformATICtrl; wxStaticBitmap* m_pProjectDetailsSupportedPlatformNvidiaCtrl; + wxStaticBitmap* m_pProjectDetailsSupportedPlatformAndroidCtrl; wxStaticBitmap* m_pProjectDetailsSupportedPlatformBlankCtrl; wxStaticText* m_pProjectURLStaticCtrl; wxTextCtrl* m_pProjectURLCtrl; diff --git a/clientgui/res/androidicon.xpm b/clientgui/res/androidicon.xpm new file mode 100644 index 0000000000..95b88c5fb1 --- /dev/null +++ b/clientgui/res/androidicon.xpm @@ -0,0 +1,40 @@ +/* XPM */ +static char *androidicon_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 18 1", +"@ c #CCD599", +" c None", +"; c #CCD5CC", +"o c #99AA00", +", c #66AA33", +"> c #FFD5CC", +"O c #99AA33", +"= c #99FF66", +": c #CCAA33", +"$ c #99D500", +"* c #CCFF66", +"+ c #99D533", +"- c #CCFF99", +"& c #CCD533", +"# c #99D566", +"X c #CCFFCC", +"% c #CCD566", +". c #FFFFCC", +/* pixels */ +" . .. ", +" XoOOo+ ", +" o@+++@o ", +" #O+OO+O$X ", +" %%%#%#%%#%@oX ", +" O+%O+O+O+O%O% ", +" +O%+O+O+O+%+@ ", +" +O%+O&+O&O%O* ", +" #+%O++O++O=O@ ", +" O+%+O&O+O+%O* ", +" %O%O+O+O&O-o; ", +" #+O++O+O- ", +" %O+:#&O+> ", +" o- @o ", +" .o@ -,. ", +" +X >+ " +}; diff --git a/clientgui/res/templates/google_android.gif b/clientgui/res/templates/google_android.gif new file mode 100644 index 0000000000000000000000000000000000000000..50c53d8f65d6b1cb66b73444bf86fc1835bb349c GIT binary patch literal 943 zcmXYw!HW;=!A_Dmo$37g8)sM2iwi7&4a*f)p=AM2R|7mq9&>A{)g= ziG`Uqb&&GBH`zn)5W@67bYEBm;W=B)WtjP3zW4p!o0IRIc=N6EyRZwJ_-_S3AOQhJ z0ZO0{B~gT8RG|DMgv-)5iQY#W^|wjI?)qd=*9p>U=SlQgyH!%95CU81Xf>qbQ1_B5Fis)QqaAj)rIvjnOiiqB%OEM|4Kd=!)(bh!HUuBV#Cr z!w5&1;S4K0bAZdd$5x|*~M-S za0CZAl0zJ(K?hAbY0(qGBpwMSGNDN%3$jEOX2~qd;;hITS(!DnDyy?0TV!Ll%%*J4 zj_i@0*)zMcI|p(^4(7-l%HcH9k!Cv6N>BRJ><}oVplOB*R6>O+sUj7tLN!#WnyON@ z8q`9KYN;kQt3y51sh;Xmw+1vqgBqzJ4a<;2rkt{5Zv|nxF_BDNvpAzr;1Vu$Nf)`; z6|Uh**L0Pu-QX5(bW1n6*&XiTPWN<|yFK6$9`r~Ld2BVCL7Q$*)%$NeEiMg&W+E0S$+4` z_dgt7Iq`J&>#K)upIA z^yT8`7e4v(-aD7q7LQz^POTqZ{^O_9KYnok*xd^&dv*5j_cz|y`FL^9y$`Q0Y%X8C RcIMKd+Z(SQd}TY9UI2Oaxv2mE literal 0 HcmV?d00001 diff --git a/win_build/boincmgr.vcxproj b/win_build/boincmgr.vcxproj index 5a13deeada..faf12ae187 100644 --- a/win_build/boincmgr.vcxproj +++ b/win_build/boincmgr.vcxproj @@ -290,6 +290,7 @@ +