diff options
author | Alan Fitton <alan@eth0.org.uk> | 2012-07-17 12:56:07 +0100 |
---|---|---|
committer | Alan Fitton <alan@eth0.org.uk> | 2012-07-17 12:56:07 +0100 |
commit | 4baacc7107ef06700db7bba6732e473cffc81760 (patch) | |
tree | 3ac823617f6656f845b5bc7186c23858445a2994 /src/trg-torrent-model.c | |
parent | 9c23ff5acb12ed40ec6631e67e64966c3bdd9665 (diff) |
use G_TYPE_INT64 for seeders/leechers/downloads in the model. this was being saved to a gint64 in the general panel, leading to incorrect numbers displayed.
Diffstat (limited to 'src/trg-torrent-model.c')
-rw-r--r-- | src/trg-torrent-model.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/trg-torrent-model.c b/src/trg-torrent-model.c index bf0ae96..8e8bcc5 100644 --- a/src/trg-torrent-model.c +++ b/src/trg-torrent-model.c @@ -146,9 +146,9 @@ trg_torrent_model_count_peers(TrgTorrentModel * model, { GList *trackersList = json_array_get_elements(torrent_get_tracker_stats(t)); - gint seeders = 0; - gint leechers = 0; - gint downloads = 0; + gint64 seeders = 0; + gint64 leechers = 0; + gint64 downloads = 0; GList *li; for (li = trackersList; li; li = g_list_next(li)) { @@ -202,9 +202,9 @@ static void trg_torrent_model_init(TrgTorrentModel * self) column_types[TORRENT_COLUMN_SIZE] = G_TYPE_INT64; column_types[TORRENT_COLUMN_DONE] = G_TYPE_DOUBLE; column_types[TORRENT_COLUMN_STATUS] = G_TYPE_STRING; - column_types[TORRENT_COLUMN_SEEDS] = G_TYPE_INT; - column_types[TORRENT_COLUMN_LEECHERS] = G_TYPE_INT; - column_types[TORRENT_COLUMN_DOWNLOADS] = G_TYPE_INT; + column_types[TORRENT_COLUMN_SEEDS] = G_TYPE_INT64; + column_types[TORRENT_COLUMN_LEECHERS] = G_TYPE_INT64; + column_types[TORRENT_COLUMN_DOWNLOADS] = G_TYPE_INT64; column_types[TORRENT_COLUMN_DOWNSPEED] = G_TYPE_INT64; column_types[TORRENT_COLUMN_ADDED] = G_TYPE_INT64; column_types[TORRENT_COLUMN_UPSPEED] = G_TYPE_INT64; |