diff --git a/gtk/torrent-cell-renderer.c b/gtk/torrent-cell-renderer.c index f5430c7ab..7d38d3791 100644 --- a/gtk/torrent-cell-renderer.c +++ b/gtk/torrent-cell-renderer.c @@ -127,8 +127,8 @@ getStatusString( const tr_torrent * tor UNUSED, const tr_stat * torStat ) case TR_STATUS_DOWNLOAD: g_string_append_printf( gstr, - ngettext( _("Downloading from %d of %d peer" ), - _("Downloading from %d of %d peers" ), + ngettext( _("Downloading from %d of %d connected peer" ), + _("Downloading from %d of %d connected peers" ), torStat->peersConnected ), torStat->peersSendingToUs, torStat->peersConnected ); @@ -137,8 +137,8 @@ getStatusString( const tr_torrent * tor UNUSED, const tr_stat * torStat ) case TR_STATUS_DONE: case TR_STATUS_SEED: g_string_append_printf( gstr, - ngettext( _( "Seeding to %d of %d peer" ), - _( "Seeding to %d of %d peers" ), + ngettext( _( "Seeding to %d of %d connected peer" ), + _( "Seeding to %d of %d connected peers" ), torStat->peersGettingFromUs ), torStat->peersGettingFromUs, torStat->peersConnected ); diff --git a/gtk/tr_torrent.c b/gtk/tr_torrent.c index f5b7ea053..3281bff83 100644 --- a/gtk/tr_torrent.c +++ b/gtk/tr_torrent.c @@ -126,17 +126,10 @@ tr_torrent_handle(TrTorrent *tor) return tor->severed ? NULL : tor->handle; } -static tr_stat* -refreshStat( TrTorrent * tor ) -{ -} - const tr_stat * tr_torrent_stat(TrTorrent *tor) { - g_assert( TR_IS_TORRENT(tor) ); - - return tor->severed ? NULL : tr_torrentStat( tor->handle ); + return tor && !tor->severed ? tr_torrentStat( tor->handle ) : NULL; } const tr_info *