[SCM] BOINC packaging branch, upstream, updated. debian/6.10.17+dfsg-3-41-ge88d90a
Steffen Moeller
moeller at debian.org
Sun Dec 4 00:25:20 UTC 2011
The following commit has been merged in the upstream branch:
commit e88d90afde6a8fc6f19cf4024cff4d645acb2d08
Author: Steffen Moeller <moeller at debian.org>
Date: Fri Dec 2 03:23:39 2011 +0100
Imported Upstream version 7.0.2+dfsg
diff --git a/checkin_notes b/checkin_notes
index da030fd..31fbeb4 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -7057,6 +7057,9 @@ Charlie 11 Oct 2011
because it once again sets hidden property for login items, but
the AppleScript seems not to work under OS 10.7.1.
+ clientgui/
+ mac/
+ SetupSecurity.cpp
mac_installer/
PostInstall.cpp
@@ -7752,6 +7755,7 @@ Charlie 25 Oct 2011
around clientData bug in wxBitmapComboBox::Insert().
clientgui/
+ BOINCBitmapComboBox.cpp,.h (added)
mac/
MacBitmapComboBox.cpp,.h
sg_PanelBase.h
@@ -8063,16 +8067,16 @@ David 3 Nov 2011
wrapper.cpp
David 3 Nov 2011
- - client: show GPU exclusions at startup
- (need to do this after reading the state file,
- since GPU exclusions refer to projects).
- - client: fix bug that added garbage <coproc> element
- to <app_version> in state file when using GPU exclusions
+ - client: show GPU exclusions at startup
+ (need to do this after reading the state file,
+ since GPU exclusions refer to projects).
+ - client: fix bug that added garbage <coproc> element
+ to <app_version> in state file when using GPU exclusions
- client/
- client_types.cpp
- client_state.cpp
- log_flags.cpp
+ client/
+ client_types.cpp
+ client_state.cpp
+ log_flags.cpp
David 4 Nov 2011
- client: fix work fetch bug.
@@ -8170,17 +8174,17 @@ David 5 Nov 2011
cs_trickle.cpp
David 6 Nov 2011
- - client: actually do the checking described above
+ - client: actually do the checking described above
- client/
- cs_trickle.cpp
+ client/
+ cs_trickle.cpp
David 6 Nov 2011
- - client: don't crash if a project sends app_version.flops = 0.
+ - client: don't crash if a project sends app_version.flops = 0.
- client/
- client_types.cpp
- rr_sim.cpp
+ client/
+ client_types.cpp
+ rr_sim.cpp
Charlie 7 Nov 2011
- Mgr: Bug fix.
@@ -8189,16 +8193,16 @@ Charlie 7 Nov 2011
BOINCGUIApp.cpp
David 7 Nov 2011
- - manager: apparently WxWidget's combo box has problems (bugs)
- if multiple items have the same string.
- So, in simple view task combo box:
- - show % done (unique in most cases)
- - remove version number
- - instead of showing plan class, show "NVIDIA GPU" or "ATI GPU"
- TODO: update the fraction done
+ - manager: apparently WxWidget's combo box has problems (bugs)
+ if multiple items have the same string.
+ So, in simple view task combo box:
+ - show % done (unique in most cases)
+ - remove version number
+ - instead of showing plan class, show "NVIDIA GPU" or "ATI GPU"
+ TODO: update the fraction done
- clientgui/
- sg_TaskPanel.cpp
+ clientgui/
+ sg_TaskPanel.cpp
David 7 Nov 2011
- client: condition RR sim negative FLOPs message on rr_simulation.
@@ -8226,19 +8230,19 @@ Rom 7 Nov 2011
workunit_waiting_image.png
David 7 Nov 2011
- - client: on transient upload failure, don't do start_xfer()
- within PERS_FILE_XFER::transient_failure();
- we're about to delete and free the FILE_XFER.
- The transfer will be restarted in the next poll.
+ - client: on transient upload failure, don't do start_xfer()
+ within PERS_FILE_XFER::transient_failure();
+ we're about to delete and free the FILE_XFER.
+ The transfer will be restarted in the next poll.
- client/
- pers_file_xfer.cpp
+ client/
+ pers_file_xfer.cpp
Charlie 8 Nov 2011
- Mgr: Fix Simple View layout to fit 3 decimal places for % done.
- clientgui/
- sg_TaskPanel.cpp
+ clientgui/
+ sg_TaskPanel.cpp
Charlie 8 Nov 2011
- Mac installer: fixes for OS 10.4 compatibility.
@@ -8277,8 +8281,8 @@ Charlie 9 Nov 2011
Don't append % done to Task Selection control entries, as that
varies over time, causing significant complications.
- clientgui/
- sg_TaskPanel.cpp
+ clientgui/
+ sg_TaskPanel.cpp
Rom 9 Nov 2011
- WINSCR: Add a reference to SCRAPPERR_BOINCNOGRAPHICSAPPSEXECUTING
@@ -8382,8 +8386,8 @@ Charlie 11 Nov 2011
shortcut in checking for existing entries.
- Mgr: If a slide show has only one slide, load it only once.
- clientgui/
- sg_TaskPanel.cpp
+ clientgui/
+ sg_TaskPanel.cpp
David 11 Nov 2011
- client: check return value of FILE_REF when parse project file.
@@ -8413,3 +8417,267 @@ Rom 11 Nov 2011
/
configure.ac
version.h
+
+Charlie 11 Nov 2011
+ - Mac installer: There can now be multiple instances of the Manager
+ running, so shut them all down.
+
+ mac_installer/
+ PostInstall.cpp
+
+David 13 Nov 2011
+ - client/scheduler:
+ If the file "client_opaque.txt" exists on the client,
+ include its contents in scheduler request messages.
+ On the scheduler, parse this into SCHEDULER_REQUEST::client_opaque,
+ where it can be used by the customizable scheduler functions.
+
+ sched/
+ sched_types.cpp,h
+ client/
+ file_names.h
+ cs_scheduler.cpp
+
+Charlie 14 Nov 2011
+ - Mgr: Don't call Simple View specific periodic RPCs when BOINC is
+ hidden or minimized.
+
+ clientgui/
+ MainDocument.cpp
+
+David 14 Nov 2011
+ - client: show error messages (as notices) when get an error
+ parsing cc_config.xml
+ - client: if an <exclude_cpu> element in cc_config.xml
+ specifies a nonexistent app, show an error msg with
+ a list of existing app names
+ - web: increase the default mem limit from 64MB to 256MB
+ TODO: change user_hosts.php to show N at a time
+
+ html/inc/
+ util.inc
+ lib/
+ cc_config.cpp,h
+ client/
+ log_flags.cpp
+
+David 14 Nov 2011
+ - client: improve messages for the above
+
+ client/
+ log_flags.cpp
+
+David 14 Nov 2011
+ - scheduler: increase buffer for global prefs from 8K to 64K
+ - lay the groundwork for changing it to std::string
+
+ sched/
+ sched_types.cpp
+ lib/
+ parse.cpp,h
+
+Charlie 14 Nov 2011
+ - Mgr: In CSimpleTaskPanel, change name of Update() to UpdatePanel()
+ to fix compiler warning about overloading wxWindow::Update().
+
+ clientgui/
+ sg_BoincSimpleFrame.cpp
+ sg_TaskPanel.cpp,.h
+
+Charlie 14 Nov 2011
+ - MGR: Limit change of 9 November to only Debug builds: accept and
+ ignore command line argument "-NSDocumentRevisionsDebugMode=YES"
+
+ clientgui/
+ BOINCGUIApp.cpp
+
+David 14 Nov 2011
+ - client: add some missing items to CONFIG::parse_options_client().
+
+ client/
+ log_flags.cpp
+ pers_file_xfer.cpp
+
+Charlie 16 Nov 2011
+ - MGR: use wxBitmapComboBox insert() and append() calls without
+ client data argument instead of passing NULL.
+
+ clientgui/
+ BOINCBitmapComboBox.cpp
+
+Charlie 17 Nov 2011
+ Remove include of boinc_cl.h from parse.h; it is no longer needed.
+ Remove Mac Availability Macro and weak-link support from cl_boin.ch
+ as it prevented building BOINC libraries under OS 10.5.
+
+ lib/
+ cl_boinc.h
+ parse.h
+
+Charlie 19 Nov 2011
+ - MGR: Fix button font sizes in Simple View Projects panel.
+
+ clientgui/
+ sg_ProjectPanel.cpp
+
+David 20 Nov 2011
+ - client: on network_available() GUI RPC,
+ clear project-level upload and download backoffs,
+ as well as RPC and individual xfer backoffs.
+ This was an oversight.
+
+ client/
+ client_types.h
+ net_stats.cpp
+
+Charlie 20 Nov 2011
+ - MGR: Hide slideshow subpanel if no slides for current task.
+
+ clientgui/
+ sg_TaskPanel.cpp
+
+Charlie 21 Nov 2011
+ - MGR: In Simple View, draw Mac progress bar on white background for
+ better visibility; adjust red New Notices ring for new button
+ shapes if on Mac OS 10.7.
+
+ clientgui/
+ sg_BoincSimpleFrame.cpp,.h
+ sg_PanelBase.cpp
+ sg_TaskPanel.cpp
+
+Rom 21 Nov 2011
+ - MGR: const fixes for platform bitmaps.
+ (From: Steffen Möller)
+ - MGR: Add trace statements to help track down RemoveAt bug
+ - MGR: Remove static var guard, may not be needed with the SetDlgOpen()
+ routines blocking timer based updates. If there is a buffer overrun
+ hopefully it'll manifest itself in a detectable way.
+
+ clientgui/res/
+ linuxicon.xpm
+ macosicon.xpm
+ windowsicon.xpm
+ clientgui/
+ sg_BoincSimpleFrame.cpp
+ sg_TaskPanel.cpp
+
+Rom 21 Nov 2011
+ - MGR: Prevent crash, check returned pointer of menu entry.
+
+ clientgui/
+ sg_BoincSimpleFrame.cpp
+
+Rom 21 Nov 2011
+ - MGR: Fix bad asserts.
+
+ clientgui/
+ BOINCBitmapComboBox.cpp
+
+Charlie 21 Nov 2011
+ - MGR: Fix bad transparency in default project icon.
+
+ clientgui/res/skins/default/graphic/
+ project_image.xpm
+
+Charlie 21 Nov 2011
+ - MGR: The asserts were correct; fix minor errors in calling code.
+
+ clientgui/
+ BOINCBitmapComboBox.cpp
+ sg_ProjectPanel.cpp
+ sg_TaskPanel.cpp
+
+Charlie 23 Nov 2011
+ - MGR: In Simple View, if deleting a task above the current selection,
+ decrement the index of the current selection.
+ - MGR: In Simple View, reload slide show when task selection changed.
+
+ clientgui/
+ sg_TaskPanel.cpp,.h
+
+Charlie 23 Nov 2011
+ - MGR: In Simple View, sort Project Selection Control; make sorting of
+ Project and Task Selection controls case-insensitive, fix bugs in
+ MacBitmapComboBox.cpp.
+
+ clientgui/
+ mac/
+ MacBitmapComboBox.cpp
+ MacBitmapComboBox.cpp
+ sg_ProjectPanel.cpp
+ sg_TaskPanel.cpp
+
+David 24 Nov 2011
+ - GUI RPC client lib: change setsockopt() for receive timeout
+ to work on Windows. From Fred.
+
+ lib/
+ gui_rpc_client.cpp
+
+David 24 Nov 2011
+ - default screensaver: fix divide-by-zero; code cleanup
+
+ clientsrc/
+ ss_app.cpp
+
+David 25 Nov 2011
+ - client: fix errors in transferring RAM info between CAL and OpenCL.
+ (bytes vs MB units, local/global terminology issue).
+ From Oliver Bock>
+
+ client/
+ coproc_detect.cpp
+
+Charlie 26 Nov 2011
+ - default screensaver: fix build breaks caused by code cleanup above.
+
+ clientsrc/
+ ss_app.cpp
+
+Charlie 28 Nov 2011
+ - MGR: In Simple View, if task has no slide show, then display the
+ institution, science area and description.
+ This is in progress: not yet finished.
+
+ clientgui/
+ Events.h
+ sg_PanelBase.cpp,.h
+ sg_TaskPanel.cpp,.h
+
+Charlie 29 Nov 2011
+ - MGR: Continue work on Simple View to display the description if
+ task has no slide show.
+ Change all occurrences of "<sup>n</sup>" to "^n"
+
+ clientgui/
+ sg_TaskPanel.cpp,.h
+
+Charlie 30 Nov 2011
+ - MGR: Complete work on Simple View to display the description if
+ task has no slide show.
+
+ clientgui/
+ sg_TaskPanel.cpp,.h
+
+Rom 30 Nov 2011
+ - Tag for 7.0.1 release, all platforms
+ boinc_core_release_7_0_1
+
+ /
+ configure.ac
+ version.h
+
+Charlie 30 Nov 2011
+ - MGR: Better sizing of Simple View description text box.
+
+ clientgui/
+ sg_TaskPanel.cpp,.h
+
+Rom 1 Dec 2011
+ - Tag for 7.0.2 release, all platforms
+ boinc_core_release_7_0_2
+
+ /
+ configure.ac
+ version.h
diff --git a/client/client_types.h b/client/client_types.h
index 7433a75..f27f320 100644
--- a/client/client_types.h
+++ b/client/client_types.h
@@ -198,6 +198,13 @@ struct FILE_XFER_BACKOFF {
file_xfer_failures = 0;
next_xfer_time = 0;
}
+
+ // clear backoff but maintain failure count;
+ // called when network becomes available
+ //
+ void clear_temporary() {
+ next_xfer_time = 0;
+ }
};
// statistics at a specific day
diff --git a/client/coproc_detect.cpp b/client/coproc_detect.cpp
index 05aded4..45dd7a7 100644
--- a/client/coproc_detect.cpp
+++ b/client/coproc_detect.cpp
@@ -339,10 +339,10 @@ void COPROCS::get_opencl(
// 1/2 of total global RAM size: use the value from CAL.
// This bug applies only to ATI GPUs, not to NVIDIA
//
- ati.opencl_prop.global_mem_size = ati.attribs.localRAM;
+ ati.opencl_prop.global_mem_size = ati.attribs.localRAM * MEGA;
} else {
ati.find_best_opencls(use_all, ati_opencls, ignore_ati_dev);
- ati.attribs.localRAM = ati.opencl_prop.local_mem_size;
+ ati.attribs.localRAM = ati.opencl_prop.global_mem_size/MEGA;
ati.attribs.engineClock = ati.opencl_prop.max_clock_frequency;
} // End if (! ati.have_cal)
diff --git a/client/cs_scheduler.cpp b/client/cs_scheduler.cpp
index 863049b..48a384a 100644
--- a/client/cs_scheduler.cpp
+++ b/client/cs_scheduler.cpp
@@ -362,6 +362,12 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
}
fprintf(f, "</in_progress_results>\n");
}
+ FILE* cof = boinc_fopen(CLIENT_OPAQUE_FILENAME, "r");
+ if (cof) {
+ fprintf(f, "<client_opaque>\n<![CDATA[\n");
+ copy_stream(cof, f);
+ fprintf(f, "\n]]>\n</client_opaque>\n");
+ }
fprintf(f, "</scheduler_request>\n");
diff --git a/client/file_names.h b/client/file_names.h
index d7a9f72..3c952c1 100644
--- a/client/file_names.h
+++ b/client/file_names.h
@@ -62,6 +62,7 @@ extern void send_log_after(const char* filename, double t, MIOFILE& mf);
#define CA_BUNDLE_FILENAME "ca-bundle.crt"
#define CERTIFICATE_DIRECTORY "certificates"
#define CLIENT_AUTH_FILENAME "client_auth.xml"
+#define CLIENT_OPAQUE_FILENAME "client_opaque.txt"
#define CONFIG_FILE "cc_config.xml"
#define CPU_BENCHMARKS_FILE_NAME "cpu_benchmarks"
#define CREATE_ACCOUNT_FILENAME "create_account.xml"
diff --git a/client/log_flags.cpp b/client/log_flags.cpp
index ad6bb89..918d907 100644
--- a/client/log_flags.cpp
+++ b/client/log_flags.cpp
@@ -112,7 +112,7 @@ static void show_gpu_ignore(vector<int>& devs, const char* name) {
}
static void show_exclude_gpu(EXCLUDE_GPU& e) {
- char t[256], app[256], dev[256];
+ char t[256], app_name[256], dev[256];
PROJECT *p = gstate.lookup_project(e.url.c_str());
if (!p) return;
if (e.type.empty()) {
@@ -121,9 +121,9 @@ static void show_exclude_gpu(EXCLUDE_GPU& e) {
strcpy(t, e.type.c_str());
}
if (e.appname.empty()) {
- strcpy(app, "all");
+ strcpy(app_name, "all");
} else {
- strcpy(app, e.appname.c_str());
+ strcpy(app_name, e.appname.c_str());
}
if (e.device_num < 0) {
strcpy(dev, "all");
@@ -132,10 +132,35 @@ static void show_exclude_gpu(EXCLUDE_GPU& e) {
}
msg_printf(p, MSG_INFO,
"Config: excluded GPU. Type: %s. App: %s. Device: %s",
- t, app, dev
+ t, app_name, dev
);
+ if (!e.appname.empty()) {
+ APP* app = gstate.lookup_app(p, e.appname.c_str());
+ if (!app) {
+ string app_list;
+ for (unsigned int i=0; i<gstate.apps.size(); i++) {
+ app = gstate.apps[i];
+ if (app->project != p) continue;
+ if (!app_list.empty()) {
+ app_list += ", ";
+ }
+ app_list += "'";
+ app_list += app->name;
+ app_list += "'";
+ }
+ msg_printf(p, MSG_USER_ALERT,
+ "A GPU exclusion in your cc_config.xml file specifies a non-existent application '%s'. Existing applications: %s",
+ e.appname.c_str(),
+ app_list.c_str()
+ );
+ }
+ }
}
+// Print config info.
+// This is called during startup (after client_state.xml has been read)
+// and also from the handle_read_cc_config GUI RPC.
+//
// TODO: show other config options
//
void CONFIG::show() {
@@ -204,6 +229,9 @@ void CONFIG::show() {
}
}
+// This is used by the BOINC client.
+// KEEP IN SYNCH WITH CONFIG::parse_options()!!
+
int CONFIG::parse_options_client(XML_PARSER& xp) {
char path[256];
string s;
@@ -252,14 +280,14 @@ int CONFIG::parse_options_client(XML_PARSER& xp) {
COPROC c;
retval = c.parse(xp);
if (retval) {
- msg_printf(0, MSG_USER_ALERT,
- "Can't parse <coproc> in cc_config.xml"
+ msg_printf_notice(NULL, false, NULL,
+ "Can't parse <coproc> element in cc_config.xml"
);
}
retval = coprocs.add(c);
if (retval) {
- msg_printf(0, MSG_USER_ALERT,
- "Duplicate <coproc> in cc_config.xml"
+ msg_printf_notice(NULL, false, NULL,
+ "Duplicate <coproc> element in cc_config.xml"
);
}
continue;
@@ -274,6 +302,18 @@ int CONFIG::parse_options_client(XML_PARSER& xp) {
if (xp.parse_bool("disallow_attach", disallow_attach)) continue;
if (xp.parse_bool("dont_check_file_sizes", dont_check_file_sizes)) continue;
if (xp.parse_bool("dont_contact_ref_site", dont_contact_ref_site)) continue;
+ if (xp.match_tag("exclude_gpu")) {
+ EXCLUDE_GPU eg;
+ retval = eg.parse(xp);
+ if (retval) {
+ msg_printf_notice(NULL, false, NULL,
+ "Can't parse <exclude_gpu> element in cc_config.xml"
+ );
+ } else {
+ exclude_gpus.push_back(eg);
+ }
+ continue;
+ }
if (xp.parse_string("exclusive_app", s)) {
if (!strstr(s.c_str(), "boinc")) {
exclusive_apps.push_back(s);
@@ -287,6 +327,7 @@ int CONFIG::parse_options_client(XML_PARSER& xp) {
continue;
}
if (xp.parse_bool("exit_after_finish", exit_after_finish)) continue;
+ if (xp.parse_bool("exit_before_start", exit_before_start)) continue;
if (xp.parse_bool("exit_when_idle", exit_when_idle)) {
if (exit_when_idle) {
report_results_immediately = true;
@@ -299,6 +340,8 @@ int CONFIG::parse_options_client(XML_PARSER& xp) {
continue;
}
if (xp.parse_bool("http_1_0", http_1_0)) continue;
+ if (xp.parse_int("http_transfer_timeout", http_transfer_timeout)) continue;
+ if (xp.parse_int("http_transfer_timeout_bps", http_transfer_timeout_bps)) continue;
if (xp.parse_int("ignore_cuda_dev", n)||xp.parse_int("ignore_nvidia_dev", n)) {
ignore_nvidia_dev.push_back(n);
continue;
@@ -325,10 +368,19 @@ int CONFIG::parse_options_client(XML_PARSER& xp) {
#ifndef SIM
if (xp.match_tag("proxy_info")) {
retval = config_proxy_info.parse_config(xp);
- if (retval) return retval;
+ if (retval) {
+ msg_printf_notice(NULL, false, NULL,
+ "Can't parse <proxy_info> element in cc_config.xml"
+ );
+ }
continue;
}
#endif
+ if (xp.parse_double("rec_half_life_days", rec_half_life)) {
+ if (rec_half_life <= 0) rec_half_life = 10;
+ rec_half_life *= 86400;
+ continue;
+ }
if (xp.parse_bool("report_results_immediately", report_results_immediately)) continue;
if (xp.parse_bool("run_apps_manually", run_apps_manually)) continue;
if (xp.parse_int("save_stats_days", save_stats_days)) continue;
@@ -383,13 +435,12 @@ int CONFIG::parse_client(FILE* f) {
continue;
}
if (xp.match_tag("options")) {
- int retval = parse_options(xp);
+ int retval = parse_options_client(xp);
if (retval) {
msg_printf_notice(NULL, false,
"http://boinc.berkeley.edu/manager_links.php?target=notice&controlid=config",
- "%s: %s",
- _("Error in cc_config.xml options"),
- boincerror(retval)
+ "%s",
+ _("Error in cc_config.xml options")
);
}
continue;
@@ -431,9 +482,8 @@ int read_config_file(bool init, const char* fname) {
msg_printf(NULL, MSG_INFO, "No config file found - using defaults");
return ERR_FOPEN;
}
- int retval = config.parse(f);
+ config.parse_client(f);
fclose(f);
- if (retval) return retval;
#ifndef SIM
diagnostics_set_max_file_sizes(
config.max_stdout_file_size, config.max_stderr_file_size
diff --git a/client/net_stats.cpp b/client/net_stats.cpp
index e5ccebe..6498450 100644
--- a/client/net_stats.cpp
+++ b/client/net_stats.cpp
@@ -172,6 +172,8 @@ void NET_STATUS::network_available() {
for (i=0; i<gstate.projects.size(); i++) {
PROJECT* p = gstate.projects[i];
p->min_rpc_time = 0;
+ p->upload_backoff.clear_temporary();
+ p->download_backoff.clear_temporary();
}
// tell active tasks that network is available (for Folding at home)
diff --git a/client/pers_file_xfer.cpp b/client/pers_file_xfer.cpp
index cced84d..35e5cd1 100644
--- a/client/pers_file_xfer.cpp
+++ b/client/pers_file_xfer.cpp
@@ -331,7 +331,6 @@ void PERS_FILE_XFER::transient_failure(int retval) {
// Cycle to the next URL to try.
// If we reach the URL that we started at, then back off.
- // Otherwise immediately try the next URL
//
URL_LIST& ul = fip->get_url_list(is_upload);
diff --git a/clientgui/BOINCBitmapComboBox.cpp b/clientgui/BOINCBitmapComboBox.cpp
index 0c70efa..d5ff429 100644
--- a/clientgui/BOINCBitmapComboBox.cpp
+++ b/clientgui/BOINCBitmapComboBox.cpp
@@ -76,7 +76,7 @@ int CBOINCBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap) {
int CBOINCBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap, void *clientData) {
m_pClientData.push_back(clientData);
- int n = wxBitmapComboBox::Append(item, bitmap, (void*)NULL);
+ int n = wxBitmapComboBox::Append(item, bitmap);
return n;
}
@@ -92,13 +92,15 @@ int CBOINCBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, u
int CBOINCBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos, void *clientData) {
std::vector<void*>::iterator insertionPoint = m_pClientData.begin();
m_pClientData.insert(insertionPoint + pos, clientData);
- int n = wxBitmapComboBox::Insert(item, bitmap, pos, (void*)NULL);
+ int n = wxBitmapComboBox::Insert(item, bitmap, pos);
return n;
}
void CBOINCBitmapComboBox::Delete(unsigned int n) {
if (n < GetCount()) {
+ // Caller must have already deleted the data and set the pointer to NULL
+ wxASSERT(!m_pClientData[n]);
std::vector<void*>::iterator deletionPoint = m_pClientData.begin();
m_pClientData.erase(deletionPoint + n);
}
@@ -111,7 +113,8 @@ void CBOINCBitmapComboBox::Delete(unsigned int n) {
void CBOINCBitmapComboBox::Clear() {
int count = GetCount();
for(int j = count-1; j >=0; --j) {
- wxASSERT(!m_pClientData[j]);
+ // Caller must have already deleted the data and set the pointer to NULL
+ wxASSERT(!m_pClientData[j]);
m_pClientData[j] = NULL;
}
m_pClientData.clear();
diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp
index c3c83bb..28d5d55 100644
--- a/clientgui/BOINCGUIApp.cpp
+++ b/clientgui/BOINCGUIApp.cpp
@@ -515,7 +515,7 @@ void CBOINCGUIApp::OnInitCmdLine(wxCmdLineParser &parser) {
{ 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")},
-#ifdef __WXMAC__
+#if (defined(__WXMAC__) && defined(_DEBUG))
{ wxCMD_LINE_OPTION, wxT("NSDocumentRevisionsDebugMode"), NULL, _("Not used: workaround for bug in XCode 4.2")},
#endif
{ wxCMD_LINE_NONE} //DON'T forget this line!!
diff --git a/clientgui/Events.h b/clientgui/Events.h
index 5760a6f..6dcb3c7 100644
--- a/clientgui/Events.h
+++ b/clientgui/Events.h
@@ -162,6 +162,7 @@
#define ID_SGSUSPENDRESUMEBUTTON 6412
#define ID_SGOPTIONS 6413
#define ID_SGSKINSELECTOR 6414
+#define ID_SGPROJECTDESCRIPTION 6415
#define ID_SGDEFAULTSKINSELECTOR 6500
#define ID_SGFIRSTSKINSELECTOR 6501
// 6501-6599 Reserved for Skin Selection
diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp
index cf3c618..9046e2c 100644
--- a/clientgui/MainDocument.cpp
+++ b/clientgui/MainDocument.cpp
@@ -1014,9 +1014,8 @@ void CMainDocument::RunPeriodicRPCs(int frameRefreshRate) {
ts = dtNow - m_dtLastFrameViewRefreshRPCTime;
if (ts.GetMilliseconds() < (frameRefreshRate - 500)) return;
- // TODO: modify SimpleGUI to not do direct RPC calls when hidden / minimized
- // Don't do periodic RPC calls when hidden / minimized unless SimpleGui
- if (! ((currentTabView & VW_SGUI) || pFrame->IsShown()) ) return;
+ // Don't do periodic RPC calls when hidden / minimized
+ if (!pFrame->IsShown()) return;
m_dtLastFrameViewRefreshRPCTime = dtNow;
diff --git a/clientgui/res/linuxicon.xpm b/clientgui/res/linuxicon.xpm
index 09f98e3..38fbb53 100644
--- a/clientgui/res/linuxicon.xpm
+++ b/clientgui/res/linuxicon.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char *Linux_xpm[] = {
+static const char *Linux_xpm[] = {
/* columns rows colors chars-per-pixel */
"14 14 17 1",
". c #8F8979",
diff --git a/clientgui/res/macosicon.xpm b/clientgui/res/macosicon.xpm
index b4e6644..4ed5db7 100644
--- a/clientgui/res/macosicon.xpm
+++ b/clientgui/res/macosicon.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char *MacOS_xpm[] = {
+static const char *MacOS_xpm[] = {
/* columns rows colors chars-per-pixel */
"14 14 14 1",
"= c #295A9C",
diff --git a/clientgui/res/skins/default/graphic/project_image.xpm b/clientgui/res/skins/default/graphic/project_image.xpm
index ae80878..ddb129d 100644
--- a/clientgui/res/skins/default/graphic/project_image.xpm
+++ b/clientgui/res/skins/default/graphic/project_image.xpm
@@ -69,7 +69,7 @@ static const char *project_image_xpm[] = {
"3 c #E5E6E5",
"i. c #FCD354",
";. c #FCD65E",
-"O c None",
+"O c #1136CC",
"6. c #FCD04B",
"uX c #7F90AB",
"* c #F4F5F6",
@@ -96,7 +96,7 @@ static const char *project_image_xpm[] = {
"8. c #F2F5FB",
"4. c #FFECA3",
"b c #8C9CB4",
-" c None",
+" c #FCFDFD",
"@X c #F7DB99",
"r. c #FFECA9",
"I. c #F5BA1C",
diff --git a/clientgui/res/templates/skins/Backgrounds/bg1.png b/clientgui/res/templates/skins/Backgrounds/bg1.png
new file mode 100644
index 0000000..8ff5c76
Binary files /dev/null and b/clientgui/res/templates/skins/Backgrounds/bg1.png differ
diff --git a/clientgui/res/templates/skins/Backgrounds/bg15.png b/clientgui/res/templates/skins/Backgrounds/bg15.png
new file mode 100644
index 0000000..0a28972
Binary files /dev/null and b/clientgui/res/templates/skins/Backgrounds/bg15.png differ
diff --git a/clientgui/res/templates/skins/Backgrounds/bg16.png b/clientgui/res/templates/skins/Backgrounds/bg16.png
new file mode 100644
index 0000000..50cf655
Binary files /dev/null and b/clientgui/res/templates/skins/Backgrounds/bg16.png differ
diff --git a/clientgui/res/templates/skins/Backgrounds/bg17.png b/clientgui/res/templates/skins/Backgrounds/bg17.png
new file mode 100644
index 0000000..e725551
Binary files /dev/null and b/clientgui/res/templates/skins/Backgrounds/bg17.png differ
diff --git a/clientgui/res/templates/skins/Backgrounds/bg2.png b/clientgui/res/templates/skins/Backgrounds/bg2.png
new file mode 100644
index 0000000..d52916a
Binary files /dev/null and b/clientgui/res/templates/skins/Backgrounds/bg2.png differ
diff --git a/clientgui/res/templates/skins/Backgrounds/bg3.png b/clientgui/res/templates/skins/Backgrounds/bg3.png
new file mode 100644
index 0000000..c1bb661
Binary files /dev/null and b/clientgui/res/templates/skins/Backgrounds/bg3.png differ
diff --git a/clientgui/res/templates/skins/Backgrounds/bg4.png b/clientgui/res/templates/skins/Backgrounds/bg4.png
new file mode 100644
index 0000000..1ae83bb
Binary files /dev/null and b/clientgui/res/templates/skins/Backgrounds/bg4.png differ
diff --git a/clientgui/res/templates/skins/Icons/Running 6.png b/clientgui/res/templates/skins/Icons/Running 6.png
new file mode 100644
index 0000000..a880c5a
Binary files /dev/null and b/clientgui/res/templates/skins/Icons/Running 6.png differ
diff --git a/clientgui/res/templates/skins/Icons/Suspended 6.png b/clientgui/res/templates/skins/Icons/Suspended 6.png
new file mode 100644
index 0000000..3b06a5d
Binary files /dev/null and b/clientgui/res/templates/skins/Icons/Suspended 6.png differ
diff --git a/clientgui/res/templates/skins/Icons/Waiting 14.png b/clientgui/res/templates/skins/Icons/Waiting 14.png
new file mode 100644
index 0000000..6d46b25
Binary files /dev/null and b/clientgui/res/templates/skins/Icons/Waiting 14.png differ
diff --git a/clientgui/res/templates/skins/Icons/Waiting 15.png b/clientgui/res/templates/skins/Icons/Waiting 15.png
new file mode 100644
index 0000000..a10b7e7
Binary files /dev/null and b/clientgui/res/templates/skins/Icons/Waiting 15.png differ
diff --git a/clientgui/res/templates/skins/Icons/Waiting 16.png b/clientgui/res/templates/skins/Icons/Waiting 16.png
new file mode 100644
index 0000000..328a53f
Binary files /dev/null and b/clientgui/res/templates/skins/Icons/Waiting 16.png differ
diff --git a/clientgui/res/templates/skins/Icons/Waiting 17.png b/clientgui/res/templates/skins/Icons/Waiting 17.png
new file mode 100644
index 0000000..bfbe6d8
Binary files /dev/null and b/clientgui/res/templates/skins/Icons/Waiting 17.png differ
diff --git a/clientgui/res/templates/skins/Original artwork/1600x1200.jpg b/clientgui/res/templates/skins/Original artwork/1600 x 1200.jpg
similarity index 100%
copy from clientgui/res/templates/skins/Original artwork/1600x1200.jpg
copy to clientgui/res/templates/skins/Original artwork/1600 x 1200.jpg
diff --git a/clientgui/res/templates/skins/Resource Information.txt b/clientgui/res/templates/skins/Resource Information.txt
index 5ad81d1..1635b3a 100644
--- a/clientgui/res/templates/skins/Resource Information.txt
+++ b/clientgui/res/templates/skins/Resource Information.txt
@@ -1,8 +1,8 @@
Boinc Logo:
http://boinc.berkeley.edu/logo.php
-Background:
+Background (used with permission by Funerium):
http://funerium.deviantart.com/art/Moment-in-space-XCVI-103416759?q=gallery%3Afunerium%2F230361&qo=100
-Background changes and Icon work:
+Background changes and Icons:
Jacob Klein
\ No newline at end of file
diff --git a/clientgui/res/windowsicon.xpm b/clientgui/res/windowsicon.xpm
index dadeb3e..89ce674 100644
--- a/clientgui/res/windowsicon.xpm
+++ b/clientgui/res/windowsicon.xpm
@@ -1,5 +1,5 @@
/* XPM */
-static char *Win32_xpm[] = {
+static const char *Win32_xpm[] = {
/* columns rows colors chars-per-pixel */
"14 14 23 1",
"4 c #6CC0EE",
diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp
index d5e4599..0972d01 100644
--- a/clientgui/sg_BoincSimpleFrame.cpp
+++ b/clientgui/sg_BoincSimpleFrame.cpp
@@ -429,7 +429,9 @@ void CSimpleFrame::OnSelectSkin( wxCommandEvent& event ){
oldSkinID = m_pSubmenuSkins->FindItem(oldSkinName);
}
oldItem = m_pSubmenuSkins->FindItem(oldSkinID);
- oldItem->Check(false);
+ if (oldItem) {
+ oldItem->Check(false);
+ }
selectedItem->Check(true);
pSkinManager->ReloadSkin(newSkinName);
@@ -550,11 +552,6 @@ void CSimpleFrame::OnNotification(CFrameEvent& WXUNUSED(event)) {
void CSimpleFrame::OnRefreshView(CFrameEvent& WXUNUSED(event)) {
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnRefreshView - Function Start"));
- static bool bAlreadyRunning = false;
-
- if (bAlreadyRunning) return;
- bAlreadyRunning = true;
-
m_pBackgroundPanel->OnFrameRender();
if (dlgMsgsPtr) {
@@ -566,8 +563,6 @@ void CSimpleFrame::OnRefreshView(CFrameEvent& WXUNUSED(event)) {
wxToolTip::Enable(true);
#endif
- bAlreadyRunning = false;
-
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnRefreshView - Function End"));
}
@@ -768,6 +763,14 @@ CSimpleGUIPanel::CSimpleGUIPanel(wxWindow* parent) :
#ifdef __WXMAC__
// Tell accessibility aids to ignore this panel (but not its contents)
HIObjectSetAccessibilityIgnored((HIObjectRef)GetHandle(), true);
+
+ SInt32 response;
+ OSStatus err = Gestalt(gestaltSystemVersion, &response);
+ if ((err == noErr) && (response >= 0x1070)) {
+ m_iRedRingRadius = 4;
+ } else {
+ m_iRedRingRadius = 12;
+ }
#endif
m_SuspendResumeButton->Disable();
@@ -858,8 +861,8 @@ void CSimpleGUIPanel::OnFrameRender() {
// Workaround for Linux refresh problem
if (m_irefreshCount < REFRESH_WAIT) {
++m_irefreshCount;
- m_taskPanel->Update(true);
- return;
+ m_taskPanel->UpdatePanel(true);
+ return;
}
if (workCount != m_oldWorkCount) {
@@ -908,8 +911,7 @@ void CSimpleGUIPanel::OnFrameRender() {
m_oldWorkCount = workCount;
- m_taskPanel->Update(false);
-
+ m_taskPanel->UpdatePanel(false);
}
}
@@ -1011,7 +1013,6 @@ void CSimpleGUIPanel::OnPaint(wxPaintEvent& WXUNUSED(event)) {
if (m_bNewNoticeAlert) {
wxRect r = m_NoticesButton->GetRect();
- r.Inflate(3, 3);
if (m_bNoticesButtonIsRed) {
wxPen oldPen = myDC.GetPen();
wxBrush oldBrush = myDC.GetBrush();
@@ -1021,10 +1022,13 @@ void CSimpleGUIPanel::OnPaint(wxPaintEvent& WXUNUSED(event)) {
myDC.SetPen(bgPen);
myDC.SetBrush(*wxTRANSPARENT_BRUSH);
#ifdef __WXMAC__
- myDC.DrawRoundedRectangle(r.x, r.y, r.width, r.height, 12);
+ r.Inflate(2, 2);
+ myDC.DrawRoundedRectangle(r.x, r.y, r.width, r.height+1, m_iRedRingRadius);
#elif defined(__WXMSW__)
+ r.Inflate(3, 3);
myDC.DrawRectangle(r.x, r.y, r.width, r.height);
#else
+ r.Inflate(3, 3);
myDC.DrawRoundedRectangle(r.x, r.y, r.width, r.height, 6);
#endif
// Restore Mode, Pen and Brush
diff --git a/clientgui/sg_BoincSimpleFrame.h b/clientgui/sg_BoincSimpleFrame.h
index 59596ac..b0d329d 100644
--- a/clientgui/sg_BoincSimpleFrame.h
+++ b/clientgui/sg_BoincSimpleFrame.h
@@ -76,6 +76,7 @@ protected:
// EventHandlerRef m_pSGAccessibilityEventHandlerRef;
+ int m_iRedRingRadius;
#endif
wxBitmap m_bmpBg;
wxButton *m_NoticesButton;
@@ -87,7 +88,7 @@ protected:
bool m_bIsSuspended;
private:
- int m_irefreshCount;
+ int m_irefreshCount;
bool dlgOpen;
wxTimer* checkForNewNoticesTimer;
wxString m_sSuspendButtonToolTip;
diff --git a/clientgui/sg_PanelBase.cpp b/clientgui/sg_PanelBase.cpp
index b9402e5..a9aff19 100644
--- a/clientgui/sg_PanelBase.cpp
+++ b/clientgui/sg_PanelBase.cpp
@@ -158,6 +158,15 @@ void CSimplePanelBase::OnPaint(wxPaintEvent& /*event*/) {
dc.GetSize(&w, &h);
dc.DrawRoundedRectangle(0, 0, w, h, RECTANGLERADIUS);
+#ifdef __WXMAC__
+ // Mac progress bar can be hard to see on a colored
+ // background, so put it on a white background
+ wxRect progressRect = GetProgressRect();
+ dc.SetPen(*wxBLACK_PEN);
+ dc.SetBrush(*wxWHITE_BRUSH);
+ dc.DrawRoundedRectangle(progressRect.x, progressRect.y, progressRect.width, progressRect.height, 2);
+#endif
+
// Restore Mode, Pen and Brush
dc.SetBackgroundMode(oldMode);
dc.SetPen(oldPen);
@@ -165,6 +174,15 @@ void CSimplePanelBase::OnPaint(wxPaintEvent& /*event*/) {
}
+wxBitmap CSimplePanelBase::GetBackgroundBmp() {
+ if (!m_GotBGBitMap) {
+ MakeBGBitMap();
+ }
+
+ return m_TaskPanelBGBitMap;
+}
+
+
void CSimplePanelBase::UpdateStaticText(CTransparentStaticText **whichText, wxString s) {
EllipseStringIfNeeded(s, *whichText);
if ((*whichText)->GetLabel() != s) {
diff --git a/clientgui/sg_PanelBase.h b/clientgui/sg_PanelBase.h
index 78425a7..4a7756c 100755
--- a/clientgui/sg_PanelBase.h
+++ b/clientgui/sg_PanelBase.h
@@ -70,6 +70,7 @@ class CSimplePanelBase : public wxPanel
void ReskinInterface();
virtual wxRect GetProgressRect() { return wxRect(0, 0, 0, 0); }
+ wxBitmap GetBackgroundBmp();
void UpdateStaticText(CTransparentStaticText **whichText, wxString s);
void EllipseStringIfNeeded(wxString& s, wxWindow *win);
diff --git a/clientgui/sg_ProjectPanel.cpp b/clientgui/sg_ProjectPanel.cpp
index 2742476..5dbd826 100644
--- a/clientgui/sg_ProjectPanel.cpp
+++ b/clientgui/sg_ProjectPanel.cpp
@@ -17,6 +17,8 @@
#define TESTBIGICONPOPUP 0
+#define SORTPROJECTLIST 1
+
#include "stdwx.h"
#include "Events.h"
#include "app_ipc.h"
@@ -75,7 +77,6 @@ CSimpleProjectPanel::CSimpleProjectPanel( wxWindow* parent ) :
m_sSynchronizeToolTip = _("Synchronize projects with account manager system");
m_GotBGBitMap = false; // Can't be made until parent has been laid out.
- SetFont(wxFont(SMALL_FONT,wxSWISS,wxNORMAL,wxNORMAL,false,wxT("Arial")));
SetForegroundColour(*wxBLACK);
wxBoxSizer* bSizer1;
@@ -167,6 +168,7 @@ CSimpleProjectPanel::~CSimpleProjectPanel()
for(int j = count-1; j >=0; --j) {
selData = (ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j);
delete selData;
+ // Indicate to Clear() we have cleaned up the Selection Data
m_ProjectSelectionCtrl->SetClientData(j, NULL);
}
m_ProjectSelectionCtrl->Clear();
@@ -389,36 +391,58 @@ void CSimpleProjectPanel::UpdateProjectList() {
ProjectSelectionData* selData;
PROJECT* project;
char* ctrl_url;
- int i, j;
+ int i, j, oldProjectSelection, newProjectSelection;
if ( pDoc->IsConnected() ) {
int projCnt = pDoc->GetSimpleProjectCount();
int ctrlCount = m_ProjectSelectionCtrl->GetCount();
+ oldProjectSelection = m_ProjectSelectionCtrl->GetSelection();
+
+ // If a new project has been added, figure out which one
+ for(i=0; i<projCnt; i++) {
+ project = pDoc->state.projects[i];
+ bool found = false;
+ for(j=0; j<ctrlCount; j++) {
+ ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
+ if (!strcmp(project->master_url, ctrl_url)) {
+ found = true;
+ break;
+ }
+ }
- // If a new project has been added, figure out which one and then add it;
- while ( projCnt > ctrlCount ) {
- for(i=0; i<projCnt; i++) {
- project = pDoc->state.projects[i];
- bool found = false;
- for(j=0; j<ctrlCount; j++) {
- ctrl_url = ((ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j))->project_url;
- if (!strcmp(project->master_url, ctrl_url)) {
- found = true;
- break;
- }
- }
- if ( !found ) {
- selData = new ProjectSelectionData;
- strncpy(selData->project_url, project->master_url, sizeof(selData->project_url));
- selData->project_files_downloaded_time = 0.0;
- wxBitmap* projectBM = GetProjectSpecificBitmap(selData->project_url);
- wxString projname(project->project_name.c_str(), wxConvUTF8);
+ // if it isn't currently in the list then we have a new one! lets add it
+ if ( !found ) {
+ wxString projname(project->project_name.c_str(), wxConvUTF8);
+#if SORTPROJECTLIST
+ int alphaOrder;
+ for(j = 0; j < ctrlCount; ++j) {
+ alphaOrder = (m_ProjectSelectionCtrl->GetString(j)).CmpNoCase(projname);
+ if (alphaOrder > 0) {
+ break; // Insert the new item here (sorted by item label)
+ }
+ }
+#endif
+ selData = new ProjectSelectionData;
+ strncpy(selData->project_url, project->master_url, sizeof(selData->project_url));
+ selData->project_files_downloaded_time = project->project_files_downloaded_time;
+ wxBitmap* projectBM = GetProjectSpecificBitmap(selData->project_url);
+#if SORTPROJECTLIST
+ if (j < ctrlCount) {
+ m_ProjectSelectionCtrl->Insert(projname, *projectBM, j, (void*)selData);
+ if (j <= oldProjectSelection) {
+ ++oldProjectSelection;
+ m_ProjectSelectionCtrl->SetSelection(oldProjectSelection);
+ }
+ } else
+#endif
+ {
m_ProjectSelectionCtrl->Append(projname, *projectBM, (void*)selData);
- ctrlCount = m_ProjectSelectionCtrl->GetCount();
- }
- }
- }
+ }
+ ctrlCount = m_ProjectSelectionCtrl->GetCount();
+ }
+ }
+ newProjectSelection = oldProjectSelection;
if ( projCnt < ctrlCount ) {
project = NULL;
// Check items in descending order so deletion won't change indexes of items yet to be checked
@@ -428,10 +452,25 @@ void CSimpleProjectPanel::UpdateProjectList() {
if ( project == NULL ) {
selData = (ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j);
delete selData;
+ // Indicate to Delete() we have cleaned up the Selection Data
+ m_ProjectSelectionCtrl->SetClientData(j, NULL);
m_ProjectSelectionCtrl->Delete(j);
+ if (j == oldProjectSelection) {
+ int newCount = m_ProjectSelectionCtrl->GetCount();
+ if (newProjectSelection < newCount) {
+ // Select the next item if one exists
+ m_ProjectSelectionCtrl->SetSelection(newProjectSelection);
+ } else if (newCount > 0) {
+ // Select the previous item if one exists
+ newProjectSelection = newCount-1;
+ m_ProjectSelectionCtrl->SetSelection(newProjectSelection);
+ } else {
+ newProjectSelection = -1;
+ m_ProjectSelectionCtrl->SetSelection(wxNOT_FOUND);
+ }
+ }
}
}
-
}
// Check to see if we need to reload the project icon
diff --git a/clientgui/sg_TaskPanel.cpp b/clientgui/sg_TaskPanel.cpp
index 185ba3a..da0be6d 100644
--- a/clientgui/sg_TaskPanel.cpp
+++ b/clientgui/sg_TaskPanel.cpp
@@ -15,10 +15,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
-#define TESTBIGICONPOPUP 0
-
-#define SORTTASKLIST 1 /* TRUE to sort task selection control alphabetically */
-
#include "stdwx.h"
#include "miofile.h"
#include "Events.h"
@@ -31,38 +27,203 @@
#include "filesys.h"
-enum { redDot, yellowDot, greenDot };
+#define SORTTASKLIST 1 /* TRUE to sort task selection control alphabetically */
+#define SLIDESHOWBORDER 3
+#define DESCRIPTIONSPACER 4
+#define HIDEDEFAULTSLIDE 1
+#define TESTALLDESCRIPTIONS 0
+
+enum { suspendedIcon, waitingIcon, runningIcon };
+
+
+IMPLEMENT_DYNAMIC_CLASS(CScrolledTextBox, wxScrolledWindow)
+
+BEGIN_EVENT_TABLE(CScrolledTextBox, wxScrolledWindow)
+ EVT_ERASE_BACKGROUND(CScrolledTextBox::OnEraseBackground)
+END_EVENT_TABLE()
+
+CScrolledTextBox::CScrolledTextBox() {
+}
+
+
+CScrolledTextBox::CScrolledTextBox( wxWindow* parent) :
+ wxScrolledWindow( parent, ID_SGPROJECTDESCRIPTION, wxDefaultPosition, wxDefaultSize, wxVSCROLL)
+{
+ m_iAvailableWidth = 296; // This will be overwritten
+
+ SetForegroundColour(*wxBLACK);
+
+ m_TextSizer = new wxBoxSizer( wxVERTICAL );
+
+ this->SetSizerAndFit( m_TextSizer );
+ this->Layout();
+ this->FitInside();
+}
+
+
+CScrolledTextBox::~CScrolledTextBox() {
+ // Delete sizer & its children (CTransparentStaticText objects)
+ m_TextSizer->Clear(true);
+}
+
+
+void CScrolledTextBox::SetValue(const wxString& s) {
+ int lineHeight, totalLines;
+ wxString t = s;
+
+ // Delete sizer & its children (CTransparentStaticText objects)
+ m_TextSizer->Clear(true);
+
+ // Change all occurrences of "<sup>n</sup>" to "^n"
+ t.Replace(wxT("<sup>"), wxT("^"), true);
+ t.Replace(wxT("</sup>"), wxT(""), true);
+ wxString tt = t;
+
+ // First, determine if scroll bars needed so sizer can recompute
+ totalLines = Wrap(tt, m_iAvailableWidth, &lineHeight);
+ m_TextSizer->FitInside(this);
+
+ // Now get the actual client size with or without scroll bars
+ GetClientSize(&m_iAvailableWidth, &lineHeight);
+ m_TextSizer->Clear(true); // Delete sizer & its children
+
+ totalLines = Wrap(t, m_iAvailableWidth - 3, &lineHeight);
+
+ m_TextSizer->FitInside(this);
+ SetScrollRate(1, lineHeight);
+}
+
+
+void CScrolledTextBox::OnEraseBackground(wxEraseEvent& event) {
+ wxDC *dc = event.GetDC();
+ wxPoint p = GetParent()->GetPosition();
+ wxRect r = GetRect();
+ r.Offset(p);
+ wxBitmap backgroundBitmap = ((CSimpleTaskPanel*)GetGrandParent())->GetBackgroundBmp().GetSubBitmap(r);
+ dc->DrawBitmap(backgroundBitmap, 0, 0);
+}
+
+
+// Text wrapping code adapted from wxWindows dlgcmn.cpp
+bool CScrolledTextBox::IsStartOfNewLine() {
+ if ( !m_eol ) return false;
+ m_eol = false;
+ return true;
+}
+
+
+void CScrolledTextBox::OnOutputLine(const wxString& line) {
+ if ( !line.empty() ) {
+ m_TextSizer->Add(new CTransparentStaticText(this, wxID_ANY, line));
+ } else { // empty line, no need to create a control for it
+ if ( !m_hLine ) {
+ m_hLine = GetCharHeight();
+ }
+ m_TextSizer->Add(5, m_hLine);
+ }
+}
+
+
+// Returns the number of lines
+int CScrolledTextBox::Wrap(const wxString& text, int widthMax, int *lineHeight) {
+ const wxChar *lastSpace = NULL;
+ wxString line;
+ int height = 0, numLines = 0;
+
+ const wxChar *lineStart = text.c_str();
+ for ( const wxChar *p = lineStart; ; p++ ) {
+ if ( IsStartOfNewLine() ) {
+ m_text += _T('\n');
+
+ lastSpace = NULL;
+ line.clear();
+ lineStart = p;
+ }
+
+ if ( *p == _T('\n') || *p == _T('\0') ) {
+ OnOutputLine(line);
+ m_eol = true;
+ ++numLines;
+
+ if ( *p == _T('\0') )
+ break;
+ } else { // not EOL
+ if ( *p == _T(' ') ) {
+ lastSpace = p;
+ }
+ line += *p;
+
+ if ( widthMax >= 0 && lastSpace ) {
+ int width;
+ GetTextExtent(line, &width, &height);
+
+ if ( width > widthMax ) {
+ // remove the last word from this line
+ line.erase(lastSpace - lineStart, p + 1 - lineStart);
+ OnOutputLine(line);
+ m_eol = true;
+ ++numLines;
+
+ // go back to the last word of this line which we didn't
+ // output yet
+ p = lastSpace;
+ }
+ }
+ //else: no wrapping at all or impossible to wrap
+ }
+ }
+ *lineHeight = height;
+ return numLines;
+}
+
IMPLEMENT_DYNAMIC_CLASS(CSlideShowPanel, wxPanel)
BEGIN_EVENT_TABLE(CSlideShowPanel, wxPanel)
-// EVT_ERASE_BACKGROUND(CSlideShowPanel::OnEraseBackground)
+ EVT_ERASE_BACKGROUND(CSlideShowPanel::OnEraseBackground)
EVT_TIMER(ID_CHANGE_SLIDE_TIMER, CSlideShowPanel::OnSlideShowTimer)
EVT_PAINT(CSlideShowPanel::OnPaint)
END_EVENT_TABLE()
-#define SLIDESHOWBORDER 3
-
CSlideShowPanel::CSlideShowPanel() {
}
CSlideShowPanel::CSlideShowPanel( wxWindow* parent ) :
- wxPanel( parent, wxID_ANY, wxDefaultPosition, wxSize(290+(2*SLIDESHOWBORDER), 126+(2*SLIDESHOWBORDER)), wxSTATIC_BORDER )
+ wxPanel( parent, wxID_ANY, wxDefaultPosition, wxSize(290+(2*SLIDESHOWBORDER), 126+(2*SLIDESHOWBORDER)), wxBORDER_NONE )
{
- SetBackgroundColour(*wxBLACK);
+ int w, h;
+ wxBoxSizer* bSizer1;
+ bSizer1 = new wxBoxSizer( wxVERTICAL );
- m_ChangeSlideTimer = new wxTimer(this, ID_CHANGE_SLIDE_TIMER);
- m_ChangeSlideTimer->Start(10000);
+ m_institution = new CTransparentStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer1->Add( m_institution, 0, 0, 0 );
+
+ m_scienceArea = new CTransparentStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer1->Add( m_scienceArea, 0, 0, 0 );
+ bSizer1->AddSpacer(DESCRIPTIONSPACER);
+
+ m_description = new CScrolledTextBox( this );
+ GetSize(&w, &h);
+ m_description->SetMinSize(wxSize(w, h - (2 * GetCharHeight()) - DESCRIPTIONSPACER));
+ bSizer1->Add( m_description, 1, wxEXPAND, 0 );
+
+ this->SetSizer( bSizer1 );
+ this->Layout();
+
m_SlideBitmap = wxNullBitmap;
m_bCurrentSlideIsDefault = false;
+ m_bGotAllProjectsList = false;
#ifdef __WXMAC__
// Tell accessibility aids to ignore this panel (but not its contents)
HIObjectSetAccessibilityIgnored((HIObjectRef)GetHandle(), true);
#endif
+
+ m_ChangeSlideTimer = new wxTimer(this, ID_CHANGE_SLIDE_TIMER);
+ m_ChangeSlideTimer->Start(10000);
}
CSlideShowPanel::~CSlideShowPanel()
@@ -75,18 +236,68 @@ CSlideShowPanel::~CSlideShowPanel()
void CSlideShowPanel::OnSlideShowTimer(wxTimerEvent& WXUNUSED(event)) {
- AdvanceSlideShow(true);
+ AdvanceSlideShow(true, false);
}
-void CSlideShowPanel::AdvanceSlideShow(bool changeSlide) {
+void CSlideShowPanel::AdvanceSlideShow(bool changeSlide, bool reload) {
double xRatio, yRatio, ratio;
+ unsigned int i;
TaskSelectionData* selData = ((CSimpleTaskPanel*)GetParent())->GetTaskSelectionData();
if (selData == NULL) return;
- int numSlides = (int)selData->slideShowFileNames.size();
+ if (reload) {
+ m_bCurrentSlideIsDefault = false;
+ selData->lastSlideShown = -1;
+ }
+ int numSlides = (int)selData->slideShowFileNames.size();
+#if TESTALLDESCRIPTIONS // For testing
+numSlides = 0;
+#endif
if (numSlides <= 0) {
+#if HIDEDEFAULTSLIDE
+ if (!reload) {
+ return;
+ }
+ wxRect r = GetRect();
+ wxBitmap backgroundBitmap = ((CSimpleTaskPanel*)GetParent())->GetBackgroundBmp().GetSubBitmap(r);
+ wxWindowDC dc(this);
+ dc.DrawBitmap(backgroundBitmap, 0, 0);
+
+ // Force redraws if text unchanged; hide all if not in all-projects list
+ m_institution->Show(false);
+ m_scienceArea->Show(false);
+ m_description->Show(false);
+ Enable( false );
+
+ if (!m_bGotAllProjectsList) {
+ CMainDocument* pDoc = wxGetApp().GetDocument();
+ wxASSERT(pDoc);
+
+ pDoc->rpc.get_all_projects_list(m_AllProjectsList);
+ m_bGotAllProjectsList = true;
+ }
+
+ for (i=0; i<m_AllProjectsList.projects.size(); i++) {
+ if (!strcmp(m_AllProjectsList.projects[i]->url.c_str(), selData->project_url)) {
+ m_institution->SetLabel(wxString(m_AllProjectsList.projects[i]->home.c_str(), wxConvUTF8));
+ m_scienceArea->SetLabel(wxString(m_AllProjectsList.projects[i]->specific_area.c_str(), wxConvUTF8));
+ m_description->SetValue(wxString(m_AllProjectsList.projects[i]->description.c_str(), wxConvUTF8));
+
+ m_institution->Show(true);
+ m_scienceArea->Show(true);
+ m_description->Show(true);
+ Enable( true );
+ m_description->Enable();
+ this->Layout();
+ break;
+ }
+ }
+ return;
+#else // HIDEDEFAULTSLIDE
+ SetBackgroundColour(*wxBLACK);
+
if (m_bCurrentSlideIsDefault) return;
CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple();
@@ -97,11 +308,19 @@ void CSlideShowPanel::AdvanceSlideShow(bool changeSlide) {
if (m_SlideBitmap.Ok()) {
m_bCurrentSlideIsDefault = true;
}
+#endif // HIDEDEFAULTSLIDE
} else {
+#if HIDEDEFAULTSLIDE
+ m_institution->Show(false);
+ m_scienceArea->Show(false);
+ m_description->Show(false);
+ Enable( false );
+
+#endif // HIDEDEFAULTSLIDE
// TODO: Should we allow slide show to advance if task is not running?
int newSlide = selData->lastSlideShown;
- if (selData->dotColor == greenDot) { // Advance only if running
+ if (selData->dotColor == runningIcon) { // Advance only if running
if (changeSlide) {
if (++newSlide >= numSlides) {
newSlide = 0;
@@ -150,7 +369,20 @@ void CSlideShowPanel::AdvanceSlideShow(bool changeSlide) {
void CSlideShowPanel::OnPaint(wxPaintEvent& WXUNUSED(event))
{
- wxPaintDC dc(this);
+ wxPaintDC dc(this);
+#if HIDEDEFAULTSLIDE
+ int numSlides = 0;
+ TaskSelectionData* selData = ((CSimpleTaskPanel*)GetParent())->GetTaskSelectionData();
+ if (selData) {
+ numSlides = (int)selData->slideShowFileNames.size();
+ }
+#if TESTALLDESCRIPTIONS // For testing
+numSlides = 0;
+#endif // TESTALLDESCRIPTIONS
+
+ if (numSlides > 0)
+#endif // HIDEDEFAULTSLIDE
+ {
int w, h;
wxPen oldPen = dc.GetPen();
wxBrush oldBrush = dc.GetBrush();
@@ -173,9 +405,17 @@ void CSlideShowPanel::OnPaint(wxPaintEvent& WXUNUSED(event))
(w - m_SlideBitmap.GetWidth())/2,
(h - m_SlideBitmap.GetHeight())/2
);
- }
+ }
+ }
}
+
+void CSlideShowPanel::OnEraseBackground(wxEraseEvent& event) {
+ wxDC *dc = event.GetDC();
+ wxRect r = GetRect();
+ wxBitmap backgroundBitmap = ((CSimpleTaskPanel*)GetParent())->GetBackgroundBmp().GetSubBitmap(r);
+ dc->DrawBitmap(backgroundBitmap, 0, 0);
+}
@@ -184,18 +424,12 @@ IMPLEMENT_DYNAMIC_CLASS(CSimpleTaskPanel, CSimplePanelBase)
BEGIN_EVENT_TABLE(CSimpleTaskPanel, CSimplePanelBase)
EVT_BOINCBITMAPCOMBOBOX(ID_SGTASKSELECTOR, CSimpleTaskPanel::OnTaskSelection)
-// EVT_BUTTON(ID_TASKSCOMMANDBUTTON, CSimpleTaskPanel::OnTasksCommand)
-// EVT_LEFT_DOWN(CSimpleTaskPanel::OnTasksCommand)
EVT_TIMER(ID_SIMPLE_PROGRESSPULSETIMER, CSimpleTaskPanel::OnPulseProgressIndicator)
#ifdef __WXMAC__
EVT_ERASE_BACKGROUND(CSimpleTaskPanel::OnEraseBackground)
#endif
END_EVENT_TABLE()
-#if TESTBIGICONPOPUP
-static wxString tempArray[] = {_T("String1"), _T("String2"), _T("String3") };
-#endif
-
CSimpleTaskPanel::CSimpleTaskPanel() {
}
@@ -228,16 +462,7 @@ CSimpleTaskPanel::CSimpleTaskPanel( wxWindow* parent ) :
m_myTasksLabel->Wrap( -1 );
bSizer2->Add( m_myTasksLabel, 0, wxRIGHT, 5 );
-#if TESTBIGICONPOPUP
- m_TaskSelectionCtrl = new CBOINCBitmapComboBox( this, ID_SGTASKSELECTOR, wxT(""), wxDefaultPosition, wxDefaultSize, 3, tempArray, wxCB_READONLY );
- m_TaskSelectionCtrl->SetItemBitmap(0, m_RedDot);
- m_TaskSelectionCtrl->SetItemBitmap(1, m_GreenDot);
- m_TaskSelectionCtrl->SetItemBitmap(2, m_YellowDot);
-// m_TaskSelectionCtrl->SetStringSelection(tempArray[1]);
- m_TaskSelectionCtrl->SetSelection(1);
-#else
m_TaskSelectionCtrl = new CBOINCBitmapComboBox( this, ID_SGTASKSELECTOR, wxT(""), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
-#endif
// TODO: Might want better wording for Task Selection Combo Box tooltip
str = _("Select a task to access");
m_TaskSelectionCtrl->SetToolTip(str);
@@ -268,7 +493,7 @@ CSimpleTaskPanel::CSimpleTaskPanel( wxWindow* parent ) :
m_TaskApplicationName->Wrap( -1 );
bSizer1->Add( m_TaskApplicationName, 0, wxLEFT | wxRIGHT | wxEXPAND, SIDEMARGINS );
-#endif
+#endif // SELECTBYRESULTNAME
bSizer1->AddSpacer(10);
@@ -317,7 +542,6 @@ CSimpleTaskPanel::CSimpleTaskPanel( wxWindow* parent ) :
// TODO: Can we determine the longest status string and initialize with it?
m_StatusValueText = new CTransparentStaticText( this, wxID_ANY, m_sNoProjectsString, wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
-// m_StatusValueText = new CTransparentStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
m_StatusValueText->Wrap( -1 );
bSizer1->Add( m_StatusValueText, 0, wxLEFT | wxRIGHT | wxEXPAND, SIDEMARGINS );
@@ -331,9 +555,12 @@ CSimpleTaskPanel::CSimpleTaskPanel( wxWindow* parent ) :
this->SetSizer( bSizer1 );
this->Layout();
-
+
m_ProgressRect = m_ProgressBar->GetRect();
- m_ProgressRect.Inflate(1, 0);
+#ifdef __WXMAC__
+ m_ProgressRect.Inflate(0, -2);
+ m_ProgressRect.Offset(0, -2);
+#endif
}
@@ -345,6 +572,7 @@ CSimpleTaskPanel::~CSimpleTaskPanel()
selData = (TaskSelectionData*)m_TaskSelectionCtrl->GetClientData(j);
selData->slideShowFileNames.Clear();
delete selData;
+ // Indicate to Clear() we have cleaned up the Selection Data
m_TaskSelectionCtrl->SetClientData(j, NULL);
}
m_TaskSelectionCtrl->Clear();
@@ -364,12 +592,12 @@ void CSimpleTaskPanel::OnTaskSelection(wxCommandEvent& /*event*/)
if (sel != m_CurrentTaskSelection) {
m_CurrentTaskSelection = sel;
m_bStableTaskInfoChanged = true;
- Update();
+ UpdatePanel();
}
}
-void CSimpleTaskPanel::Update(bool delayShow) {
+void CSimpleTaskPanel::UpdatePanel(bool delayShow) {
wxString s = wxEmptyString;
wxString projName = wxEmptyString;
TaskSelectionData *selData;
@@ -386,14 +614,14 @@ void CSimpleTaskPanel::Update(bool delayShow) {
if ((workCount <= 0) || delayShow) {
if ((workCount != m_oldWorkCount) || delayShow) {
- wasDelayed = true;
+ wasDelayed = true;
m_myTasksLabel->Hide();
m_TaskSelectionCtrl->Hide();
m_TaskProjectLabel->Hide();
m_TaskProjectName->Hide();
#if SELECTBYRESULTNAME
m_TaskApplicationName->Hide();
-#endif
+#endif // SELECTBYRESULTNAME
m_SlideShowArea->Hide();
m_ElapsedTimeValue->Hide();
m_TimeRemainingValue->Hide();
@@ -405,26 +633,38 @@ void CSimpleTaskPanel::Update(bool delayShow) {
m_pulseTimer->Start(100);
}
this->Layout();
+
+#ifdef __WXMAC__
+ m_ProgressRect = m_ProgressBar->GetRect();
+ m_ProgressRect.Inflate(0, -2);
+ m_ProgressRect.Offset(0, -2);
+#endif
}
DisplayIdleState();
} else {
if ((m_oldWorkCount == 0) || wasDelayed) {
- wasDelayed = false;
+ wasDelayed = false;
m_myTasksLabel->Show();
m_TaskSelectionCtrl->Show();
m_TaskProjectLabel->Show();
m_TaskProjectName->Show();
#if SELECTBYRESULTNAME
m_TaskApplicationName->Show();
-#endif
+#endif // SELECTBYRESULTNAME
m_SlideShowArea->Show();
m_ElapsedTimeValue->Show();
m_TimeRemainingValue->Show();
m_ProgressValueText->Show();
m_TaskCommandsButton->Show();
this->Layout();
+
+#ifdef __WXMAC__
+ m_ProgressRect = m_ProgressBar->GetRect();
+ m_ProgressRect.Inflate(0, -2);
+ m_ProgressRect.Offset(0, -2);
+#endif
}
UpdateTaskSelectionList(false);
@@ -449,11 +689,11 @@ void CSimpleTaskPanel::Update(bool delayShow) {
str.Printf(_("Application: %s"), s.c_str());
UpdateStaticText(&m_TaskApplicationName, str);
UpdateStaticText(&m_TaskProjectName, projName);
-#else
+#else // SELECTBYRESULTNAME
GetApplicationAndProjectNames(result, NULL, &projName);
-#endif
+#endif // SELECTBYRESULTNAME
UpdateStaticText(&m_TaskProjectName, projName);
- m_SlideShowArea->AdvanceSlideShow(false);
+ m_SlideShowArea->AdvanceSlideShow(false, true);
m_bStableTaskInfoChanged = false;
}
float f = result->elapsed_time;
@@ -479,7 +719,7 @@ void CSimpleTaskPanel::Update(bool delayShow) {
UpdateStaticText(&m_TaskProjectName, m_sNotAvailableString);
#if SELECTBYRESULTNAME
UpdateStaticText(&m_TaskApplicationName, _("Application: Not available") );
-#endif
+#endif // SELECTBYRESULTNAME
UpdateStaticText(&m_ElapsedTimeValue, GetElapsedTimeString(-1.0));
UpdateStaticText(&m_TimeRemainingValue, GetTimeRemainingString(-1.0));
if (m_iPctDoneX10 >= 0) {
@@ -501,9 +741,11 @@ void CSimpleTaskPanel::Update(bool delayShow) {
void CSimpleTaskPanel::ReskinInterface() {
+ wxLogTrace(wxT("Function Start/End"), wxT("CSimpleTaskPanel::ReskinInterface - Function Begin"));
CSimplePanelBase::ReskinInterface();
- m_SlideShowArea->AdvanceSlideShow(false);
+ m_SlideShowArea->AdvanceSlideShow(false, false);
UpdateTaskSelectionList(true);
+ wxLogTrace(wxT("Function Start/End"), wxT("CSimpleTaskPanel::ReskinInterface - Function Begin"));
}
@@ -692,7 +934,8 @@ void CSimpleTaskPanel::FindSlideShowFiles(TaskSelectionData *selData) {
void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
- int i, j, count, newColor, alphaOrder;;
+ wxLogTrace(wxT("Function Start/End"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Function Begin"));
+ int i, j, count, newIcon;
TaskSelectionData *selData;
RESULT* result;
RESULT* ctrlResult;
@@ -726,9 +969,9 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
resname = wxEmptyString;
#if SELECTBYRESULTNAME
resname = wxString::FromUTF8(result->name);
-#else
+#else // SELECTBYRESULTNAME
GetApplicationAndProjectNames(result, &resname, NULL);
-#endif
+#endif // SELECTBYRESULTNAME
// loop through the items already in Task Selection Control to find this result
count = m_TaskSelectionCtrl->GetCount();
@@ -746,8 +989,9 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
// if it isn't currently in the list then we have a new one! lets add it
if (!found) {
+ int alphaOrder;
for(j = 0; j < count; ++j) {
- alphaOrder = (m_TaskSelectionCtrl->GetString(j)).Cmp(resname);
+ alphaOrder = (m_TaskSelectionCtrl->GetString(j)).CmpNoCase(resname);
#if SORTTASKLIST
if (alphaOrder > 0) {
break; // Insert the new item here (sorted by item label)
@@ -798,10 +1042,17 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
// Check items in descending order so deletion won't change indexes of items yet to be checked
for(j = count-1; j >=0; --j) {
- if(! is_alive.at(j)) {
+ if(!is_alive.at(j)) {
+ wxLogTrace(wxT("Function Status"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Task '%d' no longer alive"), j);
selData = (TaskSelectionData*)m_TaskSelectionCtrl->GetClientData(j);
+ wxLogTrace(wxT("Function Status"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - selData '%p' "), selData);
+ wxLogTrace(wxT("Function Status"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - result_name '%s' "), selData->result_name);
selData->slideShowFileNames.Clear();
+ wxLogTrace(wxT("Function Status"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Deleting selData"));
delete selData;
+ wxLogTrace(wxT("Function Status"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Deleting control data"));
+ // Indicate to Delete() we have cleaned up the Selection Data
+ m_TaskSelectionCtrl->SetClientData(j, NULL);
m_TaskSelectionCtrl->Delete(j);
if (j == m_CurrentTaskSelection) {
int newCount = m_TaskSelectionCtrl->GetCount();
@@ -818,6 +1069,9 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
}
m_bStableTaskInfoChanged = true;
needRefresh = true;
+ } else if (j < m_CurrentTaskSelection) {
+ --m_CurrentTaskSelection;
+ m_TaskSelectionCtrl->SetSelection(m_CurrentTaskSelection);
}
}
}
@@ -836,34 +1090,35 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
selData = (TaskSelectionData*)m_TaskSelectionCtrl->GetClientData(j);
ctrlResult = selData->result;
if (Suspended() || ctrlResult->suspended_via_gui || ctrlResult->project_suspended_via_gui) {
- newColor = redDot;
+ newIcon = suspendedIcon;
} else if (isRunning(ctrlResult)) {
- newColor = greenDot;
+ newIcon = runningIcon;
} else if (ctrlResult->scheduler_state == CPU_SCHED_PREEMPTED) {
- newColor = yellowDot;
+ newIcon = waitingIcon;
} else {
- newColor = redDot;
+ newIcon = suspendedIcon;
}
- if (reskin || (newColor != selData->dotColor)) {
- switch (newColor) {
- case greenDot:
+ if (reskin || (newIcon != selData->dotColor)) {
+ switch (newIcon) {
+ case runningIcon:
m_TaskSelectionCtrl->SetItemBitmap(j, *pSkinSimple->GetWorkunitRunningImage()->GetBitmap());
break;
- case yellowDot:
+ case waitingIcon:
m_TaskSelectionCtrl->SetItemBitmap(j, *pSkinSimple->GetWorkunitWaitingImage()->GetBitmap());
break;
- case redDot:
+ case suspendedIcon:
m_TaskSelectionCtrl->SetItemBitmap(j, *pSkinSimple->GetWorkunitSuspendedImage()->GetBitmap());
break;
}
- selData->dotColor = newColor;
+ selData->dotColor = newIcon;
needRefresh = true;
}
}
if (needRefresh) {
m_TaskSelectionCtrl->Refresh();
}
+ wxLogTrace(wxT("Function Start/End"), wxT("CSimpleTaskPanel::UpdateTaskSelectionList - Function End"));
}
diff --git a/clientgui/sg_TaskPanel.h b/clientgui/sg_TaskPanel.h
index 56e385d..9e2d587 100755
--- a/clientgui/sg_TaskPanel.h
+++ b/clientgui/sg_TaskPanel.h
@@ -38,6 +38,38 @@ typedef struct {
///////////////////////////////////////////////////////////////////////////
+/// Class CScrolledTextBox
+///////////////////////////////////////////////////////////////////////////////
+class CScrolledTextBox : public wxScrolledWindow
+{
+ DECLARE_DYNAMIC_CLASS( CScrolledTextBox )
+ DECLARE_EVENT_TABLE()
+ public:
+ CScrolledTextBox();
+ CScrolledTextBox( wxWindow* parent);
+ ~CScrolledTextBox();
+
+ void SetValue(const wxString& s);
+ virtual void OnEraseBackground(wxEraseEvent& event);
+
+ private:
+ int Wrap(const wxString& text, int widthMax, int *lineHeight);
+ bool IsStartOfNewLine();
+ void OnOutputLine(const wxString& line);
+
+ wxBoxSizer* m_TextSizer;
+ int m_iAvailableWidth;
+ int m_iAvailableHeight;
+ bool m_eol;
+ wxString m_text;
+ int m_hLine;
+};
+
+
+
+///////////////////////////////////////////////////////////////////////////
+/// Class CSlideShowPanel
+///////////////////////////////////////////////////////////////////////////////
class CSlideShowPanel : public wxPanel
{
@@ -50,14 +82,19 @@ class CSlideShowPanel : public wxPanel
~CSlideShowPanel();
void OnSlideShowTimer(wxTimerEvent& WXUNUSED(event));
- void AdvanceSlideShow(bool changeSlide);
+ void AdvanceSlideShow(bool changeSlide, bool reload);
void OnPaint(wxPaintEvent& WXUNUSED(event));
+ void OnEraseBackground(wxEraseEvent& event);
private:
+ CTransparentStaticText* m_institution;
+ CTransparentStaticText* m_scienceArea;
+ CScrolledTextBox* m_description;
wxTimer* m_ChangeSlideTimer;
wxBitmap m_SlideBitmap;
bool m_bCurrentSlideIsDefault;
-
+ bool m_bGotAllProjectsList;
+ ALL_PROJECTS_LIST m_AllProjectsList;
};
@@ -86,7 +123,7 @@ class CSimpleTaskPanel : public CSimplePanelBase
TaskSelectionData* GetTaskSelectionData();
wxString GetSelectedTaskString() { return m_TaskSelectionCtrl->GetValue(); }
- void Update(bool delayShow=false);
+ void UpdatePanel(bool delayShow=false);
wxRect GetProgressRect() { return m_ProgressRect; }
void ReskinInterface();
diff --git a/clientgui/skins/Default/background_image.png b/clientgui/skins/Default/background_image.png
index 519cc1f..e725551 100644
Binary files a/clientgui/skins/Default/background_image.png and b/clientgui/skins/Default/background_image.png differ
diff --git a/clientgui/skins/Default/skin.xml b/clientgui/skins/Default/skin.xml
index e1e1c74..f6f9275 100644
--- a/clientgui/skins/Default/skin.xml
+++ b/clientgui/skins/Default/skin.xml
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<skin>
- <completed/>
<en>
<simple>
- <panel_opacity>58</panel_opacity>
+ <panel_opacity>90</panel_opacity>
<background_image>
<!-- Background Image for Simple GUI -->
- <!-- Recommended size: 600x750 -->
- <!-- EN-Win: 416x582 as of v6.13.10 -->
+ <!-- Recommended total size: 600x750 (to accomodate OS size differences and localizations of text) -->
+ <!-- Top banner height: about 68 -->
+ <!-- EN-Win total size: about 422x582 as of 6.13.12 -->
<image>
<imagesrc>background_image.png</imagesrc>
<background_color>0:0:0</background_color>
diff --git a/clientgui/skins/Default/workunit_running_image.png b/clientgui/skins/Default/workunit_running_image.png
index 49667d2..a880c5a 100644
Binary files a/clientgui/skins/Default/workunit_running_image.png and b/clientgui/skins/Default/workunit_running_image.png differ
diff --git a/clientgui/skins/Default/workunit_suspended_image.png b/clientgui/skins/Default/workunit_suspended_image.png
index aadea77..3b06a5d 100644
Binary files a/clientgui/skins/Default/workunit_suspended_image.png and b/clientgui/skins/Default/workunit_suspended_image.png differ
diff --git a/clientgui/skins/Default/workunit_waiting_image.png b/clientgui/skins/Default/workunit_waiting_image.png
index 5d40f0d..bfbe6d8 100644
Binary files a/clientgui/skins/Default/workunit_waiting_image.png and b/clientgui/skins/Default/workunit_waiting_image.png differ
diff --git a/clientscr/ss_app.cpp b/clientscr/ss_app.cpp
index 70d4a0a..31b4bb6 100644
--- a/clientscr/ss_app.cpp
+++ b/clientscr/ss_app.cpp
@@ -70,18 +70,27 @@ double next_connect_time = 0.0;
CC_STATE cc_state;
CC_STATUS cc_status;
-// Possible values of iBrandId:
+#ifdef __APPLE__
+// Possible values of brandId (determined at run time on Mac):
#define BOINC_BRAND_ID 0
#define GRIDREPUBLIC_BRAND_ID 1
#define PROGRESSTHRUPROCESSORS_BRAND_ID 2
#define CHARITYENGINE_BRAND_ID 3
+char* brand_name = "BOINC";
+char* logo_file = "boinc_logo_black.jpg";
+# else
+// These defines are used only on Windows builds
#ifdef _GRIDREPUBLIC
-static long iBrandId = GRIDREPUBLIC_BRAND_ID;
+const char* brand_name = "GridRepublic";
+const char* logo_file = "gridrepublic_ss_logo.jpg";
#elif defined(_CHARITYENGINE)
-static long iBrandId = CHARITYENGINE_BRAND_ID;
+const char* brand_name = "Charity Engine";
+const char* logo_file = "CE_ss_logo.jpg";
#else
-static long iBrandId = BOINC_BRAND_ID; // Default value for BOINC
+const char* brand_name = "BOINC";
+const char* logo_file = "boinc_logo_black.jpg";
+#endif
#endif
#if 0
@@ -235,32 +244,19 @@ void show_project(unsigned int index, float alpha) {
void show_disconnected() {
float x=.3, y=.3;
- if (iBrandId == GRIDREPUBLIC_BRAND_ID) {
- txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "GridRepublic is not running.");
- } else if (iBrandId == CHARITYENGINE_BRAND_ID) {
- txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "Charity Engine is not running.");
- } else {
- txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "BOINC is not running.");
- }
+ char buf[256];
+ sprintf(buf, "%s is not running.", brand_name);
+ txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, buf);
}
void show_no_projects() {
float x=.2, y=.3;
- if (iBrandId == GRIDREPUBLIC_BRAND_ID) {
- txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "GridRepublic is not attached to any projects.");
- } else if (iBrandId == CHARITYENGINE_BRAND_ID) {
- txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "Charity Engine is not attached to any projects.");
- } else {
- txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "BOINC is not attached to any projects.");
- }
+ char buf[256];
+ sprintf(buf, "%s is not attached to any projects.", brand_name);
+ txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, buf);
y = .25;
- if (iBrandId == GRIDREPUBLIC_BRAND_ID) {
- txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "Attach to projects using the GridRepublic Desktop.");
- } else if (iBrandId == CHARITYENGINE_BRAND_ID) {
- txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "Attach to projects using the Charity Engine Desktop.");
- } else {
- txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, "Attach to projects using the BOINC Manager.");
- }
+ sprintf(buf, "Attach to projects using %s.", brand_name);
+ txf_render_string(.1, x, y, 0, ALERT_SIZE, white, 0, buf);
}
#define MAX_JOBS_DISPLAY 4
@@ -272,6 +268,7 @@ void show_jobs(unsigned int index, double alpha) {
unsigned int nfound = 0;
unsigned int i;
cc_status.task_suspend_reason &= ~SUSPEND_REASON_CPU_THROTTLE;
+ char buf[256];
if (!cc_status.task_suspend_reason) {
for (i=0; i<cc_state.results.size(); i++) {
@@ -309,13 +306,11 @@ void show_jobs(unsigned int index, double alpha) {
case SUSPEND_REASON_NO_RECENT_INPUT:
p = "Computing suspended while computer not in use"; break;
case SUSPEND_REASON_INITIAL_DELAY:
- if (iBrandId == GRIDREPUBLIC_BRAND_ID) {
- p = "Computing suspended while GridRepublic is starting up"; break;
- } else if (iBrandId == CHARITYENGINE_BRAND_ID) {
- p = "Computing suspended while Charity Engine is starting up"; break;
- } else {
- p = "Computing suspended while BOINC is starting up"; break;
- }
+ sprintf(buf,
+ "Computing suspended while %s is starting up", brand_name
+ );
+ p = buf;
+ break;
case SUSPEND_REASON_EXCLUSIVE_APP_RUNNING:
p = "Computing suspended while exclusive application running"; break;
case SUSPEND_REASON_CPU_USAGE:
@@ -425,8 +420,13 @@ void app_graphics_render(int xs, int ys, double t) {
showing_project = false;
project_index++;
} else {
- job_index += MAX_JOBS_DISPLAY;
- job_index %= cc_state.results.size();
+ int n = cc_state.results.size();
+ if (n) {
+ job_index += MAX_JOBS_DISPLAY;
+ job_index %= n;
+ } else {
+ job_index = 0;
+ }
showing_project = true;
}
}
@@ -466,13 +466,7 @@ void app_graphics_init() {
#ifdef _WCG
logo.load_image_file("wcg.bmp");
#else
- if (iBrandId == GRIDREPUBLIC_BRAND_ID) {
- logo.load_image_file("gridrepublic_ss_logo.jpg");
- } else if (iBrandId == CHARITYENGINE_BRAND_ID) {
- logo.load_image_file("CE_ss_logo.jpg");
- } else {
- logo.load_image_file("boinc_logo_black.jpg");
- }
+ logo.load_image_file(logo_file);
#endif
init_lights();
}
@@ -502,13 +496,20 @@ int main(int argc, char** argv) {
}
#ifdef __APPLE__
- // For GridRepublic, the installer put a branding file in our data directory
+ long brandId = BOINC_BRAND_ID;
+ // For GridRepublic or CharityEngine, the installer put a branding file in our data directory
FILE *f = fopen("/Library/Application Support/BOINC Data/Branding", "r");
if (f) {
- fscanf(f, "BrandId=%ld\n", &iBrandId);
+ fscanf(f, "BrandId=%ld\n", &brandId);
fclose(f);
+ if (brandId == GRIDREPUBLIC_BRAND_ID) {
+ brand_name = "GridRepublic";
+ logo_file = "gridrepublic_ss_logo.jpg";
+ } else if (brandId == CHARITYENGINE_BRAND_ID) {
+ brand_name = "Charity Engine";
+ logo_file = "CE_ss_logo.jpg";
+ }
}
-#else
#endif
boinc_graphics_loop(argc, argv, "BOINC screensaver");
diff --git a/configure.ac b/configure.ac
index abf41a5..6b8b5b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,12 +1,12 @@
dnl -*- autoconf -*-
-dnl $Id: configure.ac 24582 2011-11-11 17:39:59Z romw $
+dnl $Id: configure.ac 24706 2011-12-01 16:06:33Z romw $
dnl not sure exactly what the minimum version is (but 2.13 wont work)
AC_PREREQ(2.58)
dnl Set the BOINC version here. You can also use the set-version script.
-AC_INIT(BOINC, 6.13.12)
+AC_INIT(BOINC, 7.0.2)
AC_CONFIG_MACRO_DIR([m4])
LIBBOINC_VERSION=`echo ${PACKAGE_VERSION} | sed 's/\./:/g'`
AC_SUBST([LIBBOINC_VERSION])
@@ -19,8 +19,8 @@ AM_INIT_AUTOMAKE(dist-zip)
AC_CONFIG_SRCDIR(lib/shmem.cpp)
-AC_REVISION([$Revision: 24582 $])
-REV=`echo '$Revision: 24582 $' | awk "{print $2}"`
+AC_REVISION([$Revision: 24706 $])
+REV=`echo '$Revision: 24706 $' | awk "{print $2}"`
RDATE=`date '+%Y.%m.%d'`
if test -d .svn ; then
REV=`svn info | grep Revision | awk '{print $2}'`
diff --git a/doc/sim/sim_web.php b/doc/sim/sim_web.php
index 56d18c8..73d184f 100644
--- a/doc/sim/sim_web.php
+++ b/doc/sim/sim_web.php
@@ -25,6 +25,9 @@
require_once("../inc/util.inc");
require_once("../inc/sim_util.inc");
+ini_set ("memory_limit", "1G");
+set_time_limit(0);
+
function get_comments($dir) {
$d = "$dir/comments";
if (!is_dir($d)) return null;
diff --git a/doc/versions.inc b/doc/versions.inc
index b6cb348..e10d76f 100644
--- a/doc/versions.inc
+++ b/doc/versions.inc
@@ -58,10 +58,10 @@ function type_text($type) {
}
$w613 = array(
- "num"=>"6.13.10",
+ "num"=>"6.13.12",
"status"=>"Development version",
- "file"=>"boinc_6.13.10_windows_intelx86.exe",
- "date"=>"27 Oct 2011",
+ "file"=>"boinc_6.13.12_windows_intelx86.exe",
+ "date"=>"14 Nov 2011",
"type"=>"win_new",
);
@@ -98,10 +98,10 @@ $w5816 = array(
);
$w613x64 = array(
- "num"=>"6.13.10",
+ "num"=>"6.13.12",
"status"=>"Development version",
- "file"=>"boinc_6.13.10_windows_x86_64.exe",
- "date"=>"27 Sept 2011",
+ "file"=>"boinc_6.13.12_windows_x86_64.exe",
+ "date"=>"14 Nov 2011",
"type"=>"win_new",
);
@@ -122,10 +122,10 @@ $w610x64 = array(
);
$m613 = array(
- "num"=>"6.13.10",
+ "num"=>"6.13.12",
"status"=>"Development version (standard GUI)",
- "file"=>"boinc_6.13.10_macOSX_i686.zip",
- "date"=>"28 Oct 2011",
+ "file"=>"boinc_6.13.12_macOSX_i686.zip",
+ "date"=>"14 Nov 2011",
"type"=>"mac_advanced",
);
@@ -154,10 +154,10 @@ $m66 = array(
);
$m613c = array(
- "num"=>"6.13.10",
+ "num"=>"6.13.12",
"status"=>"Development version (Unix command-line version)",
- "file"=>"boinc_6.13.10_i686-apple-darwin.zip",
- "date"=>"28 Oct 2011",
+ "file"=>"boinc_6.13.12_i686-apple-darwin.zip",
+ "date"=>"14 Nov 2011",
"type"=>"bare_core",
);
@@ -202,10 +202,10 @@ $l66 = array(
);
$l613ubuntu = array(
- "num"=>"6.13.10",
+ "num"=>"6.13.12",
"status"=>"Development version",
- "file"=>"boinc_6.13.10_i686-pc-linux-gnu.sh",
- "date"=>"28 Oct 2011",
+ "file"=>"boinc_6.13.12_i686-pc-linux-gnu.sh",
+ "date"=>"14 Nov 2011",
"type"=>"sea",
);
@@ -226,10 +226,10 @@ $l610ubuntu = array(
);
$l613ubuntux64 = array(
- "num"=>"6.13.10",
+ "num"=>"6.13.12",
"status"=>"Development version",
- "file"=>"boinc_6.13.10_x86_64-pc-linux-gnu.sh",
- "date"=>"28 Oct 2011",
+ "file"=>"boinc_6.13.12_x86_64-pc-linux-gnu.sh",
+ "date"=>"14 Nov 2011",
"type"=>"sea",
);
diff --git a/html/inc/util.inc b/html/inc/util.inc
index 30a2e0c..32daa47 100644
--- a/html/inc/util.inc
+++ b/html/inc/util.inc
@@ -30,7 +30,7 @@ if (array_key_exists("PATH_INFO", $_SERVER)) {
die("bad URL");
}
-ini_set("memory_limit", "64M");
+ini_set("memory_limit", "256M");
if (!defined('SECURE_URL_BASE')) {
define('SECURE_URL_BASE', URL_BASE);
@@ -850,6 +850,6 @@ function credit_to_gflop_hours($c) {
return $c/(200/24);
}
-$cvs_version_tracker[]="\$Id: util.inc 24512 2011-11-03 05:26:19Z davea $"; //Generated automatically - do not edit
+$cvs_version_tracker[]="\$Id: util.inc 24593 2011-11-14 23:31:12Z davea $"; //Generated automatically - do not edit
?>
diff --git a/lib/cc_config.cpp b/lib/cc_config.cpp
index 6d6e3ab..f4c28dc 100644
--- a/lib/cc_config.cpp
+++ b/lib/cc_config.cpp
@@ -239,28 +239,32 @@ void CONFIG::defaults() {
zero_debts = false;
}
-static bool parse_exclude_gpu(XML_PARSER& xp, EXCLUDE_GPU& eg) {
+int EXCLUDE_GPU::parse(XML_PARSER& xp) {
bool found_url = false;
- eg.type = "";
- eg.appname = "";
- eg.device_num = -1;
+ type = "";
+ appname = "";
+ device_num = -1;
while (!xp.get_tag()) {
if (!xp.is_tag) continue;
if (xp.match_tag("/exclude_gpu")) {
- return found_url;
+ if (!found_url) return ERR_XML_PARSE;
+ return 0;
}
- if (xp.parse_string("url", eg.url)) {
- canonicalize_master_url(eg.url);
+ if (xp.parse_string("url", url)) {
+ canonicalize_master_url(url);
found_url = true;
continue;
}
- if (xp.parse_int("device_num", eg.device_num)) continue;
- if (xp.parse_string("type", eg.type)) continue;
- if (xp.parse_string("app", eg.appname)) continue;
+ if (xp.parse_int("device_num", device_num)) continue;
+ if (xp.parse_string("type", type)) continue;
+ if (xp.parse_string("app", appname)) continue;
}
- return false;
+ return ERR_XML_PARSE;
}
+// This is used by GUI RPC clients, NOT by the BOINC client
+// KEEP IN SYNCH WITH CONFIG::parse_options_client()!!
+//
int CONFIG::parse_options(XML_PARSER& xp) {
string s;
int n, retval;
@@ -302,11 +306,10 @@ int CONFIG::parse_options(XML_PARSER& xp) {
if (xp.match_tag("coproc")) {
COPROC c;
retval = c.parse(xp);
- c.specified_in_config = true;
if (retval) return retval;
+ c.specified_in_config = true;
if (!strcmp(c.type, "CPU")) continue;
- retval = config_coprocs.add(c);
- if (retval) return retval;
+ config_coprocs.add(c);
continue;
}
if (xp.parse_str("data_dir", data_dir, sizeof(data_dir))) {
@@ -317,9 +320,9 @@ int CONFIG::parse_options(XML_PARSER& xp) {
if (xp.parse_bool("dont_contact_ref_site", dont_contact_ref_site)) continue;
if (xp.match_tag("exclude_gpu")) {
EXCLUDE_GPU eg;
- if (parse_exclude_gpu(xp, eg)) {
- exclude_gpus.push_back(eg);
- }
+ retval = eg.parse(xp);
+ if (retval) return retval;
+ exclude_gpus.push_back(eg);
continue;
}
if (xp.parse_string("exclusive_app", s)) {
@@ -375,8 +378,7 @@ int CONFIG::parse_options(XML_PARSER& xp) {
if (xp.parse_bool("os_random_only", os_random_only)) continue;
#ifndef SIM
if (xp.match_tag("proxy_info")) {
- retval = proxy_info.parse_config(xp);
- if (retval) return retval;
+ proxy_info.parse_config(xp);
continue;
}
#endif
diff --git a/lib/cc_config.h b/lib/cc_config.h
index cde1f26..3616594 100644
--- a/lib/cc_config.h
+++ b/lib/cc_config.h
@@ -121,6 +121,8 @@ struct EXCLUDE_GPU {
std::string type; // empty means all types
std::string appname; // empty means all apps
int device_num; // -1 means all instances
+
+ int parse(XML_PARSER&);
};
// if you add anything, you must add it to
@@ -182,10 +184,10 @@ struct CONFIG {
CONFIG();
void defaults();
- int parse(FILE*);
- int parse(XML_PARSER&, LOG_FLAGS&);
+ int parse(FILE*);
+ int parse(XML_PARSER&, LOG_FLAGS&);
int parse_client(FILE*);
- int parse_options(XML_PARSER&);
+ int parse_options(XML_PARSER&);
int parse_options_client(XML_PARSER&);
int write(MIOFILE&, LOG_FLAGS&);
void show();
diff --git a/lib/cl_boinc.h b/lib/cl_boinc.h
index 69eac6f..79d5baa 100644
--- a/lib/cl_boinc.h
+++ b/lib/cl_boinc.h
@@ -3,36 +3,15 @@
#ifndef __CL_BOINC_H
#define __CL_BOINC_H
-#ifdef __APPLE__
- /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */
- #include <AvailabilityMacros.h>
-#endif
-
-#if defined(_WIN32)
-#define CL_API_ENTRY
-#define CL_API_CALL __stdcall
- #define CL_CALLBACK __stdcall
-#else
-#define CL_API_ENTRY
-#define CL_API_CALL
- #define CL_CALLBACK
-#endif
-
-#ifdef __APPLE__
- #define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
- #define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
- #define CL_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
- #define CL_API_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK
- #define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
-#else
- #define CL_EXTENSION_WEAK_LINK
- #define CL_API_SUFFIX__VERSION_1_0
- #define CL_EXT_SUFFIX__VERSION_1_0
- #define CL_API_SUFFIX__VERSION_1_1
- #define CL_EXT_SUFFIX__VERSION_1_1
- #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
-#endif
+#if defined(_WIN32)
+#define CL_API_ENTRY
+#define CL_API_CALL __stdcall
+ #define CL_CALLBACK __stdcall
+#else
+#define CL_API_ENTRY
+#define CL_API_CALL
+ #define CL_CALLBACK
+#endif
#if (defined (_WIN32) && defined(_MSC_VER))
/* scalar types */
@@ -216,34 +195,34 @@ typedef cl_bitfield cl_command_queue_properties;
extern "C" {
#endif
-/* Platform API */
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetPlatformIDs(cl_uint /* num_entries */,
- cl_platform_id * /* platforms */,
- cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetPlatformInfo(cl_platform_id /* platform */,
- cl_platform_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
-/* Device APIs */
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetDeviceIDs(cl_platform_id /* platform */,
- cl_device_type /* device_type */,
- cl_uint /* num_entries */,
- cl_device_id * /* devices */,
- cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0;
-
-extern CL_API_ENTRY cl_int CL_API_CALL
-clGetDeviceInfo(cl_device_id /* device */,
- cl_device_info /* param_name */,
- size_t /* param_value_size */,
- void * /* param_value */,
- size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
-
+/* Platform API */
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetPlatformIDs(cl_uint /* num_entries */,
+ cl_platform_id * /* platforms */,
+ cl_uint * /* num_platforms */);
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetPlatformInfo(cl_platform_id /* platform */,
+ cl_platform_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */);
+
+/* Device APIs */
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetDeviceIDs(cl_platform_id /* platform */,
+ cl_device_type /* device_type */,
+ cl_uint /* num_entries */,
+ cl_device_id * /* devices */,
+ cl_uint * /* num_devices */);
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetDeviceInfo(cl_device_id /* device */,
+ cl_device_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */);
+
#ifdef __cplusplus
}
#endif
diff --git a/lib/gui_rpc_client.cpp b/lib/gui_rpc_client.cpp
index 0b14cee..407995b 100644
--- a/lib/gui_rpc_client.cpp
+++ b/lib/gui_rpc_client.cpp
@@ -127,12 +127,19 @@ int RPC_CLIENT::init(const char* host, int port) {
// set up receive timeout; avoid hang if client doesn't respond
//
+#ifdef _WIN32
+ DWORD dwTime = 30000;
+ if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (char *)&dwTime, sizeof dwTime)) {
+ // not fatal
+ }
+#else
struct timeval tv;
tv.tv_sec = 30;
tv.tv_usec = 0;
if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof tv)) {
// not fatal
}
+#endif
retval = connect(sock, (const sockaddr*)(&addr), addr_len(addr));
if (retval) {
#ifdef _WIN32
diff --git a/lib/parse.cpp b/lib/parse.cpp
index 8c3f8a0..404b520 100644
--- a/lib/parse.cpp
+++ b/lib/parse.cpp
@@ -963,6 +963,29 @@ int XML_PARSER::element_contents(const char* end_tag, char* buf, int buflen) {
return retval;
}
+#if 0
+int XML_PARSER::element_contents(const char* end_tag, string& buf) {
+ int retval=0;
+ while (1) {
+ int c = f->_getc();
+ if (c == EOF) {
+ retval = ERR_XML_PARSE;
+ break;
+ }
+ buf += c;
+ char* p = strstr(buf.c_str(), end_tag);
+ if (p) {
+ int k = strlen(end_tag);
+ int n = buf.length();
+ buf.erase(n-k, k);
+ break;
+ }
+ }
+ strip_whitespace(buf);
+ return retval;
+}
+#endif
+
// We got an unexpected tag.
// If it's an end tag, do nothing.
// Otherwise skip until the end tag, if any
diff --git a/lib/parse.h b/lib/parse.h
index 716c6a2..c7d67ff 100644
--- a/lib/parse.h
+++ b/lib/parse.h
@@ -25,7 +25,6 @@
#include "miofile.h"
#include "str_util.h"
-#include "cl_boinc.h"
// see parse_test.cpp for example usage of XML_PARSER
@@ -60,6 +59,7 @@ public:
bool parse_ulonglong(const char*, unsigned long long&);
bool parse_bool(const char*, bool&);
int element_contents(const char*, char*, int);
+ int element_contents(const char*, std::string&);
int copy_element(std::string&);
void skip_unexpected(const char*, bool verbose, const char*);
void skip_unexpected(bool verbose=false, const char* msg="") {
diff --git a/locale/templates/BOINC-Manager.pot b/locale/templates/BOINC-Manager.pot
index 8975c4e..3c77ab4 100644
--- a/locale/templates/BOINC-Manager.pot
+++ b/locale/templates/BOINC-Manager.pot
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: BOINC Client 6.13.x\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-21 15:38-0500\n"
-"PO-Revision-Date: 2011-10-21 15:39-0500\n"
+"POT-Creation-Date: 2011-11-29 14:18-0500\n"
+"PO-Revision-Date: 2011-11-29 14:19-0500\n"
"Last-Translator: Rom Walton <rwalton at ssl.berkeley.edu>\n"
"Language-Team: BOINC Development Team <boinc_dev at ssl.berkeley.edu>\n"
"MIME-Version: 1.0\n"
@@ -17,7 +17,7 @@ msgstr ""
"X-Poedit-Language: English\n"
"X-Poedit-Country: UNITED STATES\n"
"X-Poedit-SourceCharset: utf-8\n"
-"X-Poedit-Basepath: C:\\Src\\BOINCSVN\\trunk\\boinc\n"
+"X-Poedit-Basepath: C:\\Src\\BOINCSVN\\branches\\boinc_core_release_7_0\n"
"X-Poedit-SearchPath-0: clientgui\n"
"X-Poedit-SearchPath-1: clientgui/msw\n"
"X-Poedit-SearchPath-2: clientgui/gtk\n"
@@ -677,12 +677,12 @@ msgstr ""
msgid "Web sites"
msgstr ""
-#: clientgui/BOINCClientManager.cpp:539
+#: clientgui/BOINCClientManager.cpp:564
#, c-format
msgid "%s - Unexpected Exit"
msgstr ""
-#: clientgui/BOINCClientManager.cpp:549
+#: clientgui/BOINCClientManager.cpp:574
#, c-format
msgid ""
"The %s client has exited unexpectedly 3 times within the last %d minutes.\n"
@@ -733,7 +733,7 @@ msgstr ""
msgid "%s failed to disconnected from the Internet."
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:316
+#: clientgui/BOINCGUIApp.cpp:317
msgid ""
"You currently are not authorized to manage the client.\n"
"\n"
@@ -745,76 +745,80 @@ msgid ""
" user group."
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:319
+#: clientgui/BOINCGUIApp.cpp:320
#, c-format
msgid ""
"BOINC ownership or permissions are not set properly; please reinstall BOINC.\n"
"(Error code %d)"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:361
+#: clientgui/BOINCGUIApp.cpp:362
msgid ""
"A reboot is required in order for BOINC to run properly.\n"
"Please reboot your computer and try again."
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:362
+#: clientgui/BOINCGUIApp.cpp:363
msgid "BOINC Manager"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:503
+#: clientgui/BOINCGUIApp.cpp:504
msgid "BOINC Manager was started by the operating system automatically"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:505
+#: clientgui/BOINCGUIApp.cpp:506
msgid "Startup BOINC so only the system tray icon is visible"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:507
+#: clientgui/BOINCGUIApp.cpp:508
msgid "Directory containing the BOINC Client executable"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:508
+#: clientgui/BOINCGUIApp.cpp:509
msgid "BOINC data directory"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:510
+#: clientgui/BOINCGUIApp.cpp:511
msgid "Host name or IP address"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:511
+#: clientgui/BOINCGUIApp.cpp:512
msgid "GUI RPC port number"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:512
+#: clientgui/BOINCGUIApp.cpp:513
msgid "Password"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:513
+#: clientgui/BOINCGUIApp.cpp:514
msgid "Startup BOINC with these optional arguments"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:514
+#: clientgui/BOINCGUIApp.cpp:515
msgid "disable BOINC security users and permissions"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:515
+#: clientgui/BOINCGUIApp.cpp:516
msgid "set skin debugging mode to enable skin manager error messages"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:516
+#: clientgui/BOINCGUIApp.cpp:517
msgid "multiple instances of BOINC Manager allowed"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:733
+#: clientgui/BOINCGUIApp.cpp:519
+msgid "Not used: workaround for bug in XCode 4.2"
+msgstr ""
+
+#: clientgui/BOINCGUIApp.cpp:737
msgid "(Automatic Detection)"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:734
+#: clientgui/BOINCGUIApp.cpp:738
msgid "(Unknown)"
msgstr ""
-#: clientgui/BOINCGUIApp.cpp:735
+#: clientgui/BOINCGUIApp.cpp:739
msgid "(User Defined)"
msgstr ""
@@ -988,7 +992,6 @@ msgstr ""
#: clientgui/DlgAbout.cpp:201
#: clientgui/DlgExitMessage.cpp:173
#: clientgui/DlgGenericMessage.cpp:120
-#: clientgui/DlgOptions.cpp:382
msgid "&OK"
msgstr ""
@@ -1559,7 +1562,6 @@ msgstr ""
#: clientgui/DlgExitMessage.cpp:178
#: clientgui/DlgGenericMessage.cpp:125
-#: clientgui/DlgOptions.cpp:387
msgid "&Cancel"
msgstr ""
@@ -1572,7 +1574,6 @@ msgid "Properties of project "
msgstr ""
#: clientgui/DlgItemProperties.cpp:200
-#: clientgui/DlgOptions.cpp:204
msgid "General"
msgstr ""
@@ -1877,6 +1878,8 @@ msgstr ""
#: clientgui/DlgOptions.cpp:274
#: clientgui/DlgOptions.cpp:338
+#: clientgui/ProxyPage.cpp:340
+#: clientgui/ProxyPage.cpp:360
msgid "Port:"
msgstr ""
@@ -1892,11 +1895,16 @@ msgstr ""
#: clientgui/DlgOptions.cpp:295
#: clientgui/DlgOptions.cpp:359
+#: clientgui/ProxyPage.cpp:343
+#: clientgui/ProxyPage.cpp:363
msgid "User Name:"
msgstr ""
#: clientgui/DlgOptions.cpp:303
#: clientgui/DlgOptions.cpp:367
+#: clientgui/DlgSelectComputer.cpp:151
+#: clientgui/ProxyPage.cpp:346
+#: clientgui/ProxyPage.cpp:366
msgid "Password:"
msgstr ""
@@ -2166,170 +2174,170 @@ msgstr ""
msgid "Connecting to client"
msgstr ""
-#: clientgui/MainDocument.cpp:1175
+#: clientgui/MainDocument.cpp:1174
msgid "Retrieving system state; please wait..."
msgstr ""
-#: clientgui/MainDocument.cpp:2344
+#: clientgui/MainDocument.cpp:2343
msgid "on batteries"
msgstr ""
-#: clientgui/MainDocument.cpp:2345
+#: clientgui/MainDocument.cpp:2344
msgid "computer is in use"
msgstr ""
-#: clientgui/MainDocument.cpp:2346
+#: clientgui/MainDocument.cpp:2345
msgid "user request"
msgstr ""
-#: clientgui/MainDocument.cpp:2347
+#: clientgui/MainDocument.cpp:2346
msgid "time of day"
msgstr ""
-#: clientgui/MainDocument.cpp:2348
+#: clientgui/MainDocument.cpp:2347
msgid "CPU benchmarks in progress"
msgstr ""
-#: clientgui/MainDocument.cpp:2349
+#: clientgui/MainDocument.cpp:2348
msgid "need disk space - check preferences"
msgstr ""
-#: clientgui/MainDocument.cpp:2350
+#: clientgui/MainDocument.cpp:2349
msgid "computer is not in use"
msgstr ""
-#: clientgui/MainDocument.cpp:2351
+#: clientgui/MainDocument.cpp:2350
msgid "starting up"
msgstr ""
-#: clientgui/MainDocument.cpp:2352
+#: clientgui/MainDocument.cpp:2351
msgid "an exclusive app is running"
msgstr ""
-#: clientgui/MainDocument.cpp:2353
+#: clientgui/MainDocument.cpp:2352
msgid "CPU is busy"
msgstr ""
-#: clientgui/MainDocument.cpp:2354
+#: clientgui/MainDocument.cpp:2353
msgid "network bandwidth limit exceeded"
msgstr ""
-#: clientgui/MainDocument.cpp:2355
+#: clientgui/MainDocument.cpp:2354
msgid "requested by operating system"
msgstr ""
-#: clientgui/MainDocument.cpp:2357
+#: clientgui/MainDocument.cpp:2356
msgid "unknown reason"
msgstr ""
-#: clientgui/MainDocument.cpp:2374
+#: clientgui/MainDocument.cpp:2373
msgid "GPU missing, "
msgstr ""
-#: clientgui/MainDocument.cpp:2381
+#: clientgui/MainDocument.cpp:2380
msgid "New"
msgstr ""
-#: clientgui/MainDocument.cpp:2385
+#: clientgui/MainDocument.cpp:2384
msgid "Download failed"
msgstr ""
-#: clientgui/MainDocument.cpp:2387
+#: clientgui/MainDocument.cpp:2386
msgid "Downloading"
msgstr ""
-#: clientgui/MainDocument.cpp:2389
-#: clientgui/MainDocument.cpp:2444
+#: clientgui/MainDocument.cpp:2388
+#: clientgui/MainDocument.cpp:2443
msgid " (suspended - "
msgstr ""
-#: clientgui/MainDocument.cpp:2391
-#: clientgui/MainDocument.cpp:2446
+#: clientgui/MainDocument.cpp:2390
+#: clientgui/MainDocument.cpp:2445
msgid ")"
msgstr ""
-#: clientgui/MainDocument.cpp:2397
+#: clientgui/MainDocument.cpp:2396
msgid "Project suspended by user"
msgstr ""
-#: clientgui/MainDocument.cpp:2399
+#: clientgui/MainDocument.cpp:2398
msgid "Task suspended by user"
msgstr ""
-#: clientgui/MainDocument.cpp:2401
+#: clientgui/MainDocument.cpp:2400
msgid "Suspended - "
msgstr ""
-#: clientgui/MainDocument.cpp:2408
+#: clientgui/MainDocument.cpp:2407
msgid "Waiting for memory"
msgstr ""
-#: clientgui/MainDocument.cpp:2410
+#: clientgui/MainDocument.cpp:2409
msgid "Waiting for shared memory"
msgstr ""
-#: clientgui/MainDocument.cpp:2413
+#: clientgui/MainDocument.cpp:2412
msgid "Running, high priority"
msgstr ""
-#: clientgui/MainDocument.cpp:2415
+#: clientgui/MainDocument.cpp:2414
msgid "Running"
msgstr ""
-#: clientgui/MainDocument.cpp:2418
+#: clientgui/MainDocument.cpp:2417
msgid " (non-CPU-intensive)"
msgstr ""
-#: clientgui/MainDocument.cpp:2421
+#: clientgui/MainDocument.cpp:2420
msgid "Waiting to run"
msgstr ""
-#: clientgui/MainDocument.cpp:2423
-#: clientgui/MainDocument.cpp:2429
+#: clientgui/MainDocument.cpp:2422
+#: clientgui/MainDocument.cpp:2428
msgid "Ready to start"
msgstr ""
-#: clientgui/MainDocument.cpp:2432
+#: clientgui/MainDocument.cpp:2431
msgid " (Scheduler wait)"
msgstr ""
-#: clientgui/MainDocument.cpp:2436
+#: clientgui/MainDocument.cpp:2435
msgid "Computation error"
msgstr ""
-#: clientgui/MainDocument.cpp:2440
+#: clientgui/MainDocument.cpp:2439
msgid "Upload failed"
msgstr ""
-#: clientgui/MainDocument.cpp:2442
+#: clientgui/MainDocument.cpp:2441
msgid "Uploading"
msgstr ""
-#: clientgui/MainDocument.cpp:2453
+#: clientgui/MainDocument.cpp:2452
msgid "Aborted by user"
msgstr ""
-#: clientgui/MainDocument.cpp:2456
+#: clientgui/MainDocument.cpp:2455
msgid "Aborted by project"
msgstr ""
-#: clientgui/MainDocument.cpp:2459
+#: clientgui/MainDocument.cpp:2458
msgid "Aborted: not started by deadline"
msgstr ""
-#: clientgui/MainDocument.cpp:2462
+#: clientgui/MainDocument.cpp:2461
msgid "Aborted"
msgstr ""
-#: clientgui/MainDocument.cpp:2467
+#: clientgui/MainDocument.cpp:2466
msgid "Acknowledged"
msgstr ""
-#: clientgui/MainDocument.cpp:2469
+#: clientgui/MainDocument.cpp:2468
msgid "Ready to report"
msgstr ""
-#: clientgui/MainDocument.cpp:2471
+#: clientgui/MainDocument.cpp:2470
#, c-format
msgid "Error: invalid state '%d'"
msgstr ""
@@ -2557,7 +2565,6 @@ msgid "SOCKS proxy"
msgstr ""
#: clientgui/sg_BoincSimpleFrame.cpp:134
-#: clientgui/sg_BoincSimpleGUI.cpp:119
msgid "Advanced View...\tCtrl+Shift+A"
msgstr ""
@@ -2574,7 +2581,6 @@ msgid "Select the appearance of the user interface."
msgstr ""
#: clientgui/sg_BoincSimpleFrame.cpp:191
-#: clientgui/sg_BoincSimpleGUI.cpp:147
#, c-format
msgid "&%s"
msgstr ""
@@ -2583,27 +2589,27 @@ msgstr ""
msgid "Default"
msgstr ""
-#: clientgui/sg_BoincSimpleFrame.cpp:705
+#: clientgui/sg_BoincSimpleFrame.cpp:709
msgid "Suspend"
msgstr ""
-#: clientgui/sg_BoincSimpleFrame.cpp:706
+#: clientgui/sg_BoincSimpleFrame.cpp:710
msgid "Resume"
msgstr ""
-#: clientgui/sg_BoincSimpleFrame.cpp:707
+#: clientgui/sg_BoincSimpleFrame.cpp:711
msgid "Suspend Computing"
msgstr ""
-#: clientgui/sg_BoincSimpleFrame.cpp:708
+#: clientgui/sg_BoincSimpleFrame.cpp:712
msgid "Resume Computing"
msgstr ""
-#: clientgui/sg_BoincSimpleFrame.cpp:724
+#: clientgui/sg_BoincSimpleFrame.cpp:728
msgid "Notices"
msgstr ""
-#: clientgui/sg_BoincSimpleFrame.cpp:725
+#: clientgui/sg_BoincSimpleFrame.cpp:729
msgid "Open a window to view notices from projects or BOINC"
msgstr ""
@@ -2612,69 +2618,69 @@ msgid "Display the advanced (accessible) graphical interface."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:288
-#: clientgui/sg_TaskPanel.cpp:885
+#: clientgui/sg_TaskPanel.cpp:990
msgid "Retrieving current status."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:291
-#: clientgui/sg_TaskPanel.cpp:207
+#: clientgui/sg_TaskPanel.cpp:229
msgid "You don't have any projects. Please Add a Project."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:294
-#: clientgui/sg_TaskPanel.cpp:891
+#: clientgui/sg_TaskPanel.cpp:996
msgid "Downloading work from the server."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:299
-#: clientgui/sg_TaskPanel.cpp:896
+#: clientgui/sg_TaskPanel.cpp:1001
msgid "Processing Suspended: Running On Batteries."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:301
-#: clientgui/sg_TaskPanel.cpp:898
+#: clientgui/sg_TaskPanel.cpp:1003
msgid "Processing Suspended: User Active."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:303
-#: clientgui/sg_TaskPanel.cpp:900
+#: clientgui/sg_TaskPanel.cpp:1005
msgid "Processing Suspended: User paused processing."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:305
-#: clientgui/sg_TaskPanel.cpp:902
+#: clientgui/sg_TaskPanel.cpp:1007
msgid "Processing Suspended: Time of Day."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:307
-#: clientgui/sg_TaskPanel.cpp:904
+#: clientgui/sg_TaskPanel.cpp:1009
msgid "Processing Suspended: Benchmarks Running."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:309
-#: clientgui/sg_TaskPanel.cpp:906
+#: clientgui/sg_TaskPanel.cpp:1011
msgid "Processing Suspended."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:313
-#: clientgui/sg_TaskPanel.cpp:910
+#: clientgui/sg_TaskPanel.cpp:1015
msgid "Waiting to contact project servers."
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:317
#: clientgui/sg_ClientStateIndicator.cpp:325
-#: clientgui/sg_TaskPanel.cpp:914
-#: clientgui/sg_TaskPanel.cpp:923
+#: clientgui/sg_TaskPanel.cpp:1019
+#: clientgui/sg_TaskPanel.cpp:1028
msgid "Retrieving current status"
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:320
-#: clientgui/sg_TaskPanel.cpp:918
+#: clientgui/sg_TaskPanel.cpp:1023
msgid "No work available to process"
msgstr ""
#: clientgui/sg_ClientStateIndicator.cpp:322
-#: clientgui/sg_TaskPanel.cpp:920
+#: clientgui/sg_TaskPanel.cpp:1025
msgid "Unable to connect to the core client"
msgstr ""
@@ -2999,47 +3005,47 @@ msgstr ""
msgid "Remove Project"
msgstr ""
-#: clientgui/sg_ProjectPanel.cpp:70
+#: clientgui/sg_ProjectPanel.cpp:72
msgid "Add Project"
msgstr ""
-#: clientgui/sg_ProjectPanel.cpp:71
+#: clientgui/sg_ProjectPanel.cpp:73
msgid "Synchronize"
msgstr ""
-#: clientgui/sg_ProjectPanel.cpp:72
+#: clientgui/sg_ProjectPanel.cpp:74
msgid "Work done for this project"
msgstr ""
-#: clientgui/sg_ProjectPanel.cpp:75
+#: clientgui/sg_ProjectPanel.cpp:77
#: clientgui/sg_ProjectsComponent.cpp:123
msgid "Synchronize projects with account manager system"
msgstr ""
-#: clientgui/sg_ProjectPanel.cpp:123
+#: clientgui/sg_ProjectPanel.cpp:124
msgid "Select a project to access with the controls below"
msgstr ""
-#: clientgui/sg_ProjectPanel.cpp:133
-#: clientgui/sg_ProjectPanel.cpp:252
+#: clientgui/sg_ProjectPanel.cpp:134
+#: clientgui/sg_ProjectPanel.cpp:262
#, c-format
msgid "%s: %.0f"
msgstr ""
-#: clientgui/sg_ProjectPanel.cpp:144
+#: clientgui/sg_ProjectPanel.cpp:145
msgid "Project Web Pages"
msgstr ""
-#: clientgui/sg_ProjectPanel.cpp:148
+#: clientgui/sg_ProjectPanel.cpp:149
msgid "Project Commands"
msgstr ""
-#: clientgui/sg_ProjectPanel.cpp:257
+#: clientgui/sg_ProjectPanel.cpp:267
#, c-format
msgid "Pop up a menu of websites for project %s"
msgstr ""
-#: clientgui/sg_ProjectPanel.cpp:259
+#: clientgui/sg_ProjectPanel.cpp:269
#, c-format
msgid "Pop up a menu of commands to apply to project %s"
msgstr ""
@@ -3075,7 +3081,6 @@ msgid "%s. Work done by %s: %0.2f"
msgstr ""
#: clientgui/sg_TaskCommandPopup.cpp:60
-#: clientgui/sg_ViewTabPage.cpp:424
msgid "Show graphics"
msgstr ""
@@ -3118,63 +3123,63 @@ msgstr ""
msgid "Abort task"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:208
+#: clientgui/sg_TaskPanel.cpp:230
msgid "Not available"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:220
+#: clientgui/sg_TaskPanel.cpp:241
msgid "Tasks:"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:235
+#: clientgui/sg_TaskPanel.cpp:256
msgid "Select a task to access"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:246
+#: clientgui/sg_TaskPanel.cpp:267
msgid "From:"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:298
+#: clientgui/sg_TaskPanel.cpp:321
msgid "This task's progress"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:317
+#: clientgui/sg_TaskPanel.cpp:340
msgid "Task Commands"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:318
+#: clientgui/sg_TaskPanel.cpp:341
msgid "Pop up a menu of commands to apply to this task"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:440
+#: clientgui/sg_TaskPanel.cpp:479
#, c-format
msgid "Application: %s"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:464
+#: clientgui/sg_TaskPanel.cpp:503
#, c-format
-msgid "%d.%d%%"
+msgid "%.3f%%"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:472
+#: clientgui/sg_TaskPanel.cpp:511
msgid "Application: Not available"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:569
+#: clientgui/sg_TaskPanel.cpp:609
msgid "Not Available"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:584
+#: clientgui/sg_TaskPanel.cpp:624
#, c-format
msgid "Elapsed: %s"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:598
+#: clientgui/sg_TaskPanel.cpp:638
#, c-format
msgid "Remaining: %s"
msgstr ""
-#: clientgui/sg_TaskPanel.cpp:613
+#: clientgui/sg_TaskPanel.cpp:653
#, c-format
msgid "Status: %s"
msgstr ""
diff --git a/sched/sched_types.cpp b/sched/sched_types.cpp
index 693bc97..7725ebf 100644
--- a/sched/sched_types.cpp
+++ b/sched/sched_types.cpp
@@ -280,7 +280,7 @@ const char* SCHEDULER_REQUEST::parse(XML_PARSER& xp) {
if (xp.parse_double("duration_correction_factor", host.duration_correction_factor)) continue;
if (xp.match_tag("global_preferences")) {
strcpy(global_prefs_xml, "<global_preferences>\n");
- char buf[8192];
+ char buf[BLOB_SIZE];
retval = xp.element_contents(
"</global_preferences>", buf, sizeof(buf)
);
@@ -412,6 +412,7 @@ const char* SCHEDULER_REQUEST::parse(XML_PARSER& xp) {
if (xp.parse_bool("client_cap_plan_class", client_cap_plan_class)) continue;
if (xp.parse_int("sandbox", sandbox)) continue;
if (xp.parse_int("allow_multiple_clients", allow_multiple_clients)) continue;
+ if (xp.parse_string("client_opaque", client_opaque)) continue;
if (xp.match_tag("active_task_set")) continue;
if (xp.match_tag("app")) continue;
@@ -1384,4 +1385,4 @@ DB_HOST_APP_VERSION* quota_exceeded_version() {
return NULL;
}
-const char *BOINC_RCSID_ea659117b3 = "$Id: sched_types.cpp 24136 2011-09-06 22:53:48Z davea $";
+const char *BOINC_RCSID_ea659117b3 = "$Id: sched_types.cpp 24595 2011-11-15 00:11:12Z davea $";
diff --git a/sched/sched_types.h b/sched/sched_types.h
index d4573c7..ebd227b 100644
--- a/sched/sched_types.h
+++ b/sched/sched_types.h
@@ -328,6 +328,7 @@ struct SCHEDULER_REQUEST {
// Don't modify user prefs or CPID
int last_rpc_dayofyear;
int current_rpc_dayofyear;
+ std::string client_opaque;
SCHEDULER_REQUEST(){};
~SCHEDULER_REQUEST(){};
diff --git a/ssim/ssim.cpp b/ssim/ssim.cpp
index 315ae12..7f6a4da 100644
--- a/ssim/ssim.cpp
+++ b/ssim/ssim.cpp
@@ -67,6 +67,8 @@ struct REPORT_STATS : public EVENT {
// a packet is associated with at most one host
//
struct PACKET {
+ DFILE* dfile;
+ META_PACKET* meta_packet;
enum {DOWNLOADING, PRESENT, UPLOADING} state;
HOST* host;
bool present; // present on server
@@ -74,11 +76,38 @@ struct PACKET {
// transfer has finished
//
}
+
+ void assign() {
+ set<HOST*>::iterator i = dfile.unused_hosts.front();
+ HOST* h = *i;
+ dfile.unused_hosts.erase(i);
+ double t = now + 1/h->bw_down;
+ }
+
+ // This packet has been lost.
+ // If it's present on server, assign it to a host.
+ // Otherwise reassemble the meta-packet
+ //
+ void lost() {
+ if (present_on_server) {
+ assign();
+ } else {
+ meta_packet->reassemble();
+ }
+ }
};
struct META_PACKET {
vector<PACKET*> packets;
int npackets_present;
+
+ // we need to reassemble this meta-packet on the server
+ //
+ void reassemble() {
+ }
+
+ void reassembly_complete() {
+ }
};
struct DFILE : EVENT {
diff --git a/version.h b/version.h
index 5c7e5a1..9ae38e9 100644
--- a/version.h
+++ b/version.h
@@ -4,16 +4,16 @@
#define BOINC_VERSION_H
/* Major part of BOINC version number */
-#define BOINC_MAJOR_VERSION 6
+#define BOINC_MAJOR_VERSION 7
/* Minor part of BOINC version number */
-#define BOINC_MINOR_VERSION 13
+#define BOINC_MINOR_VERSION 0
/* Release part of BOINC version number */
-#define BOINC_RELEASE 12
+#define BOINC_RELEASE 2
/* String representation of BOINC version number */
-#define BOINC_VERSION_STRING "6.13.12"
+#define BOINC_VERSION_STRING "7.0.2"
/* Package is a pre-release (Alpha/Beta) package */
#define BOINC_PRERELEASE 1
@@ -29,13 +29,13 @@
#define PACKAGE_NAME "BOINC"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "BOINC 6.13.12"
+#define PACKAGE_STRING "BOINC 7.0.2"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "boinc"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "6.13.12"
+#define PACKAGE_VERSION "7.0.2"
#endif /* #if (defined(_WIN32) || defined(__APPLE__)) */
--
BOINC packaging
More information about the pkg-boinc-commits
mailing list