From 0bf0c6e818b8fcd5fba899abb8d39db8ccb4ca48 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 18 Nov 2009 16:50:05 +0000 Subject: [PATCH] - MGR: Add descriptions for each project as a tooltip and add an icon for multicore capable projects. clientgui/ ProjectListCtrl.cpp, .h clientgui/res/ multicore.xpm (Added) win_build/ boincmgr.vcproj svn path=/trunk/boinc/; revision=19600 --- checkin_notes | 11 ++ clientgui/ProjectListCtrl.cpp | 59 +++++++-- clientgui/ProjectListCtrl.h | 1 + clientgui/res/externalweblink.xpm | 46 ++++--- clientgui/res/multicore.xpm | 130 ++++++++++++++++++++ clientgui/res/templates/atiicon.bmp | Bin 0 -> 822 bytes clientgui/res/templates/externalweblink.gif | Bin 102 -> 887 bytes clientgui/res/templates/multicore.bmp | Bin 0 -> 822 bytes clientgui/res/templates/nvidiaicon.bmp | Bin 0 -> 822 bytes win_build/boincmgr.vcproj | 4 + 10 files changed, 222 insertions(+), 29 deletions(-) create mode 100644 clientgui/res/multicore.xpm create mode 100644 clientgui/res/templates/atiicon.bmp create mode 100644 clientgui/res/templates/multicore.bmp create mode 100644 clientgui/res/templates/nvidiaicon.bmp diff --git a/checkin_notes b/checkin_notes index 664396683c..7823330c88 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9329,3 +9329,14 @@ Charlie 18 Nov 2009 boinc.xcodeproj/ project.pbxproj WaitPermissions-Info.plist (Added) + +Rom 18 Nov 2009 + - MGR: Add descriptions for each project as a tooltip and add + an icon for multicore capable projects. + + clientgui/ + ProjectListCtrl.cpp, .h + clientgui/res/ + multicore.xpm (Added) + win_build/ + boincmgr.vcproj diff --git a/clientgui/ProjectListCtrl.cpp b/clientgui/ProjectListCtrl.cpp index 78b4a959f1..de0fa12cd3 100644 --- a/clientgui/ProjectListCtrl.cpp +++ b/clientgui/ProjectListCtrl.cpp @@ -28,6 +28,7 @@ #include "res/externalweblink.xpm" #include "res/nvidiaicon.xpm" #include "res/atiicon.xpm" +#include "res/multicore.xpm" ////@end XPM images @@ -411,7 +412,6 @@ CProjectListCtrl::~CProjectListCtrl( ) delete m_accessible; } } - #endif /*! @@ -421,6 +421,7 @@ CProjectListCtrl::~CProjectListCtrl( ) bool CProjectListCtrl::Create( wxWindow* parent ) { ////@begin CProjectListCtrl member initialisation + m_pTipWindow = NULL; ////@end CProjectListCtrl member initialisation ////@begin CProjectListCtrl creation @@ -437,7 +438,9 @@ bool CProjectListCtrl::Create( wxWindow* parent ) wxMemoryFSHandler::AddFile(wxT("webexternallink.xpm"), wxBitmap(externalweblink_xpm), wxBITMAP_TYPE_XPM); wxMemoryFSHandler::AddFile(wxT("nvidiaicon.xpm"), wxBitmap(nvidiaicon_xpm), wxBITMAP_TYPE_XPM); wxMemoryFSHandler::AddFile(wxT("atiicon.xpm"), wxBitmap(atiicon_xpm), wxBITMAP_TYPE_XPM); + wxMemoryFSHandler::AddFile(wxT("multicore.xpm"), wxBitmap(multicore_xpm), wxBITMAP_TYPE_XPM); ////@end CProjectListCtrl creation + return TRUE; } @@ -486,6 +489,36 @@ void CProjectListCtrl::OnLinkClicked( wxHtmlLinkEvent& event ) void CProjectListCtrl::OnHover( wxHtmlCellEvent& event ) { + wxString buf = wxEmptyString; + wxHtmlCell* cell = NULL; + wxRect rc; + wxPoint p; + unsigned long i = 0; + + // Get which item in the list control this event belongs to. + cell = event.GetCell(); + cell = cell->GetRootCell(); + cell->GetId().ToULong(&i); + + // Determine bounding rect for new tooltip + GetScreenPosition(&p.x, &p.y); + p.y += cell->GetHeight() * i; + + rc.SetPosition(p); + rc.SetHeight(cell->GetHeight()); + rc.SetWidth(cell->GetWidth()); + + // Construct the tooltip text + if (!m_Items[i]->GetOrganization().IsEmpty()) { + buf += m_Items[i]->GetOrganization() + wxT("\n\n"); + } + buf += m_Items[i]->GetDescription(); + + // Display tooltip + if (!m_pTipWindow) { + m_pTipWindow = new wxTipWindow(this, buf, 250, &m_pTipWindow, &rc); + } + event.Skip(); } @@ -495,31 +528,39 @@ wxString CProjectListCtrl::OnGetItem(size_t i) const wxString retval = wxEmptyString; wxString buf = wxEmptyString; - retval += wxT(" "); - retval += wxT(" "); + if (m_Items[i]->IsNvidiaGPUSupported() || m_Items[i]->IsATIGPUSupported()) { + retval += wxT("
"); + } else { + retval += wxT("
"); + } + retval += wxT(""); buf.Printf( - wxT(" "), + wxT(""), m_Items[i]->GetTitle().c_str() ); retval += buf; + if (m_Items[i]->IsMulticoreSupported()) { + retval += wxT(""); + } + if (m_Items[i]->IsNvidiaGPUSupported()) { - retval += wxT(" "); + retval += wxT(""); } if (m_Items[i]->IsATIGPUSupported()) { - retval += wxT(" "); + retval += wxT(""); } buf.Printf( - wxT(" "), + wxT(""), m_Items[i]->GetURL().c_str() ); retval += buf; - retval += wxT(" "); - retval += wxT("
%s%s
"); + retval += wxT(""); + retval += wxT(""); return retval; } diff --git a/clientgui/ProjectListCtrl.h b/clientgui/ProjectListCtrl.h index 9daac63917..e463b420ad 100644 --- a/clientgui/ProjectListCtrl.h +++ b/clientgui/ProjectListCtrl.h @@ -182,6 +182,7 @@ public: private: std::vector m_Items; + wxTipWindow *m_pTipWindow; #ifdef __WXMAC__ CProjectListCtrlAccessible* m_accessible; diff --git a/clientgui/res/externalweblink.xpm b/clientgui/res/externalweblink.xpm index 31829a7f43..63c902ac84 100644 --- a/clientgui/res/externalweblink.xpm +++ b/clientgui/res/externalweblink.xpm @@ -16,26 +16,32 @@ // along with BOINC. If not, see . /* XPM */ -static const char *externalweblink_xpm[] = { +static char *externalweblink_xpm[] = { /* columns rows colors chars-per-pixel */ -"12 12 6 1", -" c #FFFFFF", -"+ c #99CCFF", -"X c #3399CC", -"o c #6699CC", -"O c #0066CC", -". c #0066FF", +"16 16 8 1", +" c None", +"@ c #99D5FF", +"+ c #0055CC", +"o c #33AACC", +". c #0055FF", +"O c #66AACC", +"# c #0080CC", +"X c #0080FF", /* pixels */ -" ", -" ...... ", -" Xo . ", -" .X . ", -" OOOO.+ . ", -" O .+ +X . ", -" O .+ +..o. ", -" O +o+.O X ", -" O +. O ", -" O O ", -" OOOOOOO ", -" " +" ", +" ", +" ", +" ..X... ", +" oO . ", +" .o . ", +" ++++.@ . ", +" + .@ @o . ", +" + .@ @..O. ", +" + @O@.+ o ", +" + @. + ", +" + + ", +" #++++#+ ", +" ", +" ", +" " }; diff --git a/clientgui/res/multicore.xpm b/clientgui/res/multicore.xpm new file mode 100644 index 0000000000..d77fbe024e --- /dev/null +++ b/clientgui/res/multicore.xpm @@ -0,0 +1,130 @@ +// This file is part of BOINC. +// http://boinc.berkeley.edu +// Copyright (C) 2008 University of California +// +// BOINC is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. +// +// BOINC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with BOINC. If not, see . + +/* XPM */ +static char *multicore_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 91 1", +"O c Black", +"s c #CACACA", +"p c #2D2D2D", +"A c #3C3C3C", +"W c #4B4B4B", +"- c #080808", +"b c #353535", +" c None", +"^ c #444444", +"4 c #535353", +"5 c #717171", +"+ c #010101", +"R c #101010", +"w c #1F1F1F", +") c #2E2E2E", +"h c #A6A6A6", +"G c #B5B5B5", +"* c #D3D3D3", +"2 c #272727", +"a c #909090", +"% c #020202", +"d c #3E3E3E", +"y c #6B6B6B", +"C c #7A7A7A", +"q c #898989", +"T c #A7A7A7", +"J c #0A0A0A", +"' c #282828", +"6 c #373737", +"U c #464646", +"; c #555555", +"~ c #737373", +"x c #919191", +"r c #A0A0A0", +"Q c #AFAFAF", +"Z c #BEBEBE", +"3 c #030303", +"1 c #121212", +"z c #303030", +"F c #FAFAFA", +"X c #3F3F3F", +"B c #6C6C6C", +"9 c #A8A8A8", +"f c #0B0B0B", +"# c #383838", +"u c #474747", +"= c #040404", +"` c #CECECE", +"v c #131313", +"L c #FBFBFB", +"7 c #404040", +"Y c #4F4F4F", +"D c #0C0C0C", +": c #2A2A2A", +"M c #393939", +"l c #484848", +"K c #575757", +"_ c #757575", +"! c #B1B1B1", +"j c #050505", +"$ c #141414", +"o c #232323", +"g c #323232", +". c #FCFCFC", +"0 c #6E6E6E", +"< c #AAAAAA", +"N c #1C1C1C", +"[ c #3A3A3A", +", c #494949", +"> c #060606", +"/ c #D0D0D0", +"S c #151515", +"i c #333333", +"] c #424242", +"8 c #515151", +"H c #7E7E7E", +"I c #9C9C9C", +"( c #ABABAB", +"} c #C9C9C9", +"@ c #E7E7E7", +"E c #2C2C2C", +"P c #F6F6F6", +"c c #3B3B3B", +"{ c #868686", +"t c #A4A4A4", +"& c #070707", +"e c #E0E0E0", +"V c #252525", +"n c #343434", +"k c #707070", +"m c #8E8E8E", +/* pixels */ +" .XoOOOO+O@ ", +"#$OOOOOO%&O* ", +"OO=-OOOOOO;: ", +"++>OOOOO,<1O ", +"2O=3OO4<=562 ", +"7O+O89O076#q wOe", +"rO4t=yuipasdfO+O", +"ghjkl#zxscvO&O3&", +":zubnmsMNOO-O=j+", +" BVCZASOO3O3=ODO", +"F G HOO&OO&OJOOK", +"LP wIUVO%3OOYTR", +" UE8d%OOW9Jk7", +" 8OQO,!3~^66", +" . /2(jBXn)_`", +" F '6]c[{} " +}; diff --git a/clientgui/res/templates/atiicon.bmp b/clientgui/res/templates/atiicon.bmp new file mode 100644 index 0000000000000000000000000000000000000000..81f30f04ff7beacb15349df1b4381e01bd65aef7 GIT binary patch literal 822 zcmV-61IheCO*R7n0000005$*s04M+e01yBG01yBG0096P00000000930K^Ue0K^Ue z0000000000060LIKR3TcG}k>qtUFANKs>%fGuAjln=eOaOEl9vI+8p+q&!QjH$A{U zL8?JLr8+piJv_odKgKpUvOPY!LORYsJIXjfoGm_aO*hjtHjqC*usuY*Iy%umKfXgg zu{J%+J4U}fOtLaLvpzS}Ks(GoMyxVEjVdyDN;}6VF@`=tyF59~Jv7`uI?_Kvyfi?? zJ3QAtKh!fb$2~FIJ~h%iJ+v$^mMAH4Mnta~D|$LWzB@F~Jv7rjHrY8tzcxm#J}v4z zA^$Zi)H^rAJulHXC(ke{t}Q5GGdqA6E_yaTy*)I?Mnb$lInyyizUTk{Mn$q$KI%k4 zxZL>vtF-koBex?Zg0Qa0;O+kwCxtXO!fj;Y^!)!{TkLFp|L*$#>-+qIdCjb;;pYGI zwaDf!BBm1^SIxuE_W%DJBBC`e(sO6l|NsA6R^cf&%XeMC|NsBg$o(o5iRk$Mwzcao z62}}Ed&auL^7{WA8?`ef*m-H$|NsA6Q`s#u+l++wpQYUY|NpkT$?f>|xUJ?W5uy+h zW4X7)?Dzi=62mAg%5P)Z|NsABVA3op>4kv*dVS8RtK|Ow|M&m@z`E!h5_tdsAHK4_ z_4@x97poZT`1YczW!4ch$bb^#A|=r>540hQXGpvhd>R|NsA< zq3NET@M%`zPDij*Pvt8r@MmxKZf^X0clm2<$h^VvetX8OuI0wp<=fZO#nr*W+~B#$ z?Nn08e1GsXL(CsE;9qa+VqyPgVE=Ax>1SiucW>!CH=GCxRs;Z41q4h00Z$|zv?dtU zAQI*r8uu6(|6Fh4Tv-2KSN~#T@@8N4WnA-kb@oI+yaWeo86#;07)u%(l@=MI78=4H zD9|0v*SXS{`UgB6=|m=+y>5fzmjB%v`R z*j8iQRYw0&N&in=S}H4TUNyu4_Y1vg%}rU7#DvY9D*bTujUMc A`v3p{ literal 0 HcmV?d00001 diff --git a/clientgui/res/templates/externalweblink.gif b/clientgui/res/templates/externalweblink.gif index d7ac63ecf8531e4093364d9b3d1bb2c35c9d3cb3..3710374812dcb1dbd5988a44834621e6fd5d5190 100644 GIT binary patch literal 887 zcmW+!y{aBW6dY~>ekp{jf)KUvqJ_9=WEy|ETjZxpk*zEw&Gh;NOL9?^C<-r= zvYU-fLPQbXGd8f1O>D(xwy=Yp>|!r=vxfs5V` zhK!hE%xoTeZ3+@f@TR2(HL6Li)T|bDs8e0)rEc|TK!Y06C=F{w6PnbNW@%b8TF|1F zv`WibQJ_$fQi_!=!B(6F6{_H^NHtVrHC3x>u9oVk&g!aO)m=R`P=hs8qiVQDYN94< zs%F)6&D26I)>5siH&&88uv3~w{s;6^vOm7Cq-4tKiCz1-~{4|vc+ z9_3+=c*2vO@+?n##tUBbl2>`zD-Ikwa>}ujV-U6*TawLd4|fzA(wL^SN^@G$k_cw%c3sz4s;fW$G`>;T~RId++v> z-=94^y!G*;(|=B$AFloQ^z87-{i`2bX>VRUedGM%?)BHtPhWlg)klxsdF`hg*MB(s q?bnlA-#+;Jn-6dPa`NTB?|%RD}LnHU%<6EQb15Mm$$Q=>a!AmtC3 z`3DB5dsnt}vg_>j-e;}7&sparetaVCX+C%!OZ{2`?)zEiu>bo-iwYd~$Jp(5qm1Wy zzu%uoB*NivC=}{;ySv?v0lvb=jEYL7g11_&PNy@SPJ6vx=+N)?_xpV?7&I6R#FES92ta{c z0)fEga!sdG#JEl-lL-U@pbv*bupquxs|A>jhd~I&<1s45VsSE=ph=}t!7R7iZMWM8 zg8^93N~u%=gXZv%=p92zNQbmmtDz3HF|OC^;f|0F_4E0Rr$m6xZ|N{=u~?weXf!|p zfYc_BDKM#23Kna4T(C464T>zDFz7})uoT3lQV9aGc$`qD(|y2@;&Dlq)9J+G5#w9p R6PipWmW4wiy<9FI;D7M49?}2+ literal 0 HcmV?d00001 diff --git a/clientgui/res/templates/nvidiaicon.bmp b/clientgui/res/templates/nvidiaicon.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b77a0b8f104edad0ba88008846b3fffce1fa8ef7 GIT binary patch literal 822 zcmZ?rHDhJ~12Z700mK4O%*Y@C7H0s;AK`;whyVk_f6BnyUte9%%nH4*IPAg_WCRom zxv&`1>=!>iF>J~Jp$(}F8`BxK07;i_0E=|G=;=5oloikZW{oB9MIa?Y;cLHlUMke|rPu{`&hze18+ewnB*d>RUU21_Id(n=|_#9A;Rb zqI0wt$c?_VoMCPJwa+hr>{*XbGHlL)s0aFM@zb+qH@AA9oB#jce~@Q4XEE+91In5m zpA2+K#?^HUn=&EpS^4}T!}=tk6vO)D8(&|2{r!_+Rpi&-zZ4F&Tc4Z;6zAJh3koH$ zmx0_3FRw7HjeGg?bNju0Ogqb$K0DWPcP~)9;m&S`?ZrSw_{Aj<&%*s%b9)EF#x$VR z@edEpk5B&h|6lsmwGc~pyuJx`Nh#cXpfVts`{WeR7fYUh1fwIqjd;-RoK$scS-MzRN6fr7{?iDUx+fpRMI literal 0 HcmV?d00001 diff --git a/win_build/boincmgr.vcproj b/win_build/boincmgr.vcproj index 8f4ffdcaf3..1b2df7161c 100644 --- a/win_build/boincmgr.vcproj +++ b/win_build/boincmgr.vcproj @@ -864,6 +864,10 @@ RelativePath="..\clientgui\res\mess.xpm" > + +