diff options
author | Timm Bäder <mail@baedert.org> | 2017-02-08 09:00:29 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-03-31 09:50:39 +0200 |
commit | 43cdeee3c4a5486664e68394d08469c5a39770a3 (patch) | |
tree | 41a6e5acc22fcb59be2347a587ee5030a28fce40 /gtk/gtktoolbar.c | |
parent | 2bab2048f9c44a11b8bc5328abbe63b8c3cb084c (diff) | |
download | gtk+-43cdeee3c4a5486664e68394d08469c5a39770a3.tar.gz |
widget: Save pointer to focus child
Do the same thing GtkContainer does.
Diffstat (limited to 'gtk/gtktoolbar.c')
-rw-r--r-- | gtk/gtktoolbar.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 2eb4e08fda..273493436e 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -1836,7 +1836,7 @@ gtk_toolbar_focus_home_or_end (GtkToolbar *toolbar, { GtkWidget *child = list->data; - if (gtk_container_get_focus_child (GTK_CONTAINER (toolbar)) == child) + if (gtk_widget_get_focus_child (GTK_WIDGET (toolbar)) == child) break; if (gtk_widget_get_mapped (child) && gtk_widget_child_focus (child, dir)) @@ -1856,13 +1856,12 @@ gtk_toolbar_move_focus (GtkWidget *widget, GtkDirectionType dir) { GtkToolbar *toolbar = GTK_TOOLBAR (widget); - GtkContainer *container = GTK_CONTAINER (toolbar); GtkWidget *focus_child; GList *list; gboolean try_focus = FALSE; GList *children; - focus_child = gtk_container_get_focus_child (container); + focus_child = gtk_widget_get_focus_child (widget); if (focus_child && gtk_widget_child_focus (focus_child, dir)) return; @@ -1899,7 +1898,7 @@ gtk_toolbar_focus (GtkWidget *widget, * arrow keys or Ctrl TAB (both of which are handled by the * gtk_toolbar_move_focus() keybinding function. */ - if (gtk_container_get_focus_child (GTK_CONTAINER (widget))) + if (gtk_widget_get_focus_child (widget)) return FALSE; children = gtk_toolbar_list_children_in_focus_order (toolbar, dir); |