mirror of https://github.com/BOINC/boinc.git
wxWidgets 2.9/3.0 changes
This commit is contained in:
parent
4df017de3c
commit
243dc79b52
|
@ -37,7 +37,7 @@
|
|||
|
||||
extern bool s_bSkipExitConfirmation;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
#if 0 //def __WXMAC__
|
||||
|
||||
#ifdef HAVE_PTHREAD_MUTEXATTR_T
|
||||
// on some systems pthread_mutexattr_settype() is not in the headers (but it is
|
||||
|
@ -864,7 +864,7 @@ int CMainDocument::RequestRPC(ASYNC_RPC_REQUEST& request, bool hasPriority) {
|
|||
pFrame = wxGetApp().GetFrame();
|
||||
wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, wxID_EXIT);
|
||||
s_bSkipExitConfirmation = true;
|
||||
pFrame->AddPendingEvent(evt);
|
||||
pFrame->GetEventHandler()->AddPendingEvent(evt);
|
||||
}
|
||||
}
|
||||
if (m_RPCWaitDlg) {
|
||||
|
@ -1138,7 +1138,7 @@ void CMainDocument::HandleCompletedRPC() {
|
|||
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
|
||||
if (pFrame) {
|
||||
CFrameEvent event(wxEVT_FRAME_REFRESHVIEW, pFrame);
|
||||
pFrame->ProcessEvent(event);
|
||||
pFrame->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
#include <pthread.h>
|
||||
|
||||
|
||||
#if 1
|
||||
#define BOINC_Mutex wxMutex
|
||||
#define BOINC_Condition wxCondition
|
||||
#else
|
||||
class BOINC_Mutex
|
||||
{
|
||||
public:
|
||||
|
@ -76,7 +80,7 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
class CMainDocument; // Forward declaration
|
||||
|
||||
|
|
|
@ -315,6 +315,7 @@ void CBOINCBaseView::OnListRender(wxTimerEvent& event) {
|
|||
wxASSERT(!iReturnValue);
|
||||
}
|
||||
wxASSERT(GetDocCount() == GetCacheCount());
|
||||
//fprintf(stderr, "CBOINCBaseView::OnListRender(): m_pListPane->RefreshItems(0, %d)\n", iDocCount - 1);
|
||||
m_pListPane->RefreshItems(0, iDocCount - 1);
|
||||
m_bNeedSort = true;
|
||||
}
|
||||
|
@ -732,8 +733,11 @@ void CBOINCBaseView::UpdateSelection(){
|
|||
|
||||
void CBOINCBaseView::PostUpdateSelection(){
|
||||
wxASSERT(m_pTaskPane);
|
||||
m_pTaskPane->UpdateControls();
|
||||
Layout();
|
||||
if (m_pTaskPane->UpdateControls()) {
|
||||
// Under wxWidgets 2.9.4, Layout() causes ListCtrl
|
||||
// to repaint, so call only when actually needed.
|
||||
Layout();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -353,12 +353,9 @@ bool CBOINCGUIApp::OnInit() {
|
|||
}
|
||||
strDialogMessage += _(")");
|
||||
|
||||
fprintf(stderr, "%ls ownership or permissions are not set properly; please reinstall %ls.\n(Error code %d at %s)",
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationShortName().c_str(),
|
||||
m_pSkinManager->GetAdvanced()->GetApplicationShortName().c_str(),
|
||||
iErrorCode, path_to_error
|
||||
);
|
||||
fprintf(stderr, "%s\n", (const char*)strDialogMessage.utf8_str());
|
||||
}
|
||||
|
||||
wxMessageDialog* pDlg = new wxMessageDialog(
|
||||
NULL,
|
||||
strDialogMessage,
|
||||
|
@ -526,22 +523,22 @@ int CBOINCGUIApp::OnExit() {
|
|||
void CBOINCGUIApp::OnInitCmdLine(wxCmdLineParser &parser) {
|
||||
wxApp::OnInitCmdLine(parser);
|
||||
static const wxCmdLineEntryDesc cmdLineDesc[] = {
|
||||
{ wxCMD_LINE_SWITCH, wxT("a"), wxT("autostart"), _("BOINC Manager was started by the operating system automatically")},
|
||||
{ wxCMD_LINE_SWITCH, "a", "autostart", _("BOINC Manager was started by the operating system automatically")},
|
||||
#if defined(__WXMSW__) || defined(__WXMAC__)
|
||||
{ wxCMD_LINE_SWITCH, wxT("s"), wxT("systray"), _("Startup BOINC so only the system tray icon is visible")},
|
||||
{ wxCMD_LINE_SWITCH, "s", "systray", _("Startup BOINC so only the system tray icon is visible")},
|
||||
#else
|
||||
{ wxCMD_LINE_OPTION, wxT("e"), wxT("clientdir"), _("Directory containing the BOINC Client executable")},
|
||||
{ wxCMD_LINE_OPTION, wxT("d"), wxT("datadir"), _("BOINC data directory")},
|
||||
{ wxCMD_LINE_OPTION, "e", "clientdir", _("Directory containing the BOINC Client executable")},
|
||||
{ wxCMD_LINE_OPTION, "d", "datadir", _("BOINC data directory")},
|
||||
#endif
|
||||
{ wxCMD_LINE_OPTION, wxT("n"), wxT("namehost"), _("Host name or IP address")},
|
||||
{ wxCMD_LINE_OPTION, wxT("g"), wxT("gui_rpc_port"), _("GUI RPC port number")},
|
||||
{ wxCMD_LINE_OPTION, wxT("p"), wxT("password"), _("Password")},
|
||||
{ wxCMD_LINE_OPTION, wxT("b"), wxT("boincargs"), _("Startup BOINC with these optional arguments")},
|
||||
{ wxCMD_LINE_SWITCH, wxT("i"), wxT("insecure"), _("disable BOINC security users and permissions")},
|
||||
{ wxCMD_LINE_SWITCH, wxT("c"), wxT("checkskins"), _("set skin debugging mode to enable skin manager error messages")},
|
||||
{ wxCMD_LINE_SWITCH, wxT("m"), wxT("multiple"), _("multiple instances of BOINC Manager allowed")},
|
||||
{ wxCMD_LINE_OPTION, "n", "namehost", _("Host name or IP address")},
|
||||
{ wxCMD_LINE_OPTION, "g", "gui_rpc_port", _("GUI RPC port number")},
|
||||
{ wxCMD_LINE_OPTION, "p", "password", _("Password")},
|
||||
{ wxCMD_LINE_OPTION, "b", "boincargs", _("Startup BOINC with these optional arguments")},
|
||||
{ wxCMD_LINE_SWITCH, "i","insecure", _("disable BOINC security users and permissions")},
|
||||
{ wxCMD_LINE_SWITCH, "c", "checkskins", _("set skin debugging mode to enable skin manager error messages")},
|
||||
{ wxCMD_LINE_SWITCH, "m", "multiple", _("multiple instances of BOINC Manager allowed")},
|
||||
#if (defined(__WXMAC__) && defined(_DEBUG))
|
||||
{ wxCMD_LINE_OPTION, wxT("NSDocumentRevisionsDebugMode"), NULL, _("Not used: workaround for bug in XCode 4.2")},
|
||||
{ wxCMD_LINE_OPTION, "NSDocumentRevisionsDebugMode", NULL, _("Not used: workaround for bug in XCode 4.2")},
|
||||
#endif
|
||||
{ wxCMD_LINE_NONE} //DON'T forget this line!!
|
||||
};
|
||||
|
@ -928,19 +925,12 @@ bool CBOINCGUIApp::SetActiveGUI(int iGUISelection, bool bShowWindow) {
|
|||
m_pConfig->SetPath(wxT("/Simple"));
|
||||
m_pConfig->Read(wxT("YPos"), &iTop, 30);
|
||||
m_pConfig->Read(wxT("XPos"), &iLeft, 30);
|
||||
|
||||
// We don't save Simple View's width & height since it's
|
||||
// window is not resizable, so don't try to read them
|
||||
#ifdef __WXMAC__
|
||||
// m_pConfig->Read(wxT("Width"), &iWidth, 409);
|
||||
// m_pConfig->Read(wxT("Height"), &iHeight, 561);
|
||||
iWidth = 409;
|
||||
iHeight = 561;
|
||||
m_pConfig->Read(wxT("Width"), &iWidth, 409);
|
||||
m_pConfig->Read(wxT("Height"), &iHeight, 561);
|
||||
#else
|
||||
// m_pConfig->Read(wxT("Width"), &iWidth, 416);
|
||||
// m_pConfig->Read(wxT("Height"), &iHeight, 570);
|
||||
iWidth = 416;
|
||||
iHeight = 570;
|
||||
m_pConfig->Read(wxT("Width"), &iWidth, 416);
|
||||
m_pConfig->Read(wxT("Height"), &iHeight, 570);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "Events.h"
|
||||
|
||||
|
||||
#if USE_NATIVE_LISTCONTROL
|
||||
#if 1 // USE_NATIVE_LISTCONTROL
|
||||
DEFINE_EVENT_TYPE(wxEVT_DRAW_PROGRESSBAR)
|
||||
|
||||
BEGIN_EVENT_TABLE(CBOINCListCtrl, LISTCTRL_BASE)
|
||||
|
@ -53,9 +53,8 @@ CBOINCListCtrl::CBOINCListCtrl(
|
|||
|
||||
m_bIsSingleSelection = (iListWindowFlags & wxLC_SINGLE_SEL) ? true : false ;
|
||||
|
||||
#if USE_NATIVE_LISTCONTROL
|
||||
m_bProgressBarEventPending = false;
|
||||
#else
|
||||
#if ! USE_NATIVE_LISTCONTROL
|
||||
#ifdef __WXMAC__
|
||||
SetupMacAccessibilitySupport();
|
||||
#endif
|
||||
|
@ -73,7 +72,7 @@ CBOINCListCtrl::~CBOINCListCtrl()
|
|||
{
|
||||
m_iRowsNeedingProgressBars.Clear();
|
||||
#ifdef __WXMAC__
|
||||
#if !USE_NATIVE_LISTCONTROL
|
||||
#if ! USE_NATIVE_LISTCONTROL
|
||||
RemoveMacAccessibilitySupport();
|
||||
#endif
|
||||
#endif
|
||||
|
@ -267,14 +266,14 @@ wxListItemAttr* CBOINCListCtrl::OnGetItemAttr(long item) const {
|
|||
|
||||
void CBOINCListCtrl::DrawProgressBars()
|
||||
{
|
||||
long topItem, numItems, numVisibleItems, row;
|
||||
long topItem, numItems, numVisibleItems, i, row;
|
||||
wxRect r, rr;
|
||||
int w = 0, x = 0, xx, yy, ww;
|
||||
int progressColumn = m_pParentView->GetProgressColumn();
|
||||
|
||||
m_bProgressBarEventPending = false;
|
||||
#if USE_NATIVE_LISTCONTROL
|
||||
wxClientDC dc(this);
|
||||
m_bProgressBarEventPending = false;
|
||||
#else
|
||||
wxClientDC dc(GetMainWin()); // Available only in wxGenericListCtrl
|
||||
#endif
|
||||
|
@ -300,12 +299,12 @@ void CBOINCListCtrl::DrawProgressBars()
|
|||
if (numItems <= (topItem + numVisibleItems)) numVisibleItems = numItems - topItem;
|
||||
|
||||
x = 0;
|
||||
for (int i=0; i< progressColumn; i++) {
|
||||
for (i=0; i< progressColumn; i++) {
|
||||
x += GetColumnWidth(i);
|
||||
}
|
||||
w = GetColumnWidth(progressColumn);
|
||||
|
||||
#if USE_NATIVE_LISTCONTROL
|
||||
#if 1 //USE_NATIVE_LISTCONTROL
|
||||
x -= GetScrollPos(wxHORIZONTAL);
|
||||
#else
|
||||
GetMainWin()->CalcScrolledPosition(x, 0, &x, &yy);
|
||||
|
@ -385,7 +384,7 @@ void CBOINCListCtrl::DrawProgressBars()
|
|||
m_iRowsNeedingProgressBars.Clear();
|
||||
}
|
||||
|
||||
#if USE_NATIVE_LISTCONTROL
|
||||
#if 1 //USE_NATIVE_LISTCONTROL
|
||||
|
||||
void MyEvtHandler::OnPaint(wxPaintEvent & event)
|
||||
{
|
||||
|
@ -399,7 +398,7 @@ void CBOINCListCtrl::PostDrawProgressBarEvent() {
|
|||
if (m_bProgressBarEventPending) return;
|
||||
|
||||
CDrawProgressBarEvent newEvent(wxEVT_DRAW_PROGRESSBAR, this);
|
||||
AddPendingEvent(newEvent);
|
||||
GetEventHandler()->AddPendingEvent(newEvent);
|
||||
m_bProgressBarEventPending = true;
|
||||
}
|
||||
|
||||
|
@ -423,6 +422,16 @@ void MyEvtHandler::OnPaint(wxPaintEvent & event)
|
|||
#endif
|
||||
|
||||
|
||||
#if ! USE_NATIVE_LISTCONTROL
|
||||
wxCoord CBOINCListCtrl::GetHeaderHeight(void) {
|
||||
if (m_headerWin) {
|
||||
return ((wxWindow*)m_headerWin)->GetSize().y;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// To reduce flicker, refresh only changed columns (except
|
||||
// on Mac, which is double-buffered to eliminate flicker.)
|
||||
void CBOINCListCtrl::RefreshCell(int row, int col) {
|
||||
|
|
|
@ -85,7 +85,6 @@ private:
|
|||
CBOINCBaseView* m_pParentView;
|
||||
wxArrayInt m_iRowsNeedingProgressBars;
|
||||
|
||||
#if USE_NATIVE_LISTCONTROL
|
||||
public:
|
||||
void PostDrawProgressBarEvent();
|
||||
private:
|
||||
|
@ -95,11 +94,10 @@ private:
|
|||
bool m_bProgressBarEventPending;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
#else
|
||||
#if ! USE_NATIVE_LISTCONTROL
|
||||
public:
|
||||
void DrawProgressBars(void);
|
||||
wxScrolledWindow* GetMainWin(void) { return (wxScrolledWindow*) m_mainWin; }
|
||||
wxCoord GetHeaderHeight(void) { return m_headerHeight; }
|
||||
wxCoord GetHeaderHeight(void);
|
||||
#ifdef __WXMAC__
|
||||
void SetupMacAccessibilitySupport();
|
||||
void RemoveMacAccessibilitySupport();
|
||||
|
|
|
@ -84,7 +84,7 @@ END_EVENT_TABLE()
|
|||
|
||||
CTaskBarIcon::CTaskBarIcon(wxString title, wxIcon* icon, wxIcon* iconDisconnected, wxIcon* iconSnooze) :
|
||||
#ifdef __WXMAC__
|
||||
wxTaskBarIcon(DOCK)
|
||||
wxTaskBarIcon()
|
||||
#else
|
||||
wxTaskBarIconEx(wxT("BOINCManagerSystray"), 1)
|
||||
#endif
|
||||
|
@ -438,7 +438,7 @@ bool CTaskBarIcon::SetMacTaskBarIcon(const wxIcon& icon) {
|
|||
}
|
||||
}
|
||||
|
||||
CGImageRef pImage = (CGImageRef) bmp.CGImageCreate();
|
||||
CGImageRef pImage = (CGImageRef) bmp.CreateCGImage();
|
||||
|
||||
// Actually set the dock image
|
||||
err = OverlayApplicationDockTileImage(pImage);
|
||||
|
|
|
@ -155,6 +155,7 @@ wxInt32 CBOINCTaskCtrl::UpdateControls() {
|
|||
unsigned int i;
|
||||
unsigned int j;
|
||||
bool bCreateMainSizer = false;
|
||||
int layoutChanged = 0;
|
||||
CTaskItemGroup* pGroup = NULL;
|
||||
CTaskItem* pItem = NULL;
|
||||
|
||||
|
@ -164,6 +165,7 @@ wxInt32 CBOINCTaskCtrl::UpdateControls() {
|
|||
SetAutoLayout(TRUE);
|
||||
m_pSizer = new wxBoxSizer( wxVERTICAL );
|
||||
m_pSizer->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
layoutChanged = 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -177,6 +179,7 @@ wxInt32 CBOINCTaskCtrl::UpdateControls() {
|
|||
#ifdef __WXMAC__
|
||||
pGroup->SetupMacAccessibilitySupport();
|
||||
#endif
|
||||
layoutChanged = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,6 +198,7 @@ wxInt32 CBOINCTaskCtrl::UpdateControls() {
|
|||
pItem->m_pButton->SetToolTip(pItem->m_strDescription);
|
||||
#endif
|
||||
pGroup->m_pStaticBoxSizer->Add(pItem->m_pButton, 0, wxEXPAND|wxALL, 5);
|
||||
layoutChanged = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +211,7 @@ wxInt32 CBOINCTaskCtrl::UpdateControls() {
|
|||
// necessarily generates a size event which would do it for us.
|
||||
FitInside();
|
||||
|
||||
return 0;
|
||||
return layoutChanged;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -168,6 +168,15 @@
|
|||
// 6501-6599 Reserved for Skin Selection
|
||||
#define ID_LASTSGSKINSELECTOR 6999
|
||||
|
||||
#define ID_CHANGE_SLIDE_TIMER 6600
|
||||
#define WEBSITE_URL_MENU_ID_REMOVE_PROJECT 6610
|
||||
#define WEBSITE_URL_MENU_ID_HOMEPAGE 6620
|
||||
#define WEBSITE_URL_MENU_ID 6630
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Taskbar/System Tray
|
||||
//
|
||||
|
|
|
@ -903,11 +903,11 @@ void CMainDocument::RunPeriodicRPCs(int frameRefreshRate) {
|
|||
|
||||
if (!IsConnected()) {
|
||||
CFrameEvent event(wxEVT_FRAME_REFRESHVIEW, pFrame);
|
||||
pFrame->AddPendingEvent(event);
|
||||
pFrame->GetEventHandler()->AddPendingEvent(event);
|
||||
CTaskBarIcon* pTaskbar = wxGetApp().GetTaskBarIcon();
|
||||
if (pTaskbar) {
|
||||
CTaskbarEvent tbevent(wxEVT_TASKBAR_REFRESH, pTaskbar);
|
||||
pTaskbar->AddPendingEvent(tbevent);
|
||||
CTaskbarEvent event(wxEVT_TASKBAR_REFRESH, pTaskbar);
|
||||
pTaskbar->AddPendingEvent(event);
|
||||
}
|
||||
CDlgEventLog* eventLog = wxGetApp().GetEventLog();
|
||||
if (eventLog) {
|
||||
|
@ -1303,10 +1303,10 @@ PROJECT* CMainDocument::project(unsigned int i) {
|
|||
|
||||
|
||||
PROJECT* CMainDocument::project(char* url) {
|
||||
for (unsigned int i=0; i< state.projects.size(); i++) {
|
||||
PROJECT* tp = state.projects[i];
|
||||
if (!strcmp(url, tp->master_url)) return tp;
|
||||
}
|
||||
for (unsigned int i=0; i< state.projects.size(); i++) {
|
||||
PROJECT* tp = state.projects[i];
|
||||
if (!strcmp(url, tp->master_url)) return tp;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1528,9 +1528,7 @@ int CMainDocument::WorkResume(char* url, char* name) {
|
|||
// If the graphics application for the current task is already
|
||||
// running, return a pointer to its RUNNING_GFX_APP struct.
|
||||
//
|
||||
RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(
|
||||
RESULT* rp, int slot
|
||||
) {
|
||||
RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(RESULT* result, int slot) {
|
||||
bool exited = false;
|
||||
std::vector<RUNNING_GFX_APP>::iterator gfx_app_iter;
|
||||
|
||||
|
@ -1538,7 +1536,7 @@ RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(
|
|||
gfx_app_iter != m_running_gfx_apps.end();
|
||||
gfx_app_iter++
|
||||
) {
|
||||
if ((slot >= 0) && ((*gfx_app_iter).slot != slot)) continue;
|
||||
if ( (slot >= 0) && ((*gfx_app_iter).slot != slot) ) continue;
|
||||
|
||||
#ifdef _WIN32
|
||||
unsigned long exit_code;
|
||||
|
@ -1553,9 +1551,8 @@ RUNNING_GFX_APP* CMainDocument::GetRunningGraphicsApp(
|
|||
}
|
||||
#endif
|
||||
if (! exited) {
|
||||
if ((rp->name == (*gfx_app_iter).name) &&
|
||||
(rp->project_url == (*gfx_app_iter).project_url)
|
||||
) {
|
||||
if ( (result->name == (*gfx_app_iter).name) &&
|
||||
(result->project_url == (*gfx_app_iter).project_url) ) {
|
||||
return &(*gfx_app_iter);
|
||||
}
|
||||
|
||||
|
@ -1663,15 +1660,15 @@ void CMainDocument::KillGraphicsApp(int pid) {
|
|||
}
|
||||
#endif
|
||||
|
||||
int CMainDocument::WorkShowGraphics(RESULT* rp) {
|
||||
int CMainDocument::WorkShowGraphics(RESULT* result) {
|
||||
int iRetVal = 0;
|
||||
|
||||
if (strlen(rp->web_graphics_url)) {
|
||||
wxString url(rp->web_graphics_url, wxConvUTF8);
|
||||
if (strlen(result->web_graphics_url)) {
|
||||
wxString url(result->web_graphics_url, wxConvUTF8);
|
||||
wxLaunchDefaultBrowser(url);
|
||||
return 0;
|
||||
}
|
||||
if (strlen(rp->graphics_exec_path)) {
|
||||
if (strlen(result->graphics_exec_path)) {
|
||||
// V6 Graphics
|
||||
RUNNING_GFX_APP gfx_app;
|
||||
RUNNING_GFX_APP* previous_gfx_app;
|
||||
|
@ -1683,12 +1680,12 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) {
|
|||
int id;
|
||||
#endif
|
||||
|
||||
p = strrchr((char*)rp->slot_path, '/');
|
||||
p = strrchr((char*)result->slot_path, '/');
|
||||
if (!p) return ERR_INVALID_PARAM;
|
||||
slot = atoi(p+1);
|
||||
|
||||
// See if we are already running the graphics application for this task
|
||||
previous_gfx_app = GetRunningGraphicsApp(rp, slot);
|
||||
previous_gfx_app = GetRunningGraphicsApp(result, slot);
|
||||
|
||||
#ifndef __WXMSW__
|
||||
char* argv[4];
|
||||
|
@ -1712,13 +1709,13 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) {
|
|||
// exits with "RegisterProcess failed (error = -50)" unless
|
||||
// we pass its full path twice in the argument list to execv.
|
||||
//
|
||||
argv[1] = (char *)rp->graphics_exec_path;
|
||||
argv[2] = (char *)rp->graphics_exec_path;
|
||||
argv[1] = (char *)result->graphics_exec_path;
|
||||
argv[2] = (char *)result->graphics_exec_path;
|
||||
argv[3] = 0;
|
||||
|
||||
if (g_use_sandbox) {
|
||||
iRetVal = run_program(
|
||||
rp->slot_path,
|
||||
result->slot_path,
|
||||
"../../switcher/switcher",
|
||||
3,
|
||||
argv,
|
||||
|
@ -1727,8 +1724,8 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) {
|
|||
);
|
||||
} else {
|
||||
iRetVal = run_program(
|
||||
rp->slot_path,
|
||||
rp->graphics_exec_path,
|
||||
result->slot_path,
|
||||
result->graphics_exec_path,
|
||||
1,
|
||||
&argv[2],
|
||||
0,
|
||||
|
@ -1744,8 +1741,8 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) {
|
|||
argv[0] = 0;
|
||||
|
||||
iRetVal = run_program(
|
||||
rp->slot_path,
|
||||
rp->graphics_exec_path,
|
||||
result->slot_path,
|
||||
result->graphics_exec_path,
|
||||
0,
|
||||
argv,
|
||||
0,
|
||||
|
@ -1754,8 +1751,8 @@ int CMainDocument::WorkShowGraphics(RESULT* rp) {
|
|||
#endif
|
||||
if (!iRetVal) {
|
||||
gfx_app.slot = slot;
|
||||
gfx_app.project_url = rp->project_url;
|
||||
gfx_app.name = rp->name;
|
||||
gfx_app.project_url = result->project_url;
|
||||
gfx_app.name = result->name;
|
||||
gfx_app.pid = id;
|
||||
m_running_gfx_apps.push_back(gfx_app);
|
||||
}
|
||||
|
@ -1778,32 +1775,32 @@ int CMainDocument::WorkShowVMConsole(RESULT* result) {
|
|||
strCommand = wxT("rdesktop-vrdp ") + strConnection;
|
||||
wxExecute(strCommand);
|
||||
#elif defined(__WXMAC__)
|
||||
FSRef theFSRef;
|
||||
OSStatus status = noErr;
|
||||
FSRef theFSRef;
|
||||
OSStatus status = noErr;
|
||||
|
||||
// I have found no reliable way to pass the IP address and port to Microsoft's
|
||||
// Remote Desktop Connection application for the Mac, so I'm using CoRD.
|
||||
// Unfortunately, CoRD does not seem as reliable as I would like either.
|
||||
//
|
||||
// First try to find the CoRD application by Bundle ID and Creator Code
|
||||
status = LSFindApplicationForInfo('RDC#', CFSTR("net.sf.cord"),
|
||||
// I have found no reliable way to pass the IP address and port to Microsoft's
|
||||
// Remote Desktop Connection application for the Mac, so I'm using CoRD.
|
||||
// Unfortunately, CoRD does not seem as reliable as I would like either.
|
||||
//
|
||||
// First try to find the CoRD application by Bundle ID and Creator Code
|
||||
status = LSFindApplicationForInfo('RDC#', CFSTR("net.sf.cord"),
|
||||
NULL, &theFSRef, NULL);
|
||||
if (status != noErr) {
|
||||
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
|
||||
if (pFrame) {
|
||||
pFrame->ShowAlert(
|
||||
_("Missing application"),
|
||||
_("Please download and install the CoRD application from http://cord.sourceforge.net"),
|
||||
wxOK | wxICON_INFORMATION,
|
||||
if (status != noErr) {
|
||||
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
|
||||
if (pFrame) {
|
||||
pFrame->ShowAlert(
|
||||
_("Missing application"),
|
||||
_("Please download and install the CoRD application from http://cord.sourceforge.net"),
|
||||
wxOK | wxICON_INFORMATION,
|
||||
false
|
||||
);
|
||||
}
|
||||
return ERR_FILE_MISSING;
|
||||
}
|
||||
}
|
||||
return ERR_FILE_MISSING;
|
||||
}
|
||||
|
||||
strCommand = wxT("osascript -e 'tell application \"CoRD\"' -e 'activate' -e 'open location \"rdp://") + strConnection + wxT("\"' -e 'end tell'");
|
||||
strCommand.Replace(wxT("localhost"), wxT("127.0.0.1"));
|
||||
system(strCommand.char_str());
|
||||
strCommand = wxT("osascript -e 'tell application \"CoRD\"' -e 'activate' -e 'open location \"rdp://") + strConnection + wxT("\"' -e 'end tell'");
|
||||
strCommand.Replace(wxT("localhost"), wxT("127.0.0.1"));
|
||||
system(strCommand.char_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2380,11 +2377,11 @@ int CMainDocument::GetSimpleGUIWorkCount() {
|
|||
CachedSimpleGUIUpdate();
|
||||
CachedStateUpdate();
|
||||
|
||||
for(i=0; i<results.results.size(); i++) {
|
||||
if (results.results[i]->active_task) {
|
||||
iCount++;
|
||||
}
|
||||
}
|
||||
for(i=0; i<results.results.size(); i++) {
|
||||
if (results.results[i]->active_task) {
|
||||
iCount++;
|
||||
}
|
||||
}
|
||||
return iCount;
|
||||
}
|
||||
|
||||
|
@ -2406,17 +2403,12 @@ wxString suspend_reason_wxstring(int reason) {
|
|||
return _("unknown reason");
|
||||
}
|
||||
|
||||
bool uses_gpu(RESULT* r) {
|
||||
// kludge. But r->avp isn't populated.
|
||||
return (strstr(r->resources, "GPU") != NULL);
|
||||
}
|
||||
|
||||
wxString result_description(RESULT* result, bool show_resources) {
|
||||
CMainDocument* doc = wxGetApp().GetDocument();
|
||||
PROJECT* project;
|
||||
CC_STATUS status;
|
||||
int retval;
|
||||
wxString strBuffer= wxEmptyString;
|
||||
wxString strBuffer= wxEmptyString;
|
||||
|
||||
strBuffer.Clear();
|
||||
retval = doc->GetCoreClientStatus(status);
|
||||
|
@ -2429,7 +2421,7 @@ wxString result_description(RESULT* result, bool show_resources) {
|
|||
}
|
||||
|
||||
project = doc->state.lookup_project(result->project_url);
|
||||
int throttled = status.task_suspend_reason & SUSPEND_REASON_CPU_THROTTLE;
|
||||
int throttled = status.task_suspend_reason & SUSPEND_REASON_CPU_THROTTLE;
|
||||
switch(result->state) {
|
||||
case RESULT_NEW:
|
||||
strBuffer += _("New");
|
||||
|
@ -2457,12 +2449,6 @@ wxString result_description(RESULT* result, bool show_resources) {
|
|||
if (strlen(result->resources) && show_resources) {
|
||||
strBuffer += wxString(wxT(" (")) + wxString(result->resources, wxConvUTF8) + wxString(wxT(")"));
|
||||
}
|
||||
} else if (status.gpu_suspend_reason && uses_gpu(result)) {
|
||||
strBuffer += _("GPU suspended - ");
|
||||
strBuffer += suspend_reason_wxstring(status.gpu_suspend_reason);
|
||||
if (strlen(result->resources) && show_resources) {
|
||||
strBuffer += wxString(wxT(" (")) + wxString(result->resources, wxConvUTF8) + wxString(wxT(")"));
|
||||
}
|
||||
} else if (result->active_task) {
|
||||
if (result->too_large) {
|
||||
strBuffer += _("Waiting for memory");
|
||||
|
|
|
@ -137,7 +137,7 @@ wxAccStatus CNoticeListCtrlAccessible::DoDefaultAction(int childId) {
|
|||
evt.SetEventObject(this);
|
||||
#endif
|
||||
|
||||
pCtrl->GetParent()->AddPendingEvent( evt );
|
||||
pCtrl->GetParent()->AddPendingEvent( evt );
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -430,7 +430,7 @@ void CNoticeListCtrl::OnSelected( wxCommandEvent& event )
|
|||
);
|
||||
evt.SetEventObject(this);
|
||||
|
||||
GetParent()->AddPendingEvent( evt );
|
||||
GetParent()->GetEventHandler()->AddPendingEvent( evt );
|
||||
}
|
||||
|
||||
|
||||
|
@ -456,7 +456,7 @@ void CNoticeListCtrl::OnLinkClicked( wxHtmlLinkEvent& event )
|
|||
);
|
||||
evt.SetEventObject(this);
|
||||
|
||||
GetParent()->AddPendingEvent( evt );
|
||||
GetParent()->GetEventHandler()->AddPendingEvent( evt );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ wxAccStatus CProjectListCtrlAccessible::DoDefaultAction(int childId)
|
|||
evt.SetEventObject(this);
|
||||
#endif
|
||||
|
||||
pCtrl->GetParent()->AddPendingEvent( evt );
|
||||
pCtrl->GetParent()->GetEventHandler()->AddPendingEvent( evt );
|
||||
|
||||
return wxACC_OK;
|
||||
}
|
||||
|
@ -460,7 +460,7 @@ void CProjectListCtrl::OnSelected( wxCommandEvent& event )
|
|||
);
|
||||
evt.SetEventObject(this);
|
||||
|
||||
GetParent()->AddPendingEvent( evt );
|
||||
GetParent()->GetEventHandler()->AddPendingEvent( evt );
|
||||
}
|
||||
|
||||
|
||||
|
@ -487,7 +487,7 @@ void CProjectListCtrl::OnLinkClicked( wxHtmlLinkEvent& event )
|
|||
);
|
||||
evt.SetEventObject(this);
|
||||
|
||||
GetParent()->AddPendingEvent( evt );
|
||||
GetParent()->GetEventHandler()->AddPendingEvent( evt );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -575,7 +575,7 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
|
|||
strBuffer += wxString(reply.messages[i].c_str(), wxConvUTF8) + wxString(wxT("\n"));
|
||||
}
|
||||
}
|
||||
pWA->m_CompletionErrorPage->m_pServerMessagesCtrl->SetLabel(wxString(strBuffer, wxConvUTF8));
|
||||
pWA->m_CompletionErrorPage->m_pServerMessagesCtrl->SetLabel(strBuffer);
|
||||
}
|
||||
} else {
|
||||
SetProjectAttachSucceeded(false);
|
||||
|
|
|
@ -76,7 +76,7 @@ bool CValidateURL::Validate(wxWindow *parent) {
|
|||
wxString strServer(uri.GetServer());
|
||||
int iServerDotLocation = strServer.Find(wxT("."));
|
||||
int iFirstPart = (int)strServer.Mid(0, iServerDotLocation).Length();
|
||||
int iSecondPart = (int)strServer.Mid(iServerDotLocation + 1, wxSTRING_MAXLEN).Length();
|
||||
int iSecondPart = (int)strServer.Mid(iServerDotLocation + 1).Length();
|
||||
|
||||
if (-1 == iServerDotLocation) {
|
||||
ok = FALSE;
|
||||
|
|
|
@ -614,4 +614,4 @@ bool CViewMessages::CloseClipboard() {
|
|||
#endif
|
||||
|
||||
|
||||
const char *BOINC_RCSID_0be7149475 = "$Id$";
|
||||
const char *BOINC_RCSID_0be7149475 = "$Id: ViewMessages.cpp 21706 2010-06-08 18:56:53Z davea $";
|
||||
|
|
|
@ -673,7 +673,7 @@ void CSimpleFrame::OnConnect(CFrameEvent& WXUNUSED(event)) {
|
|||
IMPLEMENT_DYNAMIC_CLASS(CSimpleGUIPanel, wxPanel)
|
||||
|
||||
BEGIN_EVENT_TABLE(CSimpleGUIPanel, wxPanel)
|
||||
EVT_SIZE(CSimpleGUIPanel::OnSize)
|
||||
// EVT_SIZE(CSimpleGUIPanel::OnSize)
|
||||
EVT_ERASE_BACKGROUND(CSimpleGUIPanel::OnEraseBackground)
|
||||
EVT_BUTTON(ID_SGNOTICESBUTTON,CSimpleGUIPanel::OnShowNotices)
|
||||
EVT_BUTTON(ID_SGSUSPENDRESUMEBUTTON,CSimpleGUIPanel::OnSuspendResume)
|
||||
|
|
|
@ -171,7 +171,7 @@ void CTransparentStaticTextAssociate::OnMouse(wxMouseEvent& event) {
|
|||
if (m_pWnd) {
|
||||
wxMouseEvent evtAssociate(event);
|
||||
evtAssociate.SetId(m_pWnd->GetId());
|
||||
m_pWnd->ProcessEvent(event);
|
||||
m_pWnd->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
// If we get the left button up event and we already had focus, that must
|
||||
|
|
|
@ -22,16 +22,6 @@
|
|||
#include "sg_BoincSimpleFrame.h"
|
||||
|
||||
|
||||
// TODO: Move these to events.h
|
||||
enum{
|
||||
ID_CHANGE_SLIDE_TIMER = 14000,
|
||||
WEBSITE_URL_MENU_ID = 34500,
|
||||
WEBSITE_URL_MENU_ID_REMOVE_PROJECT = 34550,
|
||||
WEBSITE_URL_MENU_ID_HOMEPAGE = 34551,
|
||||
};
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __WXMAC__
|
||||
|
|
|
@ -789,10 +789,11 @@ void CSimpleTaskPanel::GetApplicationAndProjectNames(RESULT* result, wxString* a
|
|||
strAppBuffer = wxString(state_result->avp->app_name, wxConvUTF8);
|
||||
}
|
||||
|
||||
char buf[256];
|
||||
if (avp->gpu_type) {
|
||||
sprintf(buf, " (%s)", proc_type_name(avp->gpu_type));
|
||||
strGPUBuffer = wxString(buf, wxConvUTF8);
|
||||
if (avp->ncudas) {
|
||||
strGPUBuffer = wxString(" (NVIDIA GPU)", wxConvUTF8);
|
||||
}
|
||||
if (avp->natis) {
|
||||
strGPUBuffer = wxString(" (ATI GPU)", wxConvUTF8);
|
||||
}
|
||||
|
||||
appName->Printf(
|
||||
|
@ -1247,7 +1248,8 @@ void CSimpleTaskPanel::OnEraseBackground(wxEraseEvent& event) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
CSimplePanelBase::OnEraseBackground(event);
|
||||
|
||||
// CSimplePanelBase::OnEraseBackground(event);
|
||||
event.Skip();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// 3) Fixed ShowPage() bug on displaying bitmaps
|
||||
// Robert Vazan (sizers)
|
||||
// Created: 15.08.99
|
||||
// RCS-ID: $Id$
|
||||
// RCS-ID: $Id: wizardex.cpp 19603 2009-11-18 17:30:03Z romw $
|
||||
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
// Added wxWIZARD_HELP event
|
||||
// Robert Vazan (sizers)
|
||||
// Created: 15.08.99
|
||||
// RCS-ID: $Id$
|
||||
// RCS-ID: $Id: wizardex.h 19588 2009-11-17 19:19:50Z romw $
|
||||
// Copyright: (c) 1999 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue