--- a/gntbindable.c Fri Apr 26 19:05:22 2019 -0400
+++ b/gntbindable.c Fri Apr 26 19:21:59 2019 -0400
@@ -182,10 +182,8 @@
-add_binding(gpointer key, gpointer value, gpointer data)
+add_binding(const gchar *key, GntBindableActionParam *act, BindingView *bv) - BindingView *bv = data;
- GntBindableActionParam *act = value;
const char *name = g_hash_table_lookup(bv->hash, act->action);
const char *k = gnt_key_lookup(key);
@@ -197,9 +195,8 @@
-add_action(gpointer key, gpointer value, gpointer data)
+add_action(gpointer key, gpointer value, BindingView *bv) - BindingView *bv = data;
g_hash_table_insert(bv->hash, value, key);
@@ -444,8 +441,8 @@
BindingView bv = {hash, GNT_TREE(tree)};
gnt_tree_set_compare_func(bv.tree, (GCompareFunc)g_utf8_collate);
- g_hash_table_foreach(klass->actions, add_action, &bv);
- g_hash_table_foreach(klass->bindings, add_binding, &bv);
+ g_hash_table_foreach(klass->actions, (GHFunc)add_action, &bv); + g_hash_table_foreach(klass->bindings, (GHFunc)add_binding, &bv); if (gnt_tree_get_rows(GNT_TREE(tree)) == NULL) {
gnt_widget_destroy(GNT_WIDGET(tree));
--- a/gntkeys.c Fri Apr 26 19:05:22 2019 -0400
+++ b/gntkeys.c Fri Apr 26 19:21:59 2019 -0400
@@ -185,9 +185,8 @@
-get_key_name(gpointer key, gpointer value, gpointer data)
+get_key_name(gpointer key, const gchar *value, gntkey *k)
if (g_utf8_collate(value, k->key) == 0)
@@ -197,7 +196,7 @@
const char *gnt_key_lookup(const char *key)
- g_hash_table_foreach(specials, get_key_name, &k);
+ g_hash_table_foreach(specials, (GHFunc)get_key_name, &k); --- a/gntutils.c Fri Apr 26 19:05:22 2019 -0400
+++ b/gntutils.c Fri Apr 26 19:21:59 2019 -0400
@@ -152,9 +152,8 @@
-duplicate_values(gpointer key, gpointer value, gpointer data)
+duplicate_values(gpointer key, gpointer value, struct duplicate_fns *fns) - struct duplicate_fns *fns = data;
g_hash_table_insert(fns->table, fns->key_dup ? fns->key_dup(key) : key,
fns->value_dup ? fns->value_dup(value) : value);
@@ -165,7 +164,7 @@
GHashTable *dest = g_hash_table_new_full(hash, equal, key_d, value_d);
struct duplicate_fns fns = {key_dup, value_dup, dest};
- g_hash_table_foreach(src, duplicate_values, &fns);
+ g_hash_table_foreach(src, (GHFunc)duplicate_values, &fns); --- a/gntwm.c Fri Apr 26 19:05:22 2019 -0400
+++ b/gntwm.c Fri Apr 26 19:21:59 2019 -0400
@@ -1176,13 +1176,13 @@
-static void remove_tag(gpointer wid, gpointer wim)
+remove_tag(GntWidget *widget, GntWM *wm) - GntWM *wm = GNT_WM(wim);
- GntWidget *w = GNT_WIDGET(wid);
- wm->tagged = g_list_remove(wm->tagged, w);
- mvwhline(w->window, 0, 1, ACS_HLINE | gnt_color_pair(GNT_COLOR_NORMAL), 3);
+ wm->tagged = g_list_remove(wm->tagged, widget); + mvwhline(widget->window, 0, 1, + ACS_HLINE | gnt_color_pair(GNT_COLOR_NORMAL), 3); + gnt_widget_draw(widget); @@ -1209,18 +1209,17 @@
-widget_move_ws(gpointer wid, gpointer w)
+widget_move_ws(GntWidget *wid, GntWM *wm)
- gnt_wm_widget_move_workspace(wm, wm->cws, GNT_WIDGET(wid));
+ gnt_wm_widget_move_workspace(wm, wm->cws, wid); place_tagged(GntBindable *b, G_GNUC_UNUSED GList *params)
- g_list_foreach(wm->tagged, widget_move_ws, wm);
- g_list_foreach(wm->tagged, remove_tag, wm);
+ g_list_foreach(wm->tagged, (GFunc)widget_move_ws, wm); + g_list_foreach(wm->tagged, (GFunc)remove_tag, wm); @@ -1387,11 +1386,11 @@
-accumulate_windows(gpointer window, G_GNUC_UNUSED gpointer node, gpointer p)
+accumulate_windows(GntWidget *window, G_GNUC_UNUSED gpointer node, GList **p) - GList *list = *(GList**)p;
list = g_list_prepend(list, window);
@@ -1399,7 +1398,7 @@
- g_hash_table_foreach(wm->nodes, accumulate_windows, &list);
+ g_hash_table_foreach(wm->nodes, (GHFunc)accumulate_windows, &list); g_list_free_full(list, (GDestroyNotify)gnt_widget_destroy);
g_hash_table_destroy(wm->nodes);
@@ -2089,9 +2088,8 @@
-write_gdi(gpointer key, gpointer value, gpointer data)
+write_gdi(gpointer key, GntPosition *p, gpointer data) - GntPosition *p = value;
fprintf(data, ".%s = %d;%d\n", (char *)key, p->x, p->y);
@@ -2109,7 +2107,7 @@
gnt_warning("error opening file (%s) to save positions", filename);
fprintf(file, "[positions]\n");
- g_hash_table_foreach(wm->positions, write_gdi, file);
+ g_hash_table_foreach(wm->positions, (GHFunc)write_gdi, file); --- a/gntws.c Fri Apr 26 19:05:22 2019 -0400
+++ b/gntws.c Fri Apr 26 19:21:59 2019 -0400
@@ -42,9 +42,8 @@
*****************************************************************************/
-widget_hide(gpointer data, gpointer nodes)
+widget_hide(GntWidget *widget, GHashTable *nodes) - GntWidget *widget = GNT_WIDGET(data);
GntNode *node = g_hash_table_lookup(nodes, widget);
if (GNT_IS_WINDOW(widget))
gnt_window_workspace_hiding(GNT_WINDOW(widget));
@@ -193,7 +192,7 @@
g_return_if_fail(GNT_IS_WS(ws));
priv = gnt_ws_get_instance_private(ws);
- g_list_foreach(priv->ordered, widget_hide, nodes);
+ g_list_foreach(priv->ordered, (GFunc)widget_hide, nodes); void gnt_ws_widget_hide(GntWidget *widget, GHashTable *nodes)