From 3e0cac55fda544d3967e1c259602fe2e9df86863 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 30 Jun 2007 13:53:10 +0000 Subject: [PATCH] (1) check a torrent's `fast resume' state as soon as it's added. (2) in gtk, show % done even when torrent is stopped --- gtk/torrent-inspector.c | 2 +- gtk/tr_torrent.c | 2 +- libtransmission/torrent.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/torrent-inspector.c b/gtk/torrent-inspector.c index 289ab544f..c8f2e8735 100644 --- a/gtk/torrent-inspector.c +++ b/gtk/torrent-inspector.c @@ -1521,7 +1521,7 @@ torrent_inspector_new ( GtkWindow * parent, TrTorrent * gtor ) char *size, *pch; GtkWidget *d, *n, *w; tr_torrent_t * tor = tr_torrent_handle (gtor); - tr_info_t * info = tr_torrent_info (gtor); + const tr_info_t * info = tr_torrent_info (gtor); /* create the dialog */ pch = g_strdup_printf ("%s: %s", diff --git a/gtk/tr_torrent.c b/gtk/tr_torrent.c index 783a7e146..295c5f163 100644 --- a/gtk/tr_torrent.c +++ b/gtk/tr_torrent.c @@ -648,7 +648,7 @@ tr_torrent_status_str ( TrTorrent * gtor ) break; case TR_STATUS_STOPPED: - top = g_strdup( _("Stopped") ); + top = g_strdup_printf( _("Stopped (%.1f%%)"), prog ); break; default: diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index edbee9243..1b83d95be 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -948,6 +948,8 @@ torrentThreadLoop ( void * _tor ) tr_lockInit( &checkFilesLock ); } + tor->recheckFlag = !tr_ioCheckFiles( tor, TR_RECHECK_FAST ); + /* loop until the torrent is being deleted */ while( ! ( tor->dieFlag && (tor->runStatus == TR_RUN_STOPPED) ) ) {