summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'segget/connection.cpp')
-rw-r--r--segget/connection.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/segget/connection.cpp b/segget/connection.cpp
index f628f67..5f5b1d2 100644
--- a/segget/connection.cpp
+++ b/segget/connection.cpp
@@ -308,17 +308,24 @@ string Tconnection::get_html_connection_progress(){
case MODE_CORAL_CDN: network_type_str="CDN"; break;
}
string progress_text=
- (string)"<td>"
- +"<img src=\"/img/blue_progress.jpg\" alt=\"blue_progress\" height=20 width="+toString(distfile_percent)+"/>"
- +"<img src=\"/img/green_progress.jpg\" alt=\"green_progress\" height=20 width="+toString(unfinished_segments_distfile_percent)+"/>"
- +"<img src=\"/img/bw_progress.jpg\" alt=\"bw_progress\" height=20 width="+toString(100-distfile_percent-unfinished_segments_distfile_percent)+" />"
+ (string)"<td align=center><table width=100 border=0 cellpadding=0 frame=void><tr>"
+ +((distfile_percent>0)?"<td bgcolor=\"#0000FF\"><img src=\"/img/blue_progress.jpg\" height=20 width="+toString(distfile_percent)+"/></td>"
+ :"")
+ +((unfinished_segments_distfile_percent>0)?"<td bgcolor=\"#00FF00\"><img src=\"/img/green_progress.jpg\" height=20 width="+toString(unfinished_segments_distfile_percent)+"/></td>"
+ :"")
+ +((100-distfile_percent-unfinished_segments_distfile_percent>0)?"<td bgcolor=\"#555555\"><img src=\"/img/bw_progress.jpg\" height=20 width="+toString(100-distfile_percent-unfinished_segments_distfile_percent)+" /></td>"
+ :"")
+ +"</tr></table>"
// +"&nbsp;"+toString(distfile_percent+unfinished_segments_distfile_percent)+"%"
+"&nbsp;"+toString(distfile_percent)+"%"
+"</td><td>"+segment->parent_distfile->name
- +"</td><td>"
- +"<img src=\"/img/green_progress.jpg\" alt=\"green_progress\" height=20 width="+toString(segment_percent)+"/>"
- +"<img src=\"/img/bw_progress.jpg\" alt=\"bw_progress\" height=20 width="+toString(100-segment_percent)+" />"
- +"&nbsp;"+toString(segment_percent)+"%"
+ +"</td><td align=center><table width=100 border=0 cellpadding=0 frame=void><tr>"
+ +((segment_percent>0)?"<td bgcolor=\"#00FF00\"><img src=\"/img/green_progress.jpg\" height=20 width="+toString(segment_percent)+"/></td>"
+ :"")
+ +((100-segment_percent>0)?"<td bgcolor=\"#555555\"><img src=\"/img/bw_progress.jpg\" height=20 width="+toString(100-segment_percent)+" /></td>"
+ :"")
+ +"</tr></table>"
+ +"&nbsp;"+toString(segment_percent)+"%"
+"</td><td align=right>"+toString(segment->segment_num)
+"</td><td align=right>"+toString(segment->try_num)
+"</td><td align=right>"+toString(network_num)