diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-03-05 00:36:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-03-05 00:36:22 +0000 |
commit | 460b3ca16d05a8529579fa2b30a1fc4e91da6509 (patch) | |
tree | 87518a3af60b514ffb2172e58ffc8bd266e34630 /src/fs/gnunet-fs-gtk_event-handler.c | |
parent | d0e22a6ee4d161fa73ef02ca2d91763acfd0d5c1 (diff) | |
download | gnunet-gtk-460b3ca16d05a8529579fa2b30a1fc4e91da6509.tar.gz gnunet-gtk-460b3ca16d05a8529579fa2b30a1fc4e91da6509.zip |
-fixing various bugs, including signal handler signatures, also finally enabling probes #2150
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 */ , |