aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:09 +0000
committerChristian Grothoff <christian@grothoff.org>2016-04-09 23:14:09 +0000
commitb25fa8589635010a74304dbca9678a3ca5cdfd7d (patch)
tree6ddc20fdc8b5c9158af3a60910f02040b877628c /src/lib
parentb2f918a9a4fb089772cf4cc6eec0dc1f96bb3f09 (diff)
downloadgnunet-gtk-b25fa8589635010a74304dbca9678a3ca5cdfd7d.tar.gz
gnunet-gtk-b25fa8589635010a74304dbca9678a3ca5cdfd7d.zip
small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to all scheduler tasks; instead, allow the relatively few tasks that need it to obtain the context via GNUNET_SCHEDULER_get_task_context()
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/animations.c4
-rw-r--r--src/lib/eventloop.c9
-rw-r--r--src/lib/glade.c4
-rw-r--r--src/lib/os_installation.c2
4 files changed, 8 insertions, 11 deletions
diff --git a/src/lib/animations.c b/src/lib/animations.c
index 0f217d1f..16fa883d 100644
--- a/src/lib/animations.c
+++ b/src/lib/animations.c
@@ -261,11 +261,9 @@ redraw_tree_view (struct GNUNET_GTK_AnimationTreeViewHandle *atv)
261 * Task run periodically to advance all of our animations. 261 * Task run periodically to advance all of our animations.
262 * 262 *
263 * @param cls closure, unused 263 * @param cls closure, unused
264 * @param tc scheduler context, unused
265 */ 264 */
266static void 265static void
267ticker (void *cls, 266ticker (void *cls)
268 const struct GNUNET_SCHEDULER_TaskContext *tc)
269{ 267{
270 struct GNUNET_GTK_AnimationContext *pos; 268 struct GNUNET_GTK_AnimationContext *pos;
271 struct GNUNET_GTK_AnimationTreeViewHandle *atv; 269 struct GNUNET_GTK_AnimationTreeViewHandle *atv;
diff --git a/src/lib/eventloop.c b/src/lib/eventloop.c
index e42d422d..50b294f8 100644
--- a/src/lib/eventloop.c
+++ b/src/lib/eventloop.c
@@ -323,10 +323,9 @@ GNUNET_GTK_main_loop_get_args (struct GNUNET_GTK_MainLoop * ml,
323 * Task to run Gtk events (within a GNUnet scheduler task). 323 * Task to run Gtk events (within a GNUnet scheduler task).
324 * 324 *
325 * @param cls the main loop handle 325 * @param cls the main loop handle
326 * @param tc scheduler context
327 */ 326 */
328static void 327static void
329dispatch_gtk_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 328dispatch_gtk_task (void *cls)
330{ 329{
331 struct GNUNET_GTK_MainLoop *ml = cls; 330 struct GNUNET_GTK_MainLoop *ml = cls;
332 331
@@ -355,7 +354,7 @@ resize_cached_poll_array (struct GNUNET_GTK_MainLoop *ml, guint new_size)
355 * Dummy task to keep our scheduler running. 354 * Dummy task to keep our scheduler running.
356 */ 355 */
357static void 356static void
358keepalive_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 357keepalive_task (void *cls)
359{ 358{
360 struct GNUNET_GTK_MainLoop *ml = cls; 359 struct GNUNET_GTK_MainLoop *ml = cls;
361 360
@@ -854,8 +853,8 @@ run_main_loop (void *cls, char *const *args, const char *cfgfile,
854 GNUNET_asprintf (&baseconfig, "%s%s", ipath, "config.d"); 853 GNUNET_asprintf (&baseconfig, "%s%s", ipath, "config.d");
855 (void) GNUNET_CONFIGURATION_load_from (gcfg, baseconfig); 854 (void) GNUNET_CONFIGURATION_load_from (gcfg, baseconfig);
856 GNUNET_free (baseconfig); 855 GNUNET_free (baseconfig);
857 856 /* FIXME: this was supposed to search the GTK-IPK, so the logic here is badly broken now */
858 if (NULL == (ipath2 = GNUNET_GTK_installation_get_path (GNUNET_OS_IPK_DATADIR))) 857 if (NULL == (ipath2 = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR)))
859 { 858 {
860 GNUNET_break (0); 859 GNUNET_break (0);
861 return; 860 return;
diff --git a/src/lib/glade.c b/src/lib/glade.c
index 5b508a85..99a9910e 100644
--- a/src/lib/glade.c
+++ b/src/lib/glade.c
@@ -35,7 +35,7 @@ GNUNET_GTK_set_icon_search_path ()
35{ 35{
36 char *buf; 36 char *buf;
37 37
38 buf = GNUNET_GTK_installation_get_path (GNUNET_OS_IPK_ICONDIR); 38 buf = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_ICONDIR);
39 gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), buf); 39 gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (), buf);
40 GNUNET_free (buf); 40 GNUNET_free (buf);
41} 41}
@@ -53,7 +53,7 @@ GNUNET_GTK_get_data_dir ()
53 static char *dd; 53 static char *dd;
54 54
55 if (dd == NULL) 55 if (dd == NULL)
56 dd = GNUNET_GTK_installation_get_path (GNUNET_OS_IPK_DATADIR); 56 dd = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR);
57 return dd; 57 return dd;
58} 58}
59 59
diff --git a/src/lib/os_installation.c b/src/lib/os_installation.c
index 274ba0ad..9b68b097 100644
--- a/src/lib/os_installation.c
+++ b/src/lib/os_installation.c
@@ -31,7 +31,7 @@
31 */ 31 */
32static const struct GNUNET_OS_ProjectData gtk_pd = { 32static const struct GNUNET_OS_ProjectData gtk_pd = {
33 .libname = "libgnunetgtk", 33 .libname = "libgnunetgtk",
34 .project_dirname = "gnunet-gtk", 34 .project_dirname = "gnunet",
35 .binary_name = "gnunet-fs-gtk", 35 .binary_name = "gnunet-fs-gtk",
36 .env_varname = "GNUNET_GTK_PREFIX", 36 .env_varname = "GNUNET_GTK_PREFIX",
37 .env_varname_alt = "GNUNET_PREFIX", 37 .env_varname_alt = "GNUNET_PREFIX",