mirror of https://github.com/BOINC/boinc.git
- 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
This commit is contained in:
parent
224262b7fc
commit
0bf0c6e818
|
@ -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
|
||||
|
|
|
@ -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(" <table cellpadding=0 cellspacing=1>");
|
||||
retval += wxT(" <tr>");
|
||||
if (m_Items[i]->IsNvidiaGPUSupported() || m_Items[i]->IsATIGPUSupported()) {
|
||||
retval += wxT("<table cellpadding=0 cellspacing=1 bgcolor=#ffff00>");
|
||||
} else {
|
||||
retval += wxT("<table cellpadding=0 cellspacing=1>");
|
||||
}
|
||||
retval += wxT("<tr>");
|
||||
|
||||
buf.Printf(
|
||||
wxT(" <td width=100%%>%s</td>"),
|
||||
wxT("<td width=100%%>%s</td>"),
|
||||
m_Items[i]->GetTitle().c_str()
|
||||
);
|
||||
retval += buf;
|
||||
|
||||
if (m_Items[i]->IsMulticoreSupported()) {
|
||||
retval += wxT("<td><img height=16 width=16 src=\"memory:multicore.xpm\"></td>");
|
||||
}
|
||||
|
||||
if (m_Items[i]->IsNvidiaGPUSupported()) {
|
||||
retval += wxT(" <td><img src=\"memory:nvidiaicon.xpm\"></td>");
|
||||
retval += wxT("<td><img height=16 width=16 src=\"memory:nvidiaicon.xpm\"></td>");
|
||||
}
|
||||
|
||||
if (m_Items[i]->IsATIGPUSupported()) {
|
||||
retval += wxT(" <td><img src=\"memory:atiicon.xpm\"></td>");
|
||||
retval += wxT("<td><img height=16 width=16 src=\"memory:atiicon.xpm\"></td>");
|
||||
}
|
||||
|
||||
buf.Printf(
|
||||
wxT(" <td><a href=\"%s\"><img src=\"memory:webexternallink.xpm\"></a></td>"),
|
||||
wxT("<td><a href=\"%s\"><img height=16 width=16 src=\"memory:webexternallink.xpm\"></a></td>"),
|
||||
m_Items[i]->GetURL().c_str()
|
||||
);
|
||||
retval += buf;
|
||||
|
||||
retval += wxT(" </tr>");
|
||||
retval += wxT(" </table>");
|
||||
retval += wxT("</tr>");
|
||||
retval += wxT("</table>");
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -182,6 +182,7 @@ public:
|
|||
|
||||
private:
|
||||
std::vector<CProjectListItem*> m_Items;
|
||||
wxTipWindow *m_pTipWindow;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
CProjectListCtrlAccessible* m_accessible;
|
||||
|
|
|
@ -16,26 +16,32 @@
|
|||
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/* 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 ",
|
||||
" + @. + ",
|
||||
" + + ",
|
||||
" #++++#+ ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
};
|
||||
|
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
/* 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[{} "
|
||||
};
|
Binary file not shown.
After Width: | Height: | Size: 822 B |
Binary file not shown.
Before Width: | Height: | Size: 102 B After Width: | Height: | Size: 887 B |
Binary file not shown.
After Width: | Height: | Size: 822 B |
Binary file not shown.
After Width: | Height: | Size: 822 B |
|
@ -864,6 +864,10 @@
|
|||
RelativePath="..\clientgui\res\mess.xpm"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\clientgui\res\multicore.xpm"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\clientgui\res\nvidiaicon.xpm"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue