aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo/gnunet-peerinfo-gtk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peerinfo/gnunet-peerinfo-gtk.c')
-rw-r--r--src/peerinfo/gnunet-peerinfo-gtk.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/peerinfo/gnunet-peerinfo-gtk.c b/src/peerinfo/gnunet-peerinfo-gtk.c
index d4fd1db0..eb068aa0 100644
--- a/src/peerinfo/gnunet-peerinfo-gtk.c
+++ b/src/peerinfo/gnunet-peerinfo-gtk.c
@@ -36,7 +36,7 @@
36enum PEERINFO_ModelColumns 36enum PEERINFO_ModelColumns
37 { 37 {
38 /** 38 /**
39 * A gchararray 39 * A gchararray
40 */ 40 */
41 PEERINFO_MC_PEER_IDENTITY_STRING = 0, 41 PEERINFO_MC_PEER_IDENTITY_STRING = 0,
42 42
@@ -258,11 +258,11 @@ peer_address_string_cb (void *cls, const char *address)
258 { 258 {
259 /* error */ 259 /* error */
260 if (GNUNET_NO == info->got_address) 260 if (GNUNET_NO == info->got_address)
261 gtk_list_store_set (ls, &iter, 261 gtk_list_store_set (ls, &iter,
262 PEERINFO_MC_NUMBER_OF_ADDRESSES, (guint) 1, 262 PEERINFO_MC_NUMBER_OF_ADDRESSES, (guint) 1,
263 PEERINFO_MC_COUNTRY_NAME, NULL, 263 PEERINFO_MC_COUNTRY_NAME, NULL,
264 PEERINFO_MC_COUNTRY_FLAG, NULL, 264 PEERINFO_MC_COUNTRY_FLAG, NULL,
265 PEERINFO_MC_ADDRESS_AS_STRING, "<no address>", 265 PEERINFO_MC_ADDRESS_AS_STRING, "<no address>",
266 PEERINFO_MC_CONNECTIVITY_LED, led_green, 266 PEERINFO_MC_CONNECTIVITY_LED, led_green,
267 PEERINFO_MC_CONNECTED_STATUS, TRUE, 267 PEERINFO_MC_CONNECTED_STATUS, TRUE,
268 -1); 268 -1);
@@ -280,11 +280,11 @@ peer_address_string_cb (void *cls, const char *address)
280 if ('.' == *dot) 280 if ('.' == *dot)
281 country = GNUNET_strndup (&dot[1], (colon - dot) - 1); 281 country = GNUNET_strndup (&dot[1], (colon - dot) - 1);
282 } 282 }
283 gtk_list_store_set (ls, &iter, 283 gtk_list_store_set (ls, &iter,
284 PEERINFO_MC_NUMBER_OF_ADDRESSES, 1, 284 PEERINFO_MC_NUMBER_OF_ADDRESSES, 1,
285 PEERINFO_MC_COUNTRY_NAME, country, 285 PEERINFO_MC_COUNTRY_NAME, country,
286 PEERINFO_MC_COUNTRY_FLAG, GNUNET_PEERINFO_GTK_get_flag (country), 286 PEERINFO_MC_COUNTRY_FLAG, GNUNET_PEERINFO_GTK_get_flag (country),
287 PEERINFO_MC_ADDRESS_AS_STRING, address, 287 PEERINFO_MC_ADDRESS_AS_STRING, address,
288 PEERINFO_MC_CONNECTIVITY_LED, led_green, 288 PEERINFO_MC_CONNECTIVITY_LED, led_green,
289 PEERINFO_MC_CONNECTED_STATUS, TRUE, 289 PEERINFO_MC_CONNECTED_STATUS, TRUE,
290 -1); 290 -1);
@@ -315,14 +315,14 @@ peer_address_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
315 if (NULL == address) 315 if (NULL == address)
316 { 316 {
317 /* disconnect */ 317 /* disconnect */
318 gtk_list_store_set (ls, &iter, 318 gtk_list_store_set (ls, &iter,
319 PEERINFO_MC_NUMBER_OF_ADDRESSES, (guint) 0, 319 PEERINFO_MC_NUMBER_OF_ADDRESSES, (guint) 0,
320 PEERINFO_MC_CONNECTIVITY_LED, led_red, 320 PEERINFO_MC_CONNECTIVITY_LED, led_red,
321 PEERINFO_MC_CONNECTED_STATUS, FALSE, 321 PEERINFO_MC_CONNECTED_STATUS, FALSE,
322 -1); 322 -1);
323 return; 323 return;
324 } 324 }
325 gtk_list_store_set (ls, &iter, 325 gtk_list_store_set (ls, &iter,
326 PEERINFO_MC_NUMBER_OF_ADDRESSES, 1, 326 PEERINFO_MC_NUMBER_OF_ADDRESSES, 1,
327 PEERINFO_MC_CONNECTIVITY_LED, led_green, 327 PEERINFO_MC_CONNECTIVITY_LED, led_green,
328 PEERINFO_MC_CONNECTED_STATUS, TRUE, 328 PEERINFO_MC_CONNECTED_STATUS, TRUE,
@@ -364,8 +364,8 @@ peerinfo_processor (void *cls, const struct GNUNET_PeerIdentity *peer,
364 npid = (char *) &enc; 364 npid = (char *) &enc;
365 npid[4] = '\0'; 365 npid[4] = '\0';
366 gtk_list_store_append (ls, &iter); 366 gtk_list_store_append (ls, &iter);
367 gtk_list_store_set (ls, &iter, 367 gtk_list_store_set (ls, &iter,
368 PEERINFO_MC_PEER_IDENTITY_STRING, npid, 368 PEERINFO_MC_PEER_IDENTITY_STRING, npid,
369 PEERINFO_MC_NUMBER_OF_ADDRESSES, (guint) 0, 369 PEERINFO_MC_NUMBER_OF_ADDRESSES, (guint) 0,
370 PEERINFO_MC_COUNTRY_NAME, "", 370 PEERINFO_MC_COUNTRY_NAME, "",
371 PEERINFO_MC_COUNTRY_FLAG, NULL, 371 PEERINFO_MC_COUNTRY_FLAG, NULL,
@@ -407,7 +407,7 @@ peerinfo_processor (void *cls, const struct GNUNET_PeerIdentity *peer,
407 * @param ats_count number of performance records in 'ats' 407 * @param ats_count number of performance records in 'ats'
408 */ 408 */
409static void 409static void
410status_cb (void *cls, 410status_cb (void *cls,
411 const struct GNUNET_HELLO_Address *address, 411 const struct GNUNET_HELLO_Address *address,
412 int address_active, 412 int address_active,
413 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 413 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
@@ -438,7 +438,7 @@ status_cb (void *cls,
438/** 438/**
439 * Callback invoked if the application is supposed to exit. 439 * Callback invoked if the application is supposed to exit.
440 * 440 *
441 * @param object 441 * @param object
442 * @param user_data unused 442 * @param user_data unused
443 */ 443 */
444void 444void
@@ -462,7 +462,7 @@ load_led (const char *color)
462 char *fn; 462 char *fn;
463 463
464 dir = GNUNET_GTK_installation_get_path (GNUNET_OS_IPK_DATADIR); 464 dir = GNUNET_GTK_installation_get_path (GNUNET_OS_IPK_DATADIR);
465 GNUNET_asprintf (&fn, "%s%s.png", dir, 465 GNUNET_asprintf (&fn, "%s%s.png", dir,
466 color); 466 color);
467 GNUNET_free (dir); 467 GNUNET_free (dir);
468 pixbuf = gdk_pixbuf_new_from_file (fn, NULL); 468 pixbuf = gdk_pixbuf_new_from_file (fn, NULL);
@@ -495,7 +495,7 @@ run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
495 GNUNET_GTK_setup_nls (); 495 GNUNET_GTK_setup_nls ();
496 peer2info = GNUNET_CONTAINER_multihashmap_create (256, GNUNET_NO); 496 peer2info = GNUNET_CONTAINER_multihashmap_create (256, GNUNET_NO);
497 pnc = 497 pnc =
498 GNUNET_PEERINFO_notify (get_configuration (), 498 GNUNET_PEERINFO_notify (get_configuration (),
499 GNUNET_NO, 499 GNUNET_NO,
500 &peerinfo_processor, NULL); 500 &peerinfo_processor, NULL);
501 if (NULL == pnc) 501 if (NULL == pnc)