diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk_event-handler.c')
-rw-r--r-- | src/fs/gnunet-fs-gtk_event-handler.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c index 4017e10f..49483158 100644 --- a/src/fs/gnunet-fs-gtk_event-handler.c +++ b/src/fs/gnunet-fs-gtk_event-handler.c | |||
@@ -1440,9 +1440,9 @@ get_mimetype_from_metadata (const struct GNUNET_CONTAINER_MetaData *meta) | |||
1440 | static void | 1440 | static void |
1441 | update_search_result (struct SearchResult *sr, | 1441 | update_search_result (struct SearchResult *sr, |
1442 | const struct GNUNET_CONTAINER_MetaData *meta, | 1442 | const struct GNUNET_CONTAINER_MetaData *meta, |
1443 | int32_t availability_rank, | 1443 | uint32_t applicability_rank, |
1444 | uint32_t availability_certainty, | 1444 | int32_t availability_rank, |
1445 | uint32_t applicability_rank) | 1445 | uint32_t availability_certainty) |
1446 | { | 1446 | { |
1447 | GtkTreeIter iter; | 1447 | GtkTreeIter iter; |
1448 | struct GNUNET_CONTAINER_MetaData *ometa; | 1448 | struct GNUNET_CONTAINER_MetaData *ometa; |
@@ -1479,11 +1479,9 @@ update_search_result (struct SearchResult *sr, | |||
1479 | if (NULL != ometa) | 1479 | if (NULL != ometa) |
1480 | GNUNET_CONTAINER_meta_data_destroy (ometa); | 1480 | GNUNET_CONTAINER_meta_data_destroy (ometa); |
1481 | if (availability_certainty > 0) | 1481 | if (availability_certainty > 0) |
1482 | percent_avail = | 1482 | percent_avail = 50 + (2 * availability_rank - availability_certainty) * 50 / availability_certainty; |
1483 | (availability_certainty + | ||
1484 | availability_rank) * 50 / availability_certainty; | ||
1485 | else | 1483 | else |
1486 | percent_avail = 0; | 1484 | percent_avail = 50; |
1487 | gtk_tree_store_set (ts, &iter, | 1485 | gtk_tree_store_set (ts, &iter, |
1488 | 0, GNUNET_CONTAINER_meta_data_duplicate (meta), | 1486 | 0, GNUNET_CONTAINER_meta_data_duplicate (meta), |
1489 | 3, pixbuf /* preview */ , | 1487 | 3, pixbuf /* preview */ , |