Changeset 7686
- Timestamp:
- Jan 12, 2009, 7:30:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/details.c
r7658 r7686 12 12 13 13 #include <errno.h> 14 #include <math.h> /* ceil() */ 14 15 #include <stddef.h> 15 16 #include <stdio.h> … … 1011 1012 char buf[128]; 1012 1013 const tr_stat * stat = tr_torrent_stat( a->gtor ); 1014 const tr_info * info = tr_torrent_info( a->gtor ); 1013 1015 const double complete = stat->percentComplete * 100.0; 1014 1016 const double done = stat->percentDone * 100.0; 1017 const double verifiedPieceCount = (double)stat->haveValid / info->pieceSize; 1015 1018 1016 1019 pch = tr_torrent_status_str( a->gtor ); … … 1035 1038 sizeof( sizeStr2 ) ); 1036 1039 /* %1$s is total size of what we've saved to disk 1037 %2$s is how much of it's passed the checksum test */ 1038 g_snprintf( buf, sizeof( buf ), _( 1039 "%1$s (%2$s verified)" ), sizeStr, sizeStr2 ); 1040 %2$s is how much of it's passed the checksum test 1041 %3$s is how many pieces are verified */ 1042 g_snprintf( buf, sizeof( buf ), _( "%1$s (%2$s verified in %3$d pieces)" ), 1043 sizeStr, sizeStr2, (int)ceil(verifiedPieceCount) ); 1040 1044 gtk_label_set_text( GTK_LABEL( a->have_lb ), buf ); 1041 1045
Note: See TracChangeset
for help on using the changeset viewer.