libgnt/libgnt

Give GntBox->add_to_focus the right types.

2019-04-24, Elliott Sales de Andrade
7e042541f32d
Parents 0d4155839180
Children 24ee21ba9890
Give GntBox->add_to_focus the right types.
  • +4 -7
    gntbox.c
  • --- a/gntbox.c Wed Apr 24 01:46:26 2019 -0400
    +++ b/gntbox.c Wed Apr 24 02:23:14 2019 -0400
    @@ -47,13 +47,10 @@
    G_DEFINE_TYPE(GntBox, gnt_box, GNT_TYPE_WIDGET)
    static void
    -add_to_focus(gpointer value, gpointer data)
    +add_to_focus(GntWidget *w, GntBox *box)
    {
    - GntBox *box = GNT_BOX(data);
    - GntWidget *w = GNT_WIDGET(value);
    -
    if (GNT_IS_BOX(w))
    - g_list_foreach(GNT_BOX(w)->list, add_to_focus, box);
    + g_list_foreach(GNT_BOX(w)->list, (GFunc)add_to_focus, box);
    else if (gnt_widget_get_take_focus(w))
    box->focus = g_list_append(box->focus, w);
    }
    @@ -78,7 +75,7 @@
    GntBox *box = GNT_BOX(widget);
    if (box->focus == NULL && gnt_widget_get_parent(widget) == NULL) {
    - g_list_foreach(box->list, add_to_focus, box);
    + g_list_foreach(box->list, (GFunc)add_to_focus, box);
    }
    g_list_foreach(box->list, (GFunc)gnt_widget_draw, NULL);
    @@ -256,7 +253,7 @@
    /* XXX: Make sure the widget is visible? */
    if (box->focus == NULL &&
    gnt_widget_get_parent(GNT_WIDGET(box)) == NULL) {
    - g_list_foreach(box->list, add_to_focus, box);
    + g_list_foreach(box->list, (GFunc)add_to_focus, box);
    }
    if (box->active == NULL && box->focus)