Mercurial > pidgin.yaz
comparison src/gtkft.c @ 11994:9dd895fdafdd
[gaim-migrate @ 14287]
SF Patch #1349218 from Richard Gobeille
"This patch changes the string representing transfer
progress in the GTK file transfer window to something a
bit more user friendly."
Basically, it shows a percentage in addition to the byte count.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 06 Nov 2005 23:01:56 +0000 |
parents | ad62cd866435 |
children | 56bfd35a5a48 |
comparison
equal
deleted
inserted
replaced
11993:aa77da6c7f21 | 11994:9dd895fdafdd |
---|---|
192 | 192 |
193 data = GAIM_GTKXFER(xfer); | 193 data = GAIM_GTKXFER(xfer); |
194 | 194 |
195 get_xfer_info_strings(xfer, &kbsec, &time_elapsed, &time_remaining); | 195 get_xfer_info_strings(xfer, &kbsec, &time_elapsed, &time_remaining); |
196 | 196 |
197 status = g_strdup_printf("%ld of %ld", | 197 status = g_strdup_printf("%ld%% (%ld of %ld bytes)", |
198 (unsigned long)(gaim_xfer_get_progress(xfer)*100), | |
198 (unsigned long)gaim_xfer_get_bytes_sent(xfer), | 199 (unsigned long)gaim_xfer_get_bytes_sent(xfer), |
199 (unsigned long)gaim_xfer_get_size(xfer)); | 200 (unsigned long)gaim_xfer_get_size(xfer)); |
200 | 201 |
201 if (gaim_xfer_get_size(xfer) >= 0 && | 202 if (gaim_xfer_get_size(xfer) >= 0 && |
202 gaim_xfer_is_completed(xfer)) { | 203 gaim_xfer_is_completed(xfer)) { |