aboutsummaryrefslogtreecommitdiff
path: root/src/common/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/helper.c')
-rw-r--r--src/common/helper.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/src/common/helper.c b/src/common/helper.c
index 0abe2f06..8689c8b5 100644
--- a/src/common/helper.c
+++ b/src/common/helper.c
@@ -82,7 +82,7 @@ static Plugin *plugin;
82 82
83static void *shutdown_function; 83static void *shutdown_function;
84 84
85static struct GNUNET_GEContext *ectx; 85static struct GNUNET_GE_Context *ectx;
86 86
87static struct GNUNET_GC_Configuration *cfg; 87static struct GNUNET_GC_Configuration *cfg;
88 88
@@ -113,7 +113,7 @@ saveCallWrapper (gpointer data)
113 break; 113 break;
114 } 114 }
115 } 115 }
116 GNUNET_GEASSERT (NULL, i != pscCount); 116 GNUNET_GE_ASSERT (NULL, i != pscCount);
117 GNUNET_array_grow (psc, pscCount, pscCount - 1); 117 GNUNET_array_grow (psc, pscCount, pscCount - 1);
118 GNUNET_mutex_unlock (sclock); 118 GNUNET_mutex_unlock (sclock);
119 } 119 }
@@ -206,10 +206,11 @@ connector (const gchar * handler_name,
206 if ((module == NULL) || 206 if ((module == NULL) ||
207 (TRUE != g_module_symbol (module, handler_name, &method))) 207 (TRUE != g_module_symbol (module, handler_name, &method)))
208 { 208 {
209 GNUNET_GELOG (ectx, 209 GNUNET_GE_LOG (ectx,
210 GNUNET_GEWARNING | GNUNET_GEDEVELOPER | 210 GNUNET_GE_WARNING | GNUNET_GE_DEVELOPER |
211 GNUNET_GEIMMEDIATE, 211 GNUNET_GE_IMMEDIATE,
212 _("Failed to find handler for `%s'\n"), handler_name); 212 _("Failed to find handler for `%s'\n"),
213 handler_name);
213 g_module_close (module); 214 g_module_close (module);
214 return; 215 return;
215 } 216 }
@@ -224,7 +225,7 @@ GNUNET_GTK_connect_glade_with_plugins (GladeXML * xml)
224 glade_xml_signal_autoconnect_full (xml, &connector, xml); 225 glade_xml_signal_autoconnect_full (xml, &connector, xml);
225} 226}
226 227
227typedef void (*InitCall) (struct GNUNET_GEContext * ectx, 228typedef void (*InitCall) (struct GNUNET_GE_Context * ectx,
228 struct GNUNET_GC_Configuration * cfg); 229 struct GNUNET_GC_Configuration * cfg);
229 230
230typedef void (*PlainCall) (void); 231typedef void (*PlainCall) (void);
@@ -301,7 +302,7 @@ unloadPlugin (void *p)
301} 302}
302 303
303void 304void
304GNUNET_GTK_initialize_common_library (struct GNUNET_GEContext *e, 305GNUNET_GTK_initialize_common_library (struct GNUNET_GE_Context *e,
305 struct GNUNET_GC_Configuration *c, 306 struct GNUNET_GC_Configuration *c,
306 void *callback) 307 void *callback)
307{ 308{
@@ -333,12 +334,12 @@ GNUNET_GTK_initialize_common_library (struct GNUNET_GEContext *e,
333#endif 334#endif
334 GNUNET_free (filename); 335 GNUNET_free (filename);
335 336
336 mainXML = glade_xml_new (gladeFile, "mainWindow", PACKAGNUNET_GENAME); 337 mainXML = glade_xml_new (gladeFile, "mainWindow", PACKAGNUNET_GE_NAME);
337 if (mainXML == NULL) 338 if (mainXML == NULL)
338 GNUNET_GEDIE_STRERROR_FILE (ectx, 339 GNUNET_GE_DIE_STRERROR_FILE (ectx,
339 GNUNET_GEFATAL | GNUNET_GEUSER | 340 GNUNET_GE_FATAL | GNUNET_GE_USER |
340 GNUNET_GEIMMEDIATE, "glade_xml_new", 341 GNUNET_GE_IMMEDIATE, "glade_xml_new",
341 gladeFile); 342 gladeFile);
342 /* load the plugins */ 343 /* load the plugins */
343 GNUNET_GC_get_configuration_value_string (cfg, 344 GNUNET_GC_get_configuration_value_string (cfg,
344 "GNUNET-GTK", 345 "GNUNET-GTK",
@@ -428,9 +429,9 @@ GNUNET_GTK_run_with_save_calls (GNUNET_ThreadMainFunction cb, void *arg)
428 cls.arg = arg; 429 cls.arg = arg;
429 doneThread = GNUNET_thread_create (&shutdownCode, &cls, 64 * 1024); 430 doneThread = GNUNET_thread_create (&shutdownCode, &cls, 64 * 1024);
430 if (doneThread == NULL) 431 if (doneThread == NULL)
431 GNUNET_GEDIE_STRERROR (ectx, 432 GNUNET_GE_DIE_STRERROR (ectx,
432 GNUNET_GEFATAL | GNUNET_GEADMIN | GNUNET_GEBULK, 433 GNUNET_GE_FATAL | GNUNET_GE_ADMIN |
433 "pthread_create"); 434 GNUNET_GE_BULK, "pthread_create");
434 if (!GNUNET_thread_test_self (mainThread)) 435 if (!GNUNET_thread_test_self (mainThread))
435 { 436 {
436 /* another thread will run the save calls */ 437 /* another thread will run the save calls */
@@ -488,10 +489,10 @@ GNUNET_GTK_notify (int type, const char *message, ...)
488 if (!notify_init ("gnunet-gtk")) 489 if (!notify_init ("gnunet-gtk"))
489 { 490 {
490 once = 1; 491 once = 1;
491 GNUNET_GELOG (ectx, 492 GNUNET_GE_LOG (ectx,
492 GNUNET_GEWARNING | GNUNET_GEBULK | GNUNET_GEUSER | 493 GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER |
493 GNUNET_GEADMIN, 494 GNUNET_GE_ADMIN,
494 _("Could not initialize libnotify\n")); 495 _("Could not initialize libnotify\n"));
495 return; 496 return;
496 } 497 }
497 } 498 }
@@ -515,7 +516,7 @@ GNUNET_GTK_notify (int type, const char *message, ...)
515 va_end (arg); 516 va_end (arg);
516 libnotify = notify_notification_new ("gnunet-gtk", 517 libnotify = notify_notification_new ("gnunet-gtk",
517 msg, 518 msg,
518 PACKAGNUNET_GEDATA 519 PACKAGNUNET_GE_DATA
519 "/gnunet-gtk/gnunet-gtk-notify.png", 520 "/gnunet-gtk/gnunet-gtk-notify.png",
520 NULL); 521 NULL);
521 GNUNET_free (msg); 522 GNUNET_free (msg);
@@ -524,10 +525,10 @@ GNUNET_GTK_notify (int type, const char *message, ...)
524 if (!notify_notification_show (libnotify, NULL)) 525 if (!notify_notification_show (libnotify, NULL))
525 { 526 {
526 once = 1; 527 once = 1;
527 GNUNET_GELOG (ectx, 528 GNUNET_GE_LOG (ectx,
528 GNUNET_GEWARNING | GNUNET_GEUSER | GNUNET_GEADMIN | 529 GNUNET_GE_WARNING | GNUNET_GE_USER | GNUNET_GE_ADMIN
529 GNUNET_GEBULK, 530 | GNUNET_GE_BULK,
530 _("Could not send notification via libnotify\n")); 531 _("Could not send notification via libnotify\n"));
531 } 532 }
532 g_object_unref (G_OBJECT (libnotify)); 533 g_object_unref (G_OBJECT (libnotify));
533 notify_uninit (); 534 notify_uninit ();
@@ -558,7 +559,7 @@ GNUNET_GTK_validate_utf8 (char *msg)
558 GNUNET_free (msg); 559 GNUNET_free (msg);
559 msg = GNUNET_strdup (ret); 560 msg = GNUNET_strdup (ret);
560 g_free (ret); 561 g_free (ret);
561 GNUNET_GEBREAK (NULL, TRUE == g_utf8_validate (msg, -1, &end)); 562 GNUNET_GE_BREAK (NULL, TRUE == g_utf8_validate (msg, -1, &end));
562 return msg; 563 return msg;
563} 564}
564 565
@@ -634,7 +635,7 @@ GNUNET_GTK_run_gnunet_setup (gboolean run_wizard)
634 messageDialog = 635 messageDialog =
635 gtk_message_dialog_new (GTK_WINDOW (mainWindow), 636 gtk_message_dialog_new (GTK_WINDOW (mainWindow),
636 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, 637 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
637 GTK_MESSAGNUNET_GEWARNING, GTK_BUTTONS_CLOSE, 638 GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE,
638 _ 639 _
639 ("Failed to run the configuration tool (gnunet-setup): %s"), 640 ("Failed to run the configuration tool (gnunet-setup): %s"),
640 error_message); 641 error_message);