if (f >= 0) return FALSE; else { gtk_widget_grab_focus(dp->currtreeitem); return TRUE; }
return tree_grab_focus(dp);
gint tree_focus(GtkContainer *container, GtkDirectionType direction,                gpointer data){    struct dlgparam *dp = (struct dlgparam *)data;    int i, f, dir;    gtk_signal_emit_stop_by_name(GTK_OBJECT(container), "focus");    dir = (direction == GTK_DIR_UP || direction == GTK_DIR_LEFT ||           direction == GTK_DIR_TAB_BACKWARD) ? -1 : +1;    /*     * See if any of the treeitems has the focus.     */    f = -1;    for (i = 0; i < dp->ntreeitems; i++)        if (GTK_WIDGET_HAS_FOCUS(dp->treeitems[i])) {            f = i;            break;        }    /*     * If there's a focused treeitem, we return FALSE to cause the     * focus to move on to some totally other control. If not, we     * focus the selected one.     */    if (f >= 0)        return FALSE;    else {        gtk_widget_grab_focus(dp->currtreeitem);        return TRUE;    }}