SOURCES: rtorrent-colors.patch - updated for 0.4.0

charles charles at pld-linux.org
Tue Nov 22 03:38:28 CET 2005


Author: charles                      Date: Tue Nov 22 02:38:28 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated for 0.4.0

---- Files affected:
SOURCES:
   rtorrent-colors.patch (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SOURCES/rtorrent-colors.patch
diff -u SOURCES/rtorrent-colors.patch:1.7 SOURCES/rtorrent-colors.patch:1.8
--- SOURCES/rtorrent-colors.patch:1.7	Sat Sep  3 01:24:27 2005
+++ SOURCES/rtorrent-colors.patch	Tue Nov 22 03:38:22 2005
@@ -9,9 +9,9 @@
  }
  
  void
---- rtorrent-0.3.3/src/display/utils.cc.orig	2005-08-28 00:40:48.000000000 +0200
-+++ rtorrent-0.3.3/src/display/utils.cc	2005-09-03 01:03:51.000000000 +0200
-@@ -55,7 +55,7 @@
+--- rtorrent-0.4.0/src/display/utils.cc.orig	2005-11-15 18:42:39.000000000 +0100
++++ rtorrent-0.4.0/src/display/utils.cc	2005-11-22 02:45:01.000000000 +0100
+@@ -90,7 +90,7 @@
  }
  
  char*
@@ -20,16 +20,16 @@
    char* last = buf + length;
  
    buf += std::max(0, snprintf(buf, last - buf, "Torrent: "));
-@@ -70,10 +70,10 @@
- 				(double)d->get_download().get_bytes_done() / (double)(1 << 20),
- 				(double)d->get_download().get_bytes_total() / (double)(1 << 20)));
+@@ -105,10 +105,10 @@
+ 				(double)d->get_download().bytes_done() / (double)(1 << 20),
+ 				(double)d->get_download().bytes_total() / (double)(1 << 20)));
    
 -  buf += std::max(0, snprintf(buf, last - buf, " Rate: %5.1f / %5.1f KB Uploaded: %.1f MB",
 +  buf += std::max(0, snprintf(buf, last - buf, " Rate: %5.1f / %5.1f KB Uploaded: %6.1f MB Ratio: %5.2f",
- 			      (double)d->get_download().get_up_rate().rate() / (1 << 10),
- 			      (double)d->get_download().get_down_rate().rate() / (1 << 10),
--			      (double)d->get_download().get_up_rate().total() / (1 << 20)));
-+			      (double)d->get_download().get_up_rate().total() / (1 << 20), ratio));
+ 			      (double)d->get_download().up_rate()->rate() / (1 << 10),
+ 			      (double)d->get_download().down_rate()->rate() / (1 << 10),
+-			      (double)d->get_download().up_rate()->total() / (1 << 20)));
++			      (double)d->get_download().up_rate()->total() / (1 << 20), ratio));
  
    return buf;
  }
@@ -45,9 +45,8 @@
  char*       print_download_status(char* buf, unsigned int length, core::Download* d);
  
  std::string print_hhmmss(utils::Timer t);
-diff -U 3 -H -d -r -N -- rtorrent-0.3.0.orig/src/display/window_download_list.cc rtorrent-0.3.0/src/display/window_download_list.cc
---- rtorrent-0.3.0.orig/src/display/window_download_list.cc	2005-07-13 14:04:39.000000000 +0200
-+++ rtorrent-0.3.0/src/display/window_download_list.cc	2005-07-29 19:51:23.000000000 +0200
+--- rtorrent-0.4.0/src/display/window_download_list.cc.orig	2005-11-22 03:24:28.000000000 +0100
++++ rtorrent-0.4.0/src/display/window_download_list.cc	2005-11-22 03:25:22.000000000 +0100
 @@ -36,6 +36,8 @@
  
  #include "config.h"
@@ -74,8 +73,8 @@
 +    double ratio = 0;
 +    core::Download* d = *range.first;
 +
-+    if (d->get_download().get_bytes_done())
-+      ratio = (double)d->get_download().get_up_rate().total() / (double)d->get_download().get_bytes_done();
++    if (d->get_download().bytes_done())
++      ratio = (double)d->get_download().up_rate()->total() / (double)d->get_download().bytes_done();
 +
 +    if (ratio >= 1.0)
 +      col = 1;
@@ -101,8 +100,8 @@
 +    if (col > 0)
 +      m_canvas->set_attr(80, pos, 5, 0, col);
 +
-+    if (d->get_download().get_bytes_total() > 0) {
-+      double per = (double)d->get_download().get_bytes_done() / (double)d->get_download().get_bytes_total();
++    if (d->get_download().bytes_total() > 0) {
++      double per = (double)d->get_download().bytes_done() / (double)d->get_download().bytes_total();
 +      if (per >= 1.0)
 +        col = 1;
 +      else if (per >= 0.5)
@@ -137,9 +136,8 @@
  namespace display {
  
  class WindowDownloadList : public Window {
-diff -U 3 -H -d -r -N -- rtorrent-0.3.0.orig/src/display/window_download_statusbar.cc rtorrent-0.3.0/src/display/window_download_statusbar.cc
---- rtorrent-0.3.0.orig/src/display/window_download_statusbar.cc	2005-07-13 14:03:51.000000000 +0200
-+++ rtorrent-0.3.0/src/display/window_download_statusbar.cc	2005-07-29 19:29:40.000000000 +0200
+--- rtorrent-0.4.0/src/display/window_download_statusbar.cc.orig	2005-11-14 15:38:49.000000000 +0100
++++ rtorrent-0.4.0/src/display/window_download_statusbar.cc	2005-11-22 03:20:07.000000000 +0100
 @@ -60,8 +60,13 @@
    char buffer[m_canvas->get_width() - 2];
    char* position;
@@ -148,16 +146,16 @@
 +  core::Download* d = m_download;
  
 -  position = print_download_info(buffer, last - buffer, m_download);
-+   if (d->get_download().get_bytes_done())
-+      ratio = (double)d->get_download().get_up_rate().total() / (double)d->get_download().get_bytes_done();
++   if (d->get_download().bytes_done())
++      ratio = (double)d->get_download().up_rate()->total() / (double)d->get_download().bytes_done();
 +
 +  position = print_download_info(buffer, last - buffer, m_download, ratio);
    m_canvas->print(0, 0, "%s", buffer);
  
- //   if (m_download->get_download().get_chunks_done() != m_download->get_download().get_chunks_total() || !m_download->get_download().is_open())
-@@ -91,6 +96,9 @@
+   m_canvas->print(0, 1, "Peers: %i(%i) Min/Max: %i/%i Uploads: %i U/I: %i/%i",
+@@ -78,6 +83,9 @@
  		  m_download->get_download().is_tracker_busy() ? 'C' : ' ',
- 		  (int)(m_download->get_download().get_tracker_timeout() / 1000000),
+ 		  (int)(m_download->get_download().tracker_timeout() / 1000000),
  		  buffer);
 +  m_canvas->set_attr(0, 0, m_canvas->get_screen_width(), A_REVERSE, 0);
 +  m_canvas->set_attr(0, 1, m_canvas->get_screen_width(), A_REVERSE, 0);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/rtorrent-colors.patch?r1=1.7&r2=1.8&f=u




More information about the pld-cvs-commit mailing list