Merge branch 'master' into improve_uotd

This commit is contained in:
Christian Beer 2015-12-14 11:17:02 +01:00
commit 9b8c291a87
14 changed files with 85 additions and 47 deletions

View File

@ -939,9 +939,11 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
std::vector<bool>is_alive;
bool needRefresh = false;
wxString resname;
CC_STATUS status;
CMainDocument* pDoc = wxGetApp().GetDocument();
CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple();
wxASSERT(pDoc);
static bool bAlreadyRunning = false;
wxASSERT(pDoc);
@ -1088,16 +1090,23 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) {
}
}
pDoc->GetCoreClientStatus(status);
count = m_TaskSelectionCtrl->GetCount();
for(j = 0; j < count; ++j) {
selData = (TaskSelectionData*)m_TaskSelectionCtrl->GetClientData(j);
ctrlResult = selData->result;
if (isRunning(ctrlResult)) {
newIcon = runningIcon;
} else if (ctrlResult->scheduler_state == CPU_SCHED_PREEMPTED) {
newIcon = waitingIcon;
} else {
} else if (Suspended() ||
ctrlResult->suspended_via_gui ||
ctrlResult->project_suspended_via_gui ||
// kludge. But ctrlResult->avp isn't populated.
(status.gpu_suspend_reason && (strstr(ctrlResult->resources, "GPU") != NULL)))
{
newIcon = suspendedIcon;
} else {
newIcon = waitingIcon;
}
if (reskin || (newIcon != selData->dotColor)) {
@ -1176,7 +1185,7 @@ bool CSimpleTaskPanel::Suspended() {
bool result = false;
pDoc->GetCoreClientStatus(status);
if ( pDoc->IsConnected() && status.task_suspend_reason > 0 && status.task_suspend_reason != SUSPEND_REASON_DISK_SIZE && status.task_suspend_reason != SUSPEND_REASON_CPU_THROTTLE ) {
if ( pDoc->IsConnected() && status.task_suspend_reason > 0 && status.task_suspend_reason != SUSPEND_REASON_CPU_THROTTLE ) {
result = true;
}
return result;
@ -1224,6 +1233,8 @@ void CSimpleTaskPanel::DisplayIdleState() {
UpdateStaticText(&m_StatusValueText, _("Processing Suspended: Time of Day."));
} else if ( status.task_suspend_reason & SUSPEND_REASON_BENCHMARKS ) {
UpdateStaticText(&m_StatusValueText, _("Processing Suspended: Benchmarks Running."));
} else if ( status.task_suspend_reason & SUSPEND_REASON_DISK_SIZE ) {
UpdateStaticText(&m_StatusValueText, _("Processing Suspended: need disk space."));
} else {
UpdateStaticText(&m_StatusValueText, _("Processing Suspended."));
}

View File

@ -2019,6 +2019,8 @@ function boincimport_topics_op($offset, $batch_size, $pre = '', &$context) {
while ($topic = db_fetch_object($topics)) {
$error_detail = '';
db_set_active('boinc');
// Get the content of the post that started the topic
@ -2095,18 +2097,30 @@ function boincimport_topics_op($offset, $batch_size, $pre = '', &$context) {
node_save($node);
taxonomy_node_save($node, array($tid));
$success = ($node->nid) ? TRUE : FALSE;
if ($success) {
$success = db_query('
INSERT INTO {boincimport_temp_topic} (topic_id, post_id, nid)
VALUES (%d, %d, %d)', $topic->id, $post->id, $node->nid
);
if ($success) {
// Hack to keep the topics in correct order
$success = db_query('UPDATE {node_comment_statistics} SET last_comment_timestamp = %d WHERE nid = %d', $node->created, $node->nid);
if (!$success) {
$error_detail = 'topic imported, but failed to set last comment timestamp';
}
}
else {
$error_detail = 'topic node saved, but failed to link in boincimport_temp_topic table';
}
}
else {
$error_detail = 'failed to save topic node to database';
}
}
// See if the import worked
$message = '';
if ($success) {
db_query('
INSERT INTO {boincimport_temp_topic} (topic_id, post_id, nid)
VALUES (%d, %d, %d)', $topic->id, $post->id, $node->nid
);
// Hack to keep the topics in correct order
db_query('UPDATE {node_comment_statistics} SET last_comment_timestamp = %d WHERE nid = %d', $node->created, $node->nid);
// Store some result for post-processing in the finished callback.
$context['results']['success'][] = $topic->id;
$message = "Successfully imported topic {$topic->id}";
@ -2123,8 +2137,12 @@ function boincimport_topics_op($offset, $batch_size, $pre = '', &$context) {
$context['results']['failure'][] = $topic->id;
$message = "Failed to import topic {$topic->id}!";
watchdog('boincimport',
'Failed to import topic @id!',
array('@id' => $topic->id), WATCHDOG_WARNING
'Failed to import topic @id! (@error)',
array(
'@id' => $topic->id,
'@error' => $error_detail,
),
WATCHDOG_WARNING
);
}
@ -2269,9 +2287,13 @@ function boincimport_forum_posts() {
'finished' => 'boincimport_posts_finished',
'title' => t('Importing posts'),
'init_message' => t('Beginning post import...'),
'progress_message' => t('Processed posts in @current out of @total batches (@size topics per batch).', array(
'@size' => $batch_size,
)),
'progress_message' => t(
'Processed posts in @current out of @total batches (@size topics per batch).',
array(
'@size' => $batch_size,
// @current and @total are managed by the batch API
)
),
'error_message' => t('Post import has encountered an error.'),
);
@ -2294,12 +2316,13 @@ function boincimport_posts_op($offset, $batch_size, &$context) {
// Get the topics with posts to import
db_set_active('boinc');
$boinc_topic_ids = db_query('
SELECT t.id FROM %sthread t
SELECT DISTINCT t.id FROM %sthread t
JOIN %sforum f ON f.id = t.forum
JOIN %spost p ON p.thread = t.id
WHERE f.parent_type = 0
ORDER BY t.id
LIMIT %d,%d',
$pre, $pre, $offset, $batch_size
$pre, $pre, $pre, $offset, $batch_size
);
db_set_active('default');
@ -2308,20 +2331,15 @@ function boincimport_posts_op($offset, $batch_size, &$context) {
db_set_active('boinc');
$boinc_posts = db_query('
SELECT id, user, thread, timestamp, content, parent_post, hidden
FROM %spost WHERE thread = %d ORDER BY timestamp ASC', $pre, $boinc_topic->id);
FROM %spost WHERE thread = %d ORDER BY id ASC', $pre, $boinc_topic->id);
db_set_active('default');
$first_post = true;
$success = FALSE;
$invalid = FALSE;
$posts_imported = 0;
$empty_posts = 0;
$error_posts = 0;
$duplicate_posts = 0;
if (!mysql_num_rows($boinc_posts)) {
$invalid = TRUE;
}
while ($post = db_fetch_object($boinc_posts)) {
@ -2439,13 +2457,6 @@ function boincimport_posts_op($offset, $batch_size, &$context) {
$context['results']['success'][] = $boinc_topic->id;
$message = "Imported {$posts_imported} post(s) for topic {$boinc_topic->id}";
}
elseif ($invalid) {
$context['results']['invalid'][] = $boinc_topic->id;
$message = "Topic {$boinc_topic->id} has no content at all, so is invalid";
watchdog('boincimport', $message,
array(), WATCHDOG_WARNING
);
}
else {
$context['results']['failure'][] = $boinc_topic->id;
$message = "Imported {$posts_imported} post(s) for topic {$boinc_topic->id} (excluded {$error_posts} errors, {$duplicate_posts} duplicates, and {$empty_posts} empty)";
@ -2484,13 +2495,12 @@ function boincimport_posts_finished($success, $results, $operations) {
$posts_imported = count($results['posts']['success']);
$topic_count = count($results['success']);
$topics_skipped = count($results['failure']);
$topics_invalid = count($results['invalid']);
$duplicates = count($results['posts']['duplicate']);
$empty_posts = count($results['posts']['empty']);
$failed_posts = count($results['posts']['failure']);
$message = t(
'Successfully imported @post_count posts in @topic_count topics ' .
'(@skipped topics either had no replies or all replies were already imported, @invalid_topics had no content at all and were invalid; ' .
'(@skipped topics either had no replies or all replies were already imported, ' .
'@duplicates posts were skipped as already imported, ' .
'@empty_posts had no content, ' .
'and @error_posts encountered errors during import)',
@ -2498,7 +2508,6 @@ function boincimport_posts_finished($success, $results, $operations) {
'@post_count' => $posts_imported,
'@topic_count' => $topic_count,
'@skipped' => $topics_skipped,
'@invalid_topics' => $topics_invalid,
'@duplicates' => $duplicates,
'@empty_posts' => $empty_posts,
'@error_posts' => $failed_posts,

View File

@ -714,6 +714,7 @@ function show_app_version($app_version) {
row("Application", "<a href=\"db_action.php?table=app&id=$app_version->appid\">" . app_name_by_id($app_version->appid) . "</a>");
row("Version num", $app_version->version_num);
row("Platform", "<a href=\"db_action.php?table=platform&id=$app_version->platformid\">" . platform_name_by_id($app_version->platformid) . "</a>" );
row("Plan Class", $app_version->plan_class);
row("XML doc", "<pre>".htmlspecialchars($app_version->xml_doc)."</pre>");
row("min_core_version", $app_version->min_core_version);
row("max_core_version", $app_version->max_core_version);
@ -729,6 +730,7 @@ function app_version_short_header() {
<th>Application</th>
<th>Version</th>
<th>Platform</th>
<th>Plan Class</th>
</tr>
";
}
@ -742,6 +744,7 @@ function show_app_version_short($app_version) {
<td><a href=\"db_action.php?table=app&id=$app_version->appid\">$x</a></td>
<td>$app_version->version_num</td>
<td><a href=\"db_action.php?table=platform&id=$app_version->platformid\">$y</a></td>
<td>$app_version->plan_class</td>
</tr>
";
}
@ -1100,7 +1103,7 @@ function show_result_short($result) {
$received = "<font color=\"#ff3333\">". time_str($result->report_deadline) . "</font>";
}
}
$version = app_version_string($result);
$version = app_version_string($result)." (<a href=\"db_action.php?table=app_version&id=$result->app_version_id\">$result->app_version_id</a>)";
$outcome_color = outcome_color($result->outcome);
$validate_color = validate_color($result->validate_state);
$host_user = host_user_link($result->hostid);
@ -1134,6 +1137,7 @@ function show_user($user) {
row("Name", $user->name);
row("Authenticator", $user->authenticator);
row("Email address", $user->email_addr);
row("OK to send Email?", $user->send_email);
row("Country", $user->country);
row("Postal code", $user->postal_code);
row("Total credit", $user->total_credit);

View File

@ -146,4 +146,17 @@ function is_gpu($plan_class) {
return false;
}
// the same as file_get_contents() but uses curl
//
function url_get_contents($url) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 5);
$content = curl_exec($ch);
curl_close($ch);
return $content;
}
?>

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: BOINC\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-10-15 22:25-0700\n"
"PO-Revision-Date: 2015-11-13 09:00+0000\n"
"PO-Revision-Date: 2015-12-09 12:59+0000\n"
"Last-Translator: Sebastiano Pistore <olatusrooc@virgilio.it>\n"
"Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n"
"MIME-Version: 1.0\n"

View File

@ -5,11 +5,12 @@
# Alessandro Caiulo <alessandro.caiulo@gmail.com>, 2015
# Gianfranco Costamagna <costamagnagianfranco@yahoo.it>, 2015
# Pietro <bongiovanni.pietro.vc@gmail.com>, 2015
# Sebastiano Pistore <olatusrooc@virgilio.it>, 2015
msgid ""
msgstr ""
"Project-Id-Version: BOINC\n"
"POT-Creation-Date: 2015-08-14 09:37+0000\n"
"PO-Revision-Date: 2015-11-17 11:11+0000\n"
"PO-Revision-Date: 2015-12-09 12:39+0000\n"
"Last-Translator: Sebastiano Pistore <olatusrooc@virgilio.it>\n"
"Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n"
"MIME-Version: 1.0\n"
@ -64,10 +65,10 @@ msgid "You are banned from community participation until @date"
msgstr "Sei stato bannato dalla community fino al @date"
msgid "Computers @old_ids have been merged successfully into @id."
msgstr "I computer @old_ids sono stati fusi con successo in @id."
msgstr "I @old_ids dei computer sono stati uniti con successo in @id."
msgid "A team named \"@name\" already exists."
msgstr "Un'altra squadra denominata \"@name\" già esiste."
msgstr "Un team di nome \"@name\" esiste già."
msgid "Post topic"
msgstr "Argomento del post"
@ -82,10 +83,10 @@ msgid "Make founder"
msgstr "Rendi fondatore"
msgid "!site: comment posted to \"!topic_name\""
msgstr "!site: commento inserito su \"!topic_name\""
msgstr "!site: commento postato in \"!topic_name\""
msgid "!author has posted a reply to \"!topic_name\"."
msgstr "!author ha postato una risposta su \"!topic_name\"."
msgstr "!author ha postato una risposta in \"!topic_name\"."
msgid ""
"To view this topic at !site, click here: \n"
@ -593,7 +594,7 @@ msgid "Enforced by version @number"
msgstr "Disponibile dalla versione @number"
msgid "\"In use\" means mouse/keyboard activity in last"
msgstr "\"In uso\" significa attività mouse/tastiera negli ultimi"
msgstr "\"In uso\" significa che c'è stata attività del mouse/tastiera negli ultimi"
msgid "minutes"
msgstr "minuti"

Binary file not shown.

View File

@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: BOINC\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-16 17:27-0500\n"
"PO-Revision-Date: 2015-12-04 11:26+0000\n"
"PO-Revision-Date: 2015-12-09 12:39+0000\n"
"Last-Translator: Sebastiano Pistore <olatusrooc@virgilio.it>\n"
"Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n"
"MIME-Version: 1.0\n"

View File

@ -14,7 +14,7 @@ msgstr ""
"Project-Id-Version: BOINC\n"
"Report-Msgid-Bugs-To: BOINC translation team <boinc_loc@boinc.berkeley.edu>\n"
"POT-Creation-Date: 2015-06-24 13:05 PDT\n"
"PO-Revision-Date: 2015-12-04 11:06+0000\n"
"PO-Revision-Date: 2015-12-09 12:58+0000\n"
"Last-Translator: Sebastiano Pistore <olatusrooc@virgilio.it>\n"
"Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n"
"MIME-Version: 1.0\n"

Binary file not shown.

View File

@ -13,7 +13,7 @@ msgstr ""
"Project-Id-Version: BOINC\n"
"Report-Msgid-Bugs-To: BOINC translation team <boinc_loc@ssl.berkeley.edu>\n"
"POT-Creation-Date: 2015-07-09 18:59 PDT\n"
"PO-Revision-Date: 2015-12-04 11:23+0000\n"
"PO-Revision-Date: 2015-12-09 12:56+0000\n"
"Last-Translator: Sebastiano Pistore <olatusrooc@virgilio.it>\n"
"Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n"
"MIME-Version: 1.0\n"
@ -743,7 +743,7 @@ msgstr "Accademia cinese delle scienze"
#: projects.inc:458
msgid "Physics, biochemistry, and others"
msgstr "Fisica, biochimica, ed altre"
msgstr "Fisica, biochimica, ed altro"
#: projects.inc:459
msgid ""

Binary file not shown.

Binary file not shown.

Binary file not shown.