mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4222
This commit is contained in:
parent
fdbba61026
commit
4f180feafb
|
@ -17559,3 +17559,12 @@ David 21 Sept 2004
|
|||
lib/
|
||||
miofile.C
|
||||
parse.C
|
||||
|
||||
Rom 22 Sept 2004
|
||||
- NEWGUI: Add rules to enforce URL and Accout Key rules to the
|
||||
attach to project dialog, this will increase the robustness
|
||||
of the new UI when dealing with unexpected input.
|
||||
- Cleanup the rest of the graphics stuff.
|
||||
|
||||
clientgui/
|
||||
<various files>
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.2 2004/09/22 21:53:02 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
// Revision 1.1 2004/09/21 01:26:24 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
|
@ -34,6 +37,7 @@
|
|||
#include "BOINCBaseView.h"
|
||||
#include "BOINCTaskCtrl.h"
|
||||
#include "BOINCListCtrl.h"
|
||||
|
||||
#include "res/boinc.xpm"
|
||||
|
||||
|
||||
|
|
|
@ -323,6 +323,12 @@
|
|||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ValidateAccountKey.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ValidateURL.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ViewMessages.cpp">
|
||||
</File>
|
||||
|
@ -409,6 +415,12 @@
|
|||
<File
|
||||
RelativePath="..\lib\util.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ValidateAccountKey.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ValidateURL.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ViewMessages.h">
|
||||
</File>
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.2 2004/09/22 21:53:02 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
// Revision 1.1 2004/09/21 01:26:24 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
|
@ -48,44 +51,44 @@ IMPLEMENT_DYNAMIC_CLASS(CBOINCTaskCtrl, wxHtmlWindow)
|
|||
|
||||
CBOINCTaskCtrl::CBOINCTaskCtrl()
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::CBOINCTaskCtrl - Function Begining");
|
||||
wxLogTrace("CBOINCTaskCtrl::CBOINCTaskCtrl - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::CBOINCTaskCtrl - Function Begining"));
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::CBOINCTaskCtrl - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
CBOINCTaskCtrl::CBOINCTaskCtrl(CBOINCBaseView* pView, wxWindowID iHtmlWindowID) :
|
||||
wxHtmlWindow( pView, iHtmlWindowID, wxDefaultPosition, wxSize(225, -1), wxHW_SCROLLBAR_AUTO|wxHSCROLL|wxVSCROLL )
|
||||
{
|
||||
wxLogTrace("CBOINCListCtrl::CBOINCListCtrl - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCListCtrl::CBOINCListCtrl - Function Begining"));
|
||||
|
||||
m_pParentView = pView;
|
||||
|
||||
wxLogTrace("CBOINCListCtrl::CBOINCListCtrl - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCListCtrl::CBOINCListCtrl - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
CBOINCTaskCtrl::~CBOINCTaskCtrl()
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::~CBOINCTaskCtrl - Function Begining");
|
||||
wxLogTrace("CBOINCTaskCtrl::~CBOINCTaskCtrl - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::~CBOINCTaskCtrl - Function Begining"));
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::~CBOINCTaskCtrl - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::BeginTaskPage()
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::BeginTaskPage - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::BeginTaskPage - Function Begining"));
|
||||
|
||||
m_strTaskPage.Clear();
|
||||
|
||||
m_strTaskPage += "<html><body bgcolor=\"#0080FF\">";
|
||||
m_strTaskPage += wxT("<html><body bgcolor=\"#0080FF\">");
|
||||
|
||||
wxLogTrace("CBOINCTaskCtrl::BeginTaskPage - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::BeginTaskPage - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::BeginTaskSection( const wxString& strTaskHeaderFilename, bool bHidden )
|
||||
void CBOINCTaskCtrl::BeginTaskSection( const wxString& strLink, const wxString& strTaskHeaderFilename, bool bHidden )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::BeginTaskSection - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::BeginTaskSection - Function Begining"));
|
||||
|
||||
wxString strModifiedTaskHeaderFilename;
|
||||
|
||||
|
@ -94,97 +97,127 @@ void CBOINCTaskCtrl::BeginTaskSection( const wxString& strTaskHeaderFilename, bo
|
|||
else
|
||||
strModifiedTaskHeaderFilename = strTaskHeaderFilename + wxT(".visible");
|
||||
|
||||
m_strTaskPage += "<table border=\"0\" bgcolor=\"White\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">";
|
||||
m_strTaskPage += " <tr bgcolor=\"#0080FF\">";
|
||||
m_strTaskPage += " <td width=\"100%\">";
|
||||
m_strTaskPage += " <img src=\"memory:" + strModifiedTaskHeaderFilename + "\">";
|
||||
m_strTaskPage += " </td>";
|
||||
m_strTaskPage += " </tr>";
|
||||
m_strTaskPage += " <tr>";
|
||||
m_strTaskPage += " <td> </td>";
|
||||
m_strTaskPage += " </tr>";
|
||||
m_strTaskPage += " <tr>";
|
||||
m_strTaskPage += " <td align=\"right\">";
|
||||
m_strTaskPage += " <table border=\"0\" width=\"90%\" cellpadding=\"0\" cellspacing=\"0\">";
|
||||
m_strTaskPage += wxT("<table border=\"0\" bgcolor=\"White\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">");
|
||||
m_strTaskPage += wxT(" <tr bgcolor=\"#0080FF\">");
|
||||
m_strTaskPage += wxT(" <td width=\"100%\">");
|
||||
|
||||
wxLogTrace("CBOINCTaskCtrl::BeginTaskSection - Function Ending");
|
||||
if ( !strLink.empty() )
|
||||
m_strTaskPage += wxT(" <a href=\"") + strLink + wxT("\">");
|
||||
|
||||
m_strTaskPage += wxT(" <img src=\"memory:") + strModifiedTaskHeaderFilename + wxT("\">");
|
||||
|
||||
if ( !strLink.empty() )
|
||||
m_strTaskPage += wxT(" </a>");
|
||||
|
||||
m_strTaskPage += wxT(" </td>");
|
||||
m_strTaskPage += wxT(" </tr>");
|
||||
|
||||
if ( !bHidden )
|
||||
{
|
||||
m_strTaskPage += wxT(" <tr>");
|
||||
m_strTaskPage += wxT(" <td> </td>");
|
||||
m_strTaskPage += wxT(" </tr>");
|
||||
m_strTaskPage += wxT(" <tr>");
|
||||
m_strTaskPage += wxT(" <td align=\"right\">");
|
||||
m_strTaskPage += wxT(" <table border=\"0\" width=\"90%\" cellpadding=\"0\" cellspacing=\"0\">");
|
||||
}
|
||||
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::BeginTaskSection - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::CreateTask( const wxString& strTaskIconFilename, const wxString& strTaskName, const wxString& strTaskDescription )
|
||||
void CBOINCTaskCtrl::CreateTask( const wxString& strLink, const wxString& strTaskIconFilename, const wxString& strTaskName, const wxString& strTaskDescription )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::CreateTask - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::CreateTask - Function Begining"));
|
||||
|
||||
m_strTaskPage += " <tr>";
|
||||
m_strTaskPage += " <td valign=\"center\" width=\"100%\">";
|
||||
m_strTaskPage += " <img src=\"memory:" + strTaskIconFilename + "\">";
|
||||
m_strTaskPage += " ";
|
||||
m_strTaskPage += " <font color=\"#000000\">" + strTaskName + "</font>";
|
||||
m_strTaskPage += " </td>";
|
||||
m_strTaskPage += " </tr>";
|
||||
m_strTaskPage += wxT(" <tr>");
|
||||
m_strTaskPage += wxT(" <td valign=\"center\" width=\"100%\">");
|
||||
|
||||
wxLogTrace("CBOINCTaskCtrl::CreateTask - Function Ending");
|
||||
if ( !strLink.empty() )
|
||||
m_strTaskPage += wxT(" <a href=\"") + strLink + wxT("\">");
|
||||
|
||||
m_strTaskPage += wxT(" <img src=\"memory:") + strTaskIconFilename + wxT("\">");
|
||||
|
||||
if ( !strLink.empty() )
|
||||
m_strTaskPage += wxT(" </a>");
|
||||
|
||||
m_strTaskPage += wxT(" ");
|
||||
|
||||
if ( !strLink.empty() )
|
||||
m_strTaskPage += wxT(" <a href=\"") + strLink + wxT("\">");
|
||||
|
||||
m_strTaskPage += wxT(" <font color=\"#000000\">") + strTaskName + wxT("</font>");
|
||||
|
||||
if ( !strLink.empty() )
|
||||
m_strTaskPage += wxT(" </a>");
|
||||
|
||||
m_strTaskPage += wxT(" </td>");
|
||||
m_strTaskPage += wxT(" </tr>");
|
||||
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::CreateTask - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::EndTaskSection()
|
||||
void CBOINCTaskCtrl::EndTaskSection( bool bHidden )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::EndTaskSection - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::EndTaskSection - Function Begining"));
|
||||
|
||||
m_strTaskPage += " </table>";
|
||||
m_strTaskPage += " </td>";
|
||||
m_strTaskPage += " </tr>";
|
||||
m_strTaskPage += " <tr>";
|
||||
m_strTaskPage += " <td width=\"100%\"> </td>";
|
||||
m_strTaskPage += " </tr>";
|
||||
m_strTaskPage += "</table>";
|
||||
m_strTaskPage += "<p></p>";
|
||||
if ( !bHidden )
|
||||
{
|
||||
m_strTaskPage += wxT(" </table>");
|
||||
m_strTaskPage += wxT(" </td>");
|
||||
m_strTaskPage += wxT(" </tr>");
|
||||
m_strTaskPage += wxT(" <tr>");
|
||||
m_strTaskPage += wxT(" <td width=\"100%\"> </td>");
|
||||
m_strTaskPage += wxT(" </tr>");
|
||||
}
|
||||
|
||||
wxLogTrace("CBOINCTaskCtrl::EndTaskSection - Function Ending");
|
||||
m_strTaskPage += wxT("</table>");
|
||||
m_strTaskPage += wxT("<p></p>");
|
||||
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::EndTaskSection - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::CreateQuickTip( const wxString& strTip )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::CreateQuickTip - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::CreateQuickTip - Function Begining"));
|
||||
|
||||
m_strTaskPage += " <tr>";
|
||||
m_strTaskPage += " <td width=\"100%\">";
|
||||
m_strTaskPage += " " + strTip;
|
||||
m_strTaskPage += " </td>";
|
||||
m_strTaskPage += " </tr>";
|
||||
m_strTaskPage += wxT(" <tr>");
|
||||
m_strTaskPage += wxT(" <td width=\"100%\">");
|
||||
m_strTaskPage += wxT(" ") + strTip;
|
||||
m_strTaskPage += wxT(" </td>");
|
||||
m_strTaskPage += wxT(" </tr>");
|
||||
|
||||
wxLogTrace("CBOINCTaskCtrl::CreateQuickTip - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::CreateQuickTip - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::EndTaskPage()
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::EndTaskPage - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::EndTaskPage - Function Begining"));
|
||||
|
||||
m_strTaskPage += "</body></html>";
|
||||
m_strTaskPage += wxT("</body></html>");
|
||||
SetPage(m_strTaskPage);
|
||||
|
||||
wxLogTrace("CBOINCTaskCtrl::EndTaskPage - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::EndTaskPage - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::CreateTaskHeader( const wxString& strFilename, const wxBitmap& itemTaskBitmap, const wxString& strTaskName )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::CreateTaskHeader - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::CreateTaskHeader - Function Begining"));
|
||||
|
||||
wxMemoryDC dc;
|
||||
wxBitmap bmpHeaderVisible(visibleheader_xpm);
|
||||
wxBitmap bmpHeaderHidden(hiddenheader_xpm);
|
||||
wxBitmap bmpTaskIcon(itemTaskBitmap);
|
||||
|
||||
bmpHeaderVisible.SetMask(new wxMask(bmpHeaderVisible, wxColour(255, 0, 255)));
|
||||
bmpHeaderHidden.SetMask(new wxMask(bmpHeaderHidden, wxColour(255, 0, 255)));
|
||||
bmpTaskIcon.SetMask(new wxMask(bmpTaskIcon, wxColour(255, 0, 255)));
|
||||
|
||||
|
||||
dc.SelectObject(bmpHeaderVisible);
|
||||
dc.DrawBitmap(bmpTaskIcon, 17, 9, true);
|
||||
dc.DrawBitmap(itemTaskBitmap, 17, 9, true);
|
||||
|
||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||
dc.SetTextForeground(wxColour(255, 255, 255));
|
||||
|
@ -193,7 +226,7 @@ void CBOINCTaskCtrl::CreateTaskHeader( const wxString& strFilename, const wxBitm
|
|||
dc.SelectObject( wxNullBitmap );
|
||||
|
||||
dc.SelectObject(bmpHeaderHidden);
|
||||
dc.DrawBitmap(bmpTaskIcon, 17, 9, true);
|
||||
dc.DrawBitmap(itemTaskBitmap, 17, 9, true);
|
||||
|
||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||
dc.SetTextForeground(wxColour(255, 255, 255));
|
||||
|
@ -207,59 +240,59 @@ void CBOINCTaskCtrl::CreateTaskHeader( const wxString& strFilename, const wxBitm
|
|||
AddVirtualFile(strFilename + wxT(".visible"), bmpHeaderVisible, wxBITMAP_TYPE_XPM);
|
||||
AddVirtualFile(strFilename + wxT(".hidden"), bmpHeaderHidden, wxBITMAP_TYPE_XPM);
|
||||
|
||||
wxLogTrace("CBOINCTaskCtrl::CreateTaskHeader - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::CreateTaskHeader - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::AddVirtualFile( const wxString& strFilename, wxImage& itemImage, long lType )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::AddVirtualFile - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::AddVirtualFile - Function Begining"));
|
||||
|
||||
wxMemoryFSHandler::AddFile( strFilename, itemImage, lType );
|
||||
|
||||
wxLogTrace("CBOINCTaskCtrl::AddVirtualFile - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::AddVirtualFile - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::AddVirtualFile( const wxString& strFilename, const wxBitmap& itemBitmap, long lType )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::AddVirtualFile - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::AddVirtualFile - Function Begining"));
|
||||
|
||||
wxMemoryFSHandler::AddFile( strFilename, itemBitmap, lType );
|
||||
|
||||
wxLogTrace("CBOINCTaskCtrl::AddVirtualFile - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::AddVirtualFile - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::RemoveVirtualFile( const wxString& strFilename )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::RemoveVirtualFile - Function Begining");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::RemoveVirtualFile - Function Begining"));
|
||||
|
||||
wxMemoryFSHandler::RemoveFile( strFilename );
|
||||
|
||||
wxLogTrace("CBOINCTaskCtrl::RemoveVirtualFile - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::RemoveVirtualFile - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCTaskCtrl::OnRender( wxTimerEvent& event )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::OnRender - Function Begining");
|
||||
wxLogTrace("CBOINCTaskCtrl::OnRender - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::OnRender - Function Begining"));
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::OnRender - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
bool CBOINCTaskCtrl::OnSaveState( wxConfigBase* pConfig )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::OnSaveState - Function Begining");
|
||||
wxLogTrace("CBOINCTaskCtrl::OnSaveState - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::OnSaveState - Function Begining"));
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::OnSaveState - Function Ending"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CBOINCTaskCtrl::OnRestoreState( wxConfigBase* pConfig )
|
||||
{
|
||||
wxLogTrace("CBOINCTaskCtrl::OnRestoreState - Function Begining");
|
||||
wxLogTrace("CBOINCTaskCtrl::OnRestoreState - Function Ending");
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::OnRestoreState - Function Begining"));
|
||||
wxLogTrace(wxT("CBOINCTaskCtrl::OnRestoreState - Function Ending"));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -285,6 +318,19 @@ void CBOINCTaskCtrl::OnLinkClicked( const wxHtmlLinkInfo& link )
|
|||
}
|
||||
|
||||
|
||||
wxHtmlOpeningStatus CBOINCTaskCtrl::OnOpeningURL( wxHtmlURLType type, const wxString& url, wxString *redirect )
|
||||
{
|
||||
wxHtmlOpeningStatus retval;
|
||||
|
||||
retval = wxHTML_BLOCK;
|
||||
|
||||
if ( wxHTML_URL_IMAGE == type )
|
||||
retval = wxHTML_OPEN;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
template < class T >
|
||||
void CBOINCTaskCtrl::FireOnLinkClickedEvent( T pView, const wxHtmlLinkInfo& link )
|
||||
{
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.2 2004/09/22 21:53:02 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
// Revision 1.1 2004/09/21 01:26:24 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
|
@ -46,38 +49,42 @@ public:
|
|||
|
||||
~CBOINCTaskCtrl();
|
||||
|
||||
virtual void BeginTaskPage();
|
||||
virtual void BeginTaskSection( const wxString& strTaskHeaderFilename,
|
||||
bool bHidden );
|
||||
virtual void CreateTask( const wxString& strTaskIconFilename,
|
||||
const wxString& strTaskName,
|
||||
const wxString& strTaskDescription );
|
||||
virtual void EndTaskSection();
|
||||
virtual void CreateQuickTip( const wxString& strTip );
|
||||
virtual void EndTaskPage();
|
||||
virtual void BeginTaskPage();
|
||||
virtual void BeginTaskSection( const wxString& strLink,
|
||||
const wxString& strTaskHeaderFilename,
|
||||
bool bHidden );
|
||||
virtual void CreateTask( const wxString& strLink,
|
||||
const wxString& strTaskIconFilename,
|
||||
const wxString& strTaskName,
|
||||
const wxString& strTaskDescription );
|
||||
virtual void EndTaskSection( bool bHidden );
|
||||
virtual void CreateQuickTip( const wxString& strTip );
|
||||
virtual void EndTaskPage();
|
||||
|
||||
|
||||
virtual void CreateTaskHeader( const wxString& strFilename,
|
||||
const wxBitmap& itemTaskBitmap,
|
||||
const wxString& strTaskName );
|
||||
virtual void CreateTaskHeader( const wxString& strFilename,
|
||||
const wxBitmap& itemTaskBitmap,
|
||||
const wxString& strTaskName );
|
||||
|
||||
|
||||
virtual void AddVirtualFile( const wxString& strFilename,
|
||||
wxImage& itemImage,
|
||||
long lType );
|
||||
virtual void AddVirtualFile( const wxString& strFilename,
|
||||
const wxBitmap& itemBitmap,
|
||||
long lType );
|
||||
virtual void RemoveVirtualFile( const wxString& strFilename );
|
||||
virtual void AddVirtualFile( const wxString& strFilename,
|
||||
wxImage& itemImage,
|
||||
long lType );
|
||||
virtual void AddVirtualFile( const wxString& strFilename,
|
||||
const wxBitmap& itemBitmap,
|
||||
long lType );
|
||||
virtual void RemoveVirtualFile( const wxString& strFilename );
|
||||
|
||||
|
||||
virtual void OnRender( wxTimerEvent& event );
|
||||
virtual bool OnSaveState( wxConfigBase* pConfig );
|
||||
virtual bool OnRestoreState( wxConfigBase* pConfig );
|
||||
virtual void OnRender( wxTimerEvent& event );
|
||||
virtual bool OnSaveState( wxConfigBase* pConfig );
|
||||
virtual bool OnRestoreState( wxConfigBase* pConfig );
|
||||
|
||||
virtual void OnLinkClicked( const wxHtmlLinkInfo& link );
|
||||
virtual wxHtmlOpeningStatus OnOpeningURL( wxHtmlURLType type, const wxString& url, wxString *redirect );
|
||||
|
||||
private:
|
||||
|
||||
virtual void OnLinkClicked( const wxHtmlLinkInfo& link );
|
||||
template < class T >
|
||||
void FireOnLinkClickedEvent( T pView, const wxHtmlLinkInfo& link );
|
||||
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.5 2004/09/22 21:53:02 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
// Revision 1.4 2004/05/17 22:15:09 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
|
@ -32,6 +35,8 @@
|
|||
|
||||
#include "stdwx.h"
|
||||
#include "DlgAttachProject.h"
|
||||
#include "ValidateURL.h"
|
||||
#include "ValidateAccountKey.h"
|
||||
|
||||
|
||||
IMPLEMENT_CLASS( CDlgAttachProject, wxDialog )
|
||||
|
@ -89,7 +94,7 @@ void CDlgAttachProject::CreateControls()
|
|||
item4->Add(item5, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
|
||||
|
||||
wxTextCtrl* item6 = new wxTextCtrl;
|
||||
item6->Create( item1, ID_PROJECTADDRESS, _T(""), wxDefaultPosition, wxSize(200, -1), 0 );
|
||||
item6->Create( item1, ID_PROJECTADDRESS, wxT(""), wxDefaultPosition, wxSize(200, -1), 0, CValidateURL(&m_strProjectAddress) );
|
||||
m_ProjectAddressCtrl = item6;
|
||||
item4->Add(item6, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
|
||||
|
@ -98,7 +103,7 @@ void CDlgAttachProject::CreateControls()
|
|||
item4->Add(item7, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE, 5);
|
||||
|
||||
wxTextCtrl* item8 = new wxTextCtrl;
|
||||
item8->Create( item1, ID_PROJECTACCOUNTKEY, _T(""), wxDefaultPosition, wxSize(200, -1), 0 );
|
||||
item8->Create( item1, ID_PROJECTACCOUNTKEY, wxT(""), wxDefaultPosition, wxSize(200, -1), 0, CValidateAccountKey(&m_strProjectAccountKey) );
|
||||
m_ProjectAccountKeyCtrl = item8;
|
||||
item4->Add(item8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.5 2004/09/22 21:53:03 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
// Revision 1.4 2004/05/17 22:15:09 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
|
@ -69,6 +72,9 @@ public:
|
|||
|
||||
wxTextCtrl* m_ProjectAddressCtrl;
|
||||
wxTextCtrl* m_ProjectAccountKeyCtrl;
|
||||
|
||||
wxString m_strProjectAddress;
|
||||
wxString m_strProjectAccountKey;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.20 2004/09/22 21:53:03 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
// Revision 1.19 2004/09/21 01:26:23 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
|
@ -155,10 +158,6 @@ bool CMainFrame::CreateMenu()
|
|||
wxMenu *menuFile = new wxMenu;
|
||||
menuFile->Append(wxID_EXIT, _("E&xit"));
|
||||
|
||||
// Commands menu
|
||||
wxMenu *menuCommands = new wxMenu;
|
||||
menuCommands->Append(ID_COMMANDSATTACHPROJECT, _("&Attach to Project..."));
|
||||
|
||||
// Tools menu
|
||||
wxMenu *menuTools = new wxMenu;
|
||||
menuTools->Append(ID_TOOLSOPTIONS, _("&Options"));
|
||||
|
@ -170,7 +169,6 @@ bool CMainFrame::CreateMenu()
|
|||
// construct menu
|
||||
m_pMenubar = new wxMenuBar;
|
||||
m_pMenubar->Append(menuFile, _("&File"));
|
||||
m_pMenubar->Append(menuCommands, _("&Commands"));
|
||||
m_pMenubar->Append(menuTools, _("&Tools"));
|
||||
m_pMenubar->Append(menuHelp, _("&Help"));
|
||||
SetMenuBar(m_pMenubar);
|
||||
|
|
|
@ -0,0 +1,159 @@
|
|||
// $Id$
|
||||
//
|
||||
// The contents of this file are subject to the BOINC Public License
|
||||
// Version 1.0 (the "License"); you may not use this file except in
|
||||
// compliance with the License. You may obtain a copy of the License at
|
||||
// http://boinc.berkeley.edu/license_1.0.txt
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS"
|
||||
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
// License for the specific language governing rights and limitations
|
||||
// under the License.
|
||||
//
|
||||
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
||||
//
|
||||
// The Initial Developer of the Original Code is the SETI@home project.
|
||||
// Portions created by the SETI@home project are Copyright (C) 2002
|
||||
// University of California at Berkeley. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
//
|
||||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.1 2004/09/22 21:53:04 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
//
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma implementation "ValidateAccountKey.h"
|
||||
#endif
|
||||
|
||||
#include "stdwx.h"
|
||||
#include "ValidateAccountKey.h"
|
||||
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(CValidateAccountKey, wxValidator)
|
||||
|
||||
|
||||
CValidateAccountKey::CValidateAccountKey(wxString *val)
|
||||
{
|
||||
m_stringValue = val ;
|
||||
}
|
||||
|
||||
|
||||
CValidateAccountKey::CValidateAccountKey(const CValidateAccountKey& val)
|
||||
: wxValidator()
|
||||
{
|
||||
Copy(val);
|
||||
}
|
||||
|
||||
|
||||
CValidateAccountKey::~CValidateAccountKey()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
bool CValidateAccountKey::Copy(const CValidateAccountKey& val)
|
||||
{
|
||||
wxValidator::Copy(val);
|
||||
|
||||
m_stringValue = val.m_stringValue ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool CValidateAccountKey::Validate(wxWindow *parent)
|
||||
{
|
||||
if( !CheckValidator() )
|
||||
return FALSE;
|
||||
|
||||
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
|
||||
|
||||
if ( !control->IsEnabled() )
|
||||
return TRUE;
|
||||
|
||||
wxString val(control->GetValue());
|
||||
|
||||
bool ok = TRUE;
|
||||
|
||||
if ( (!wxIsAlphaNumeric(val)) || (val.Length() != 32) )
|
||||
{
|
||||
ok = FALSE;
|
||||
|
||||
m_errormsg = _("'%s' should only contain alphabetic or numeric characters and be equal to 32 characters.");
|
||||
}
|
||||
|
||||
if ( !ok )
|
||||
{
|
||||
wxASSERT_MSG( !m_errormsg.empty(), _T("you forgot to set errormsg") );
|
||||
|
||||
m_validatorWindow->SetFocus();
|
||||
|
||||
wxString buf;
|
||||
buf.Printf(m_errormsg, control->GetValue());
|
||||
|
||||
wxMessageBox(buf, _("Validation conflict"),
|
||||
wxOK | wxICON_EXCLAMATION, parent);
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
bool CValidateAccountKey::TransferToWindow(void)
|
||||
{
|
||||
if( !CheckValidator() )
|
||||
return FALSE;
|
||||
|
||||
if (!m_stringValue)
|
||||
return TRUE;
|
||||
|
||||
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
|
||||
control->SetValue(* m_stringValue) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool CValidateAccountKey::TransferFromWindow(void)
|
||||
{
|
||||
if( !CheckValidator() )
|
||||
return FALSE;
|
||||
|
||||
if (!m_stringValue)
|
||||
return TRUE;
|
||||
|
||||
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
|
||||
* m_stringValue = control->GetValue() ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool CValidateAccountKey::wxIsAlphaNumeric(const wxString& val)
|
||||
{
|
||||
int i;
|
||||
for ( i = 0; i < (int)val.Length(); i++)
|
||||
{
|
||||
if (!wxIsalnum(val[i]))
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool CValidateAccountKey::CheckValidator() const
|
||||
{
|
||||
wxCHECK_MSG( m_validatorWindow, FALSE,
|
||||
_T("No window associated with validator") );
|
||||
wxCHECK_MSG( m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)), FALSE,
|
||||
_T("wxTextValidator is only for wxTextCtrl's") );
|
||||
wxCHECK_MSG( m_stringValue, FALSE,
|
||||
_T("No variable storage for validator") );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
// $Id$
|
||||
//
|
||||
// The contents of this file are subject to the BOINC Public License
|
||||
// Version 1.0 (the "License"); you may not use this file except in
|
||||
// compliance with the License. You may obtain a copy of the License at
|
||||
// http://boinc.berkeley.edu/license_1.0.txt
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS"
|
||||
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
// License for the specific language governing rights and limitations
|
||||
// under the License.
|
||||
//
|
||||
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
||||
//
|
||||
// The Initial Developer of the Original Code is the SETI@home project.
|
||||
// Portions created by the SETI@home project are Copyright (C) 2002
|
||||
// University of California at Berkeley. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
//
|
||||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.1 2004/09/22 21:53:04 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef _VALIDATEACCOUNTKEY_H_
|
||||
#define _VALIDATEACCOUNTKEY_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "ValidateAccountKey.cpp"
|
||||
#endif
|
||||
|
||||
|
||||
class CValidateAccountKey : public wxValidator
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( CValidateAccountKey )
|
||||
|
||||
public:
|
||||
|
||||
CValidateAccountKey( wxString *val = 0 );
|
||||
CValidateAccountKey( const CValidateAccountKey& val );
|
||||
|
||||
~CValidateAccountKey();
|
||||
|
||||
virtual wxObject* Clone() const { return new CValidateAccountKey(*this); }
|
||||
virtual bool Copy( const CValidateAccountKey& val );
|
||||
|
||||
virtual bool Validate(wxWindow *parent);
|
||||
virtual bool TransferToWindow();
|
||||
virtual bool TransferFromWindow();
|
||||
|
||||
protected:
|
||||
wxString* m_stringValue;
|
||||
wxString m_errormsg;
|
||||
|
||||
bool wxIsAlphaNumeric(const wxString& val);
|
||||
virtual bool CheckValidator() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
// $Id$
|
||||
//
|
||||
// The contents of this file are subject to the BOINC Public License
|
||||
// Version 1.0 (the "License"); you may not use this file except in
|
||||
// compliance with the License. You may obtain a copy of the License at
|
||||
// http://boinc.berkeley.edu/license_1.0.txt
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS"
|
||||
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
// License for the specific language governing rights and limitations
|
||||
// under the License.
|
||||
//
|
||||
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
||||
//
|
||||
// The Initial Developer of the Original Code is the SETI@home project.
|
||||
// Portions created by the SETI@home project are Copyright (C) 2002
|
||||
// University of California at Berkeley. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
//
|
||||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.1 2004/09/22 21:53:05 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
//
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma implementation "ValidateAccountKey.h"
|
||||
#endif
|
||||
|
||||
#include "stdwx.h"
|
||||
#include "ValidateURL.h"
|
||||
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(CValidateURL, wxValidator)
|
||||
|
||||
|
||||
CValidateURL::CValidateURL(wxString *val)
|
||||
{
|
||||
m_stringValue = val ;
|
||||
}
|
||||
|
||||
|
||||
CValidateURL::CValidateURL(const CValidateURL& val)
|
||||
: wxValidator()
|
||||
{
|
||||
Copy(val);
|
||||
}
|
||||
|
||||
|
||||
CValidateURL::~CValidateURL()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
bool CValidateURL::Copy(const CValidateURL& val)
|
||||
{
|
||||
wxValidator::Copy(val);
|
||||
|
||||
m_stringValue = val.m_stringValue ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool CValidateURL::Validate(wxWindow *parent)
|
||||
{
|
||||
if( !CheckValidator() )
|
||||
return FALSE;
|
||||
|
||||
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
|
||||
|
||||
if ( !control->IsEnabled() )
|
||||
return TRUE;
|
||||
|
||||
wxURL val(control->GetValue());
|
||||
|
||||
bool ok = TRUE;
|
||||
|
||||
if ( wxURL_NOERR != val.GetError() )
|
||||
{
|
||||
ok = FALSE;
|
||||
|
||||
if ( wxURL_SNTXERR == val.GetError() )
|
||||
m_errormsg = _("'%s' contains a syntax error.");
|
||||
else if ( wxURL_NOPROTO == val.GetError() )
|
||||
m_errormsg = _("'%s' does not contain a protocol which can get this URL.");
|
||||
else if ( wxURL_NOHOST == val.GetError() )
|
||||
m_errormsg = _("'%s' does not contain a host name.");
|
||||
else if ( wxURL_NOPATH == val.GetError() )
|
||||
m_errormsg = _("'%s' does not contain a valid path.");
|
||||
}
|
||||
|
||||
if ( !ok )
|
||||
{
|
||||
wxASSERT_MSG( !m_errormsg.empty(), _T("you forgot to set errormsg") );
|
||||
|
||||
m_validatorWindow->SetFocus();
|
||||
|
||||
wxString buf;
|
||||
buf.Printf(m_errormsg, control->GetValue());
|
||||
|
||||
wxMessageBox(buf, _("Validation conflict"),
|
||||
wxOK | wxICON_EXCLAMATION, parent);
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
bool CValidateURL::TransferToWindow(void)
|
||||
{
|
||||
if( !CheckValidator() )
|
||||
return FALSE;
|
||||
|
||||
if (!m_stringValue)
|
||||
return TRUE;
|
||||
|
||||
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
|
||||
control->SetValue(* m_stringValue) ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool CValidateURL::TransferFromWindow(void)
|
||||
{
|
||||
if( !CheckValidator() )
|
||||
return FALSE;
|
||||
|
||||
if (!m_stringValue)
|
||||
return TRUE;
|
||||
|
||||
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
|
||||
* m_stringValue = control->GetValue() ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
bool CValidateURL::CheckValidator() const
|
||||
{
|
||||
wxCHECK_MSG( m_validatorWindow, FALSE,
|
||||
_T("No window associated with validator") );
|
||||
wxCHECK_MSG( m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)), FALSE,
|
||||
_T("wxTextValidator is only for wxTextCtrl's") );
|
||||
wxCHECK_MSG( m_stringValue, FALSE,
|
||||
_T("No variable storage for validator") );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
// $Id$
|
||||
//
|
||||
// The contents of this file are subject to the BOINC Public License
|
||||
// Version 1.0 (the "License"); you may not use this file except in
|
||||
// compliance with the License. You may obtain a copy of the License at
|
||||
// http://boinc.berkeley.edu/license_1.0.txt
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS"
|
||||
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
// License for the specific language governing rights and limitations
|
||||
// under the License.
|
||||
//
|
||||
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
||||
//
|
||||
// The Initial Developer of the Original Code is the SETI@home project.
|
||||
// Portions created by the SETI@home project are Copyright (C) 2002
|
||||
// University of California at Berkeley. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
//
|
||||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.1 2004/09/22 21:53:07 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef _VALIDATEURL_H_
|
||||
#define _VALIDATEURL_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "ValidateURL.cpp"
|
||||
#endif
|
||||
|
||||
|
||||
class CValidateURL : public wxValidator
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( CValidateURL )
|
||||
|
||||
public:
|
||||
|
||||
CValidateURL( wxString *val = 0 );
|
||||
CValidateURL( const CValidateURL& val );
|
||||
|
||||
~CValidateURL();
|
||||
|
||||
virtual wxObject* Clone() const { return new CValidateURL(*this); }
|
||||
virtual bool Copy( const CValidateURL& val );
|
||||
|
||||
virtual bool Validate(wxWindow *parent);
|
||||
virtual bool TransferToWindow();
|
||||
virtual bool TransferFromWindow();
|
||||
|
||||
protected:
|
||||
wxString* m_stringValue;
|
||||
wxString m_errormsg;
|
||||
|
||||
virtual bool CheckValidator() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -21,6 +21,9 @@
|
|||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.2 2004/09/22 21:53:03 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
// Revision 1.1 2004/09/21 01:26:25 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
|
@ -34,6 +37,7 @@
|
|||
#include "BOINCGUIApp.h"
|
||||
#include "MainDocument.h"
|
||||
#include "ViewProjects.h"
|
||||
#include "DlgAttachProject.h"
|
||||
#include "Events.h"
|
||||
|
||||
#include "res/proj.xpm"
|
||||
|
@ -42,6 +46,22 @@
|
|||
#include "res/tips.xpm"
|
||||
|
||||
|
||||
#define VIEW_HEADER "proj"
|
||||
|
||||
#define SECTION_TASK VIEW_HEADER "task"
|
||||
#define SECTION_WEB VIEW_HEADER "web"
|
||||
#define SECTION_TIPS VIEW_HEADER "tips"
|
||||
|
||||
#define BITMAP_PROJECTS VIEW_HEADER ".xpm"
|
||||
#define BITMAP_TASKHEADER SECTION_TASK ".xpm"
|
||||
#define BITMAP_WEBHEADER SECTION_WEB ".xpm"
|
||||
#define BITMAP_TIPSHEADER SECTION_TIPS ".xpm"
|
||||
|
||||
#define LINK_TASKATTACH SECTION_TASK "attach"
|
||||
#define LINK_TASKDETACH SECTION_TASK "detach"
|
||||
#define LINK_TASKUPDATE SECTION_TASK "update"
|
||||
#define LINK_TASKRESET SECTION_TASK "reset"
|
||||
|
||||
#define COLUMN_PROJECT 0
|
||||
#define COLUMN_ACCOUNTNAME 1
|
||||
#define COLUMN_TEAMNAME 2
|
||||
|
@ -59,8 +79,8 @@ END_EVENT_TABLE()
|
|||
|
||||
CViewProjects::CViewProjects()
|
||||
{
|
||||
wxLogTrace("CViewProjects::CViewProjects - Function Begining");
|
||||
wxLogTrace("CViewProjects::CViewProjects - Function Ending");
|
||||
wxLogTrace(wxT("CViewProjects::CViewProjects - Function Begining"));
|
||||
wxLogTrace(wxT("CViewProjects::CViewProjects - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,12 +98,15 @@ CViewProjects::CViewProjects(wxNotebook* pNotebook) :
|
|||
wxBitmap bmpTips(tips_xpm);
|
||||
|
||||
bmpProject.SetMask(new wxMask(bmpProject, wxColour(255, 0, 255)));
|
||||
bmpTask.SetMask(new wxMask(bmpTask, wxColour(255, 0, 255)));
|
||||
bmpWeb.SetMask(new wxMask(bmpWeb, wxColour(255, 0, 255)));
|
||||
bmpTips.SetMask(new wxMask(bmpTips, wxColour(255, 0, 255)));
|
||||
|
||||
m_pTaskPane->AddVirtualFile(_T("proj.xpm"), bmpProject, wxBITMAP_TYPE_XPM);
|
||||
m_pTaskPane->AddVirtualFile(wxT(BITMAP_PROJECTS), bmpProject, wxBITMAP_TYPE_XPM);
|
||||
|
||||
m_pTaskPane->CreateTaskHeader(_T("projheader.xpm"), bmpTask, _("Tasks"));
|
||||
m_pTaskPane->CreateTaskHeader(_T("projweb.xpm"), bmpWeb, _("Websites"));
|
||||
m_pTaskPane->CreateTaskHeader(_T("projtips.xpm"), bmpTips, _("Quick Tips"));
|
||||
m_pTaskPane->CreateTaskHeader(wxT(BITMAP_TASKHEADER), bmpTask, _("Tasks"));
|
||||
m_pTaskPane->CreateTaskHeader(wxT(BITMAP_WEBHEADER), bmpWeb, _("Websites"));
|
||||
m_pTaskPane->CreateTaskHeader(wxT(BITMAP_TIPSHEADER), bmpTips, _("Quick Tips"));
|
||||
|
||||
m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, -1);
|
||||
m_pListPane->InsertColumn(COLUMN_ACCOUNTNAME, _("Account"), wxLIST_FORMAT_LEFT, -1);
|
||||
|
@ -92,14 +115,18 @@ CViewProjects::CViewProjects(wxNotebook* pNotebook) :
|
|||
m_pListPane->InsertColumn(COLUMN_AVGCREDIT, _("Avg. Credit"), wxLIST_FORMAT_LEFT, -1);
|
||||
m_pListPane->InsertColumn(COLUMN_RESOURCESHARE, _("Resource Share"), wxLIST_FORMAT_LEFT, -1);
|
||||
|
||||
bTaskHeaderHidden = false;
|
||||
bWebsiteHeaderHidden = false;
|
||||
bTipsHeaderHidden = false;
|
||||
|
||||
UpdateTaskPane();
|
||||
}
|
||||
|
||||
|
||||
CViewProjects::~CViewProjects()
|
||||
{
|
||||
wxLogTrace("CViewProjects::~CViewProjects - Function Begining");
|
||||
wxLogTrace("CViewProjects::~CViewProjects - Function Ending");
|
||||
wxLogTrace(wxT("CViewProjects::~CViewProjects - Function Begining"));
|
||||
wxLogTrace(wxT("CViewProjects::~CViewProjects - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -115,60 +142,9 @@ char** CViewProjects::GetViewIcon()
|
|||
}
|
||||
|
||||
|
||||
void CViewProjects::UpdateTaskPane()
|
||||
{
|
||||
wxLogTrace("CViewProjects::UpdateTaskPane - Function Begining");
|
||||
|
||||
wxASSERT(NULL != m_pTaskPane);
|
||||
|
||||
m_pTaskPane->BeginTaskPage();
|
||||
|
||||
m_pTaskPane->BeginTaskSection( _T("projheader.xpm"), false );
|
||||
m_pTaskPane->CreateTask(_T("proj.xpm"),
|
||||
_("Attach to Project"),
|
||||
_(""));
|
||||
m_pTaskPane->CreateTask(_T("proj.xpm"),
|
||||
_("Detach from Project"),
|
||||
_(""));
|
||||
m_pTaskPane->CreateTask(_T("proj.xpm"),
|
||||
_("Update Project"),
|
||||
_(""));
|
||||
m_pTaskPane->CreateTask(_T("proj.xpm"),
|
||||
_("Reset Project"),
|
||||
_(""));
|
||||
m_pTaskPane->EndTaskSection();
|
||||
|
||||
m_pTaskPane->BeginTaskSection( _T("projweb.xpm"), false );
|
||||
m_pTaskPane->CreateTask(_T("proj.xpm"),
|
||||
_("BOINC"),
|
||||
_(""));
|
||||
m_pTaskPane->CreateTask(_T("proj.xpm"),
|
||||
_("FAQ"),
|
||||
_(""));
|
||||
m_pTaskPane->CreateTask(_T("proj.xpm"),
|
||||
_("Project"),
|
||||
_(""));
|
||||
m_pTaskPane->CreateTask(_T("proj.xpm"),
|
||||
_("Team"),
|
||||
_(""));
|
||||
m_pTaskPane->CreateTask(_T("proj.xpm"),
|
||||
_("User"),
|
||||
_(""));
|
||||
m_pTaskPane->EndTaskSection();
|
||||
|
||||
m_pTaskPane->BeginTaskSection( _T("projtips.xpm"), false );
|
||||
m_pTaskPane->CreateQuickTip(_("Please select a project to see additional options."));
|
||||
m_pTaskPane->EndTaskSection();
|
||||
|
||||
m_pTaskPane->EndTaskPage();
|
||||
|
||||
wxLogTrace("CViewProjects::UpdateTaskPane - Function Ending");
|
||||
}
|
||||
|
||||
|
||||
void CViewProjects::OnRender(wxTimerEvent &event)
|
||||
{
|
||||
wxLogTrace("CViewProjects::OnRender - Processing Render Event...");
|
||||
wxLogTrace(wxT("CViewProjects::OnRender - Processing Render Event..."));
|
||||
if (!m_bProcessingRenderEvent)
|
||||
{
|
||||
m_bProcessingRenderEvent = true;
|
||||
|
@ -186,6 +162,39 @@ void CViewProjects::OnRender(wxTimerEvent &event)
|
|||
}
|
||||
|
||||
|
||||
void CViewProjects::OnLinkClicked( const wxHtmlLinkInfo& link )
|
||||
{
|
||||
wxLogTrace(wxT("CViewProjects::OnLinkClicked - Function Begining"));
|
||||
|
||||
if ( link.GetHref() == wxT(SECTION_TASK) )
|
||||
bTaskHeaderHidden ? bTaskHeaderHidden = false : bTaskHeaderHidden = true;
|
||||
|
||||
|
||||
if ( link.GetHref() == wxT(LINK_TASKATTACH) )
|
||||
{
|
||||
CDlgAttachProject* pDlg = new CDlgAttachProject(this);
|
||||
wxASSERT(NULL != pDlg);
|
||||
|
||||
pDlg->ShowModal();
|
||||
|
||||
if (pDlg)
|
||||
pDlg->Destroy();
|
||||
}
|
||||
|
||||
|
||||
if ( link.GetHref() == wxT(SECTION_WEB) )
|
||||
bWebsiteHeaderHidden ? bWebsiteHeaderHidden = false : bWebsiteHeaderHidden = true;
|
||||
|
||||
if ( link.GetHref() == wxT(SECTION_TIPS) )
|
||||
bTipsHeaderHidden ? bTipsHeaderHidden = false : bTipsHeaderHidden = true;
|
||||
|
||||
|
||||
UpdateTaskPane();
|
||||
|
||||
wxLogTrace(wxT("CViewProjects::OnLinkClicked - Function Ending"));
|
||||
}
|
||||
|
||||
|
||||
wxString CViewProjects::OnGetItemText(long item, long column) const {
|
||||
wxString strBuffer;
|
||||
switch(column) {
|
||||
|
@ -213,3 +222,109 @@ wxString CViewProjects::OnGetItemText(long item, long column) const {
|
|||
return strBuffer;
|
||||
}
|
||||
|
||||
|
||||
void CViewProjects::UpdateTaskPane()
|
||||
{
|
||||
wxLogTrace(wxT("CViewProjects::UpdateTaskPane - Function Begining"));
|
||||
|
||||
wxASSERT(NULL != m_pTaskPane);
|
||||
|
||||
m_pTaskPane->BeginTaskPage();
|
||||
|
||||
|
||||
m_pTaskPane->BeginTaskSection(
|
||||
wxT(SECTION_TASK),
|
||||
wxT(BITMAP_TASKHEADER),
|
||||
bTaskHeaderHidden
|
||||
);
|
||||
if (!bTaskHeaderHidden)
|
||||
{
|
||||
m_pTaskPane->CreateTask(
|
||||
wxT(LINK_TASKATTACH),
|
||||
wxT(BITMAP_PROJECTS),
|
||||
_("Attach to Project"),
|
||||
_("")
|
||||
);
|
||||
m_pTaskPane->CreateTask(
|
||||
wxT(""),
|
||||
wxT(BITMAP_PROJECTS),
|
||||
_("Detach from Project"),
|
||||
_("")
|
||||
);
|
||||
m_pTaskPane->CreateTask(
|
||||
wxT(""),
|
||||
wxT(BITMAP_PROJECTS),
|
||||
_("Update Project"),
|
||||
_("")
|
||||
);
|
||||
m_pTaskPane->CreateTask(
|
||||
wxT(""),
|
||||
wxT(BITMAP_PROJECTS),
|
||||
_("Reset Project"),
|
||||
_("")
|
||||
);
|
||||
}
|
||||
m_pTaskPane->EndTaskSection(
|
||||
bTaskHeaderHidden
|
||||
);
|
||||
|
||||
|
||||
m_pTaskPane->BeginTaskSection(
|
||||
wxT(SECTION_WEB),
|
||||
wxT(BITMAP_WEBHEADER),
|
||||
bWebsiteHeaderHidden
|
||||
);
|
||||
if (!bWebsiteHeaderHidden)
|
||||
{
|
||||
m_pTaskPane->CreateTask(
|
||||
wxT(""),
|
||||
wxT(BITMAP_PROJECTS),
|
||||
_("BOINC"),
|
||||
_("")
|
||||
);
|
||||
m_pTaskPane->CreateTask(
|
||||
wxT(""),
|
||||
wxT(BITMAP_PROJECTS),
|
||||
_("FAQ"),
|
||||
_("")
|
||||
);
|
||||
m_pTaskPane->CreateTask(
|
||||
wxT(""),
|
||||
wxT(BITMAP_PROJECTS),
|
||||
_("Project"),
|
||||
_("")
|
||||
);
|
||||
m_pTaskPane->CreateTask(
|
||||
wxT(""),
|
||||
wxT(BITMAP_PROJECTS),
|
||||
_("Team"),
|
||||
_(""));
|
||||
m_pTaskPane->CreateTask(
|
||||
wxT(""),
|
||||
wxT(BITMAP_PROJECTS),
|
||||
_("User"),
|
||||
_("")
|
||||
);
|
||||
}
|
||||
m_pTaskPane->EndTaskSection(bWebsiteHeaderHidden);
|
||||
|
||||
|
||||
m_pTaskPane->BeginTaskSection(
|
||||
wxT(SECTION_TIPS),
|
||||
wxT(BITMAP_TIPSHEADER),
|
||||
bTipsHeaderHidden
|
||||
);
|
||||
if (!bTipsHeaderHidden)
|
||||
{
|
||||
m_pTaskPane->CreateQuickTip(
|
||||
_("Please select a project to see additional options.")
|
||||
);
|
||||
}
|
||||
m_pTaskPane->EndTaskSection(bTipsHeaderHidden);
|
||||
|
||||
|
||||
m_pTaskPane->EndTaskPage();
|
||||
|
||||
wxLogTrace(wxT("CViewProjects::UpdateTaskPane - Function Ending"));
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
// Revision History:
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.2 2004/09/22 21:53:03 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
// Revision 1.1 2004/09/21 01:26:25 rwalton
|
||||
// *** empty log message ***
|
||||
//
|
||||
|
@ -51,14 +54,25 @@ public:
|
|||
virtual wxString GetViewName();
|
||||
virtual char** GetViewIcon();
|
||||
|
||||
virtual void UpdateTaskPane();
|
||||
|
||||
virtual void OnRender( wxTimerEvent& event );
|
||||
|
||||
virtual wxString OnGetItemText(long item, long column) const;
|
||||
virtual void OnLinkClicked( const wxHtmlLinkInfo& link );
|
||||
virtual wxString OnGetItemText( long item, long column ) const;
|
||||
|
||||
private:
|
||||
|
||||
virtual void UpdateTaskPane();
|
||||
|
||||
bool bTaskHeaderHidden;
|
||||
bool bTaskAttachToProjectHidden;
|
||||
bool bTaskDetachFromProjectHidden;
|
||||
bool bTaskUpdateProjectHidden;
|
||||
bool bTaskResetProjectHidden;
|
||||
|
||||
bool bWebsiteHeaderHidden;
|
||||
|
||||
bool bTipsHeaderHidden;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: BOINC Manager 3.x\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2004-09-16 17:21-0800\n"
|
||||
"PO-Revision-Date: 2004-09-21 16:48-0800\n"
|
||||
"Last-Translator: Rom Walton <rwalton@ssl.berkeley.edu>\n"
|
||||
"Language-Team: BOINC Development Team <rwalton@ssl.berkeley.edu>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
@ -14,11 +14,11 @@ msgstr ""
|
|||
"X-Poedit-Basepath: C:\\BOINCSRC\\Main\\boinc\n"
|
||||
"X-Poedit-SearchPath-0: clientgui\n"
|
||||
|
||||
#: clientgui/BOINCGUIApp.cpp:118
|
||||
#: clientgui/BOINCGUIApp.cpp:128
|
||||
msgid "You have specified -e on the commmand line. The application will exit now."
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/BOINCGUIApp.cpp:119
|
||||
#: clientgui/BOINCGUIApp.cpp:129
|
||||
msgid "Example command line option"
|
||||
msgstr ""
|
||||
|
||||
|
@ -102,28 +102,20 @@ msgstr ""
|
|||
msgid "SOCKS Proxy"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MainFrame.cpp:151
|
||||
#: clientgui/MainFrame.cpp:156
|
||||
msgid "E&xit"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MainFrame.cpp:155
|
||||
msgid "&Attach to Project..."
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MainFrame.cpp:159
|
||||
#: clientgui/MainFrame.cpp:160
|
||||
msgid "&Options"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MainFrame.cpp:163
|
||||
#: clientgui/MainFrame.cpp:164
|
||||
msgid "&About BOINC..."
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MainFrame.cpp:167
|
||||
msgid "&File"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MainFrame.cpp:168
|
||||
msgid "&Commands"
|
||||
msgid "&File"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MainFrame.cpp:169
|
||||
|
@ -134,101 +126,148 @@ msgstr ""
|
|||
msgid "&Help"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MessagesView.cpp:83
|
||||
#: clientgui/ProjectsView.cpp:85
|
||||
#: clientgui/TransfersView.cpp:84
|
||||
#: clientgui/WorkView.cpp:87
|
||||
#: clientgui/ViewMessages.cpp:69
|
||||
#: clientgui/ViewProjects.cpp:109
|
||||
#: clientgui/ViewProjects.cpp:292
|
||||
#: clientgui/ViewTransfers.cpp:73
|
||||
#: clientgui/ViewWork.cpp:74
|
||||
msgid "Project"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MessagesView.cpp:84
|
||||
#: clientgui/TransfersView.cpp:88
|
||||
#: clientgui/ViewMessages.cpp:70
|
||||
#: clientgui/ViewTransfers.cpp:77
|
||||
msgid "Time"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MessagesView.cpp:85
|
||||
#: clientgui/ViewMessages.cpp:71
|
||||
msgid "Message"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/MessagesView.cpp:96
|
||||
#: clientgui/ViewMessages.cpp:84
|
||||
msgid "Messages"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ProjectsView.cpp:86
|
||||
#: clientgui/ViewProjects.cpp:105
|
||||
msgid "Tasks"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewProjects.cpp:106
|
||||
msgid "Websites"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewProjects.cpp:107
|
||||
msgid "Quick Tips"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewProjects.cpp:110
|
||||
msgid "Account"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ProjectsView.cpp:87
|
||||
#: clientgui/ViewProjects.cpp:111
|
||||
#: clientgui/ViewProjects.cpp:298
|
||||
msgid "Team"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ProjectsView.cpp:88
|
||||
#: clientgui/ViewProjects.cpp:112
|
||||
msgid "Total Credit"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ProjectsView.cpp:89
|
||||
#: clientgui/ViewProjects.cpp:113
|
||||
msgid "Avg. Credit"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ProjectsView.cpp:90
|
||||
#: clientgui/ViewProjects.cpp:114
|
||||
msgid "Resource Share"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ProjectsView.cpp:101
|
||||
#: clientgui/ViewProjects.cpp:133
|
||||
msgid "Projects"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ResourceUtilizationView.cpp:85
|
||||
#: clientgui/ViewProjects.cpp:243
|
||||
#: clientgui/DlgAttachProject.h:39
|
||||
msgid "Attach to Project"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewProjects.cpp:249
|
||||
msgid "Detach from Project"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewProjects.cpp:255
|
||||
msgid "Update Project"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewProjects.cpp:261
|
||||
msgid "Reset Project"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewProjects.cpp:280
|
||||
msgid "BOINC"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewProjects.cpp:286
|
||||
msgid "FAQ"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewProjects.cpp:303
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewProjects.cpp:318
|
||||
msgid "Please select a project to see additional options."
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/ViewResources.cpp:76
|
||||
msgid "Disk"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/TransfersView.cpp:85
|
||||
#: clientgui/ViewTransfers.cpp:74
|
||||
msgid "File"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/TransfersView.cpp:86
|
||||
#: clientgui/WorkView.cpp:91
|
||||
#: clientgui/ViewTransfers.cpp:75
|
||||
#: clientgui/ViewWork.cpp:78
|
||||
msgid "Progress"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/TransfersView.cpp:87
|
||||
#: clientgui/ViewTransfers.cpp:76
|
||||
msgid "Size"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/TransfersView.cpp:89
|
||||
#: clientgui/ViewTransfers.cpp:78
|
||||
msgid "Speed"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/TransfersView.cpp:90
|
||||
#: clientgui/WorkView.cpp:94
|
||||
#: clientgui/ViewTransfers.cpp:79
|
||||
#: clientgui/ViewWork.cpp:81
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/TransfersView.cpp:101
|
||||
#: clientgui/ViewTransfers.cpp:92
|
||||
msgid "Transfers"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/WorkView.cpp:88
|
||||
#: clientgui/ViewWork.cpp:75
|
||||
msgid "Application"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/WorkView.cpp:89
|
||||
#: clientgui/ViewWork.cpp:76
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/WorkView.cpp:90
|
||||
#: clientgui/ViewWork.cpp:77
|
||||
msgid "CPU time"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/WorkView.cpp:92
|
||||
#: clientgui/ViewWork.cpp:79
|
||||
msgid "To Completetion"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/WorkView.cpp:93
|
||||
#: clientgui/ViewWork.cpp:80
|
||||
msgid "Report Deadline"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/WorkView.cpp:105
|
||||
#: clientgui/ViewWork.cpp:94
|
||||
msgid "Work"
|
||||
msgstr ""
|
||||
|
||||
|
@ -236,10 +275,6 @@ msgstr ""
|
|||
msgid "About BOINC"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/DlgAttachProject.h:39
|
||||
msgid "Attach to Project"
|
||||
msgstr ""
|
||||
|
||||
#: clientgui/DlgConnection.h:39
|
||||
msgid "Connection"
|
||||
msgstr ""
|
||||
|
|
Loading…
Reference in New Issue