From 4baacc7107ef06700db7bba6732e473cffc81760 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Tue, 17 Jul 2012 12:56:07 +0100 Subject: 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. --- src/trg-torrent-model.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/trg-torrent-model.c') 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; -- cgit v1.2.3