summaryrefslogtreecommitdiff
path: root/gtk/gtktoolbar.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-06-08 18:09:34 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-06-08 18:09:34 +0000
commit74e7da214f1ee9b98304145813814d4f73a97a15 (patch)
treefc3dd7f61cea4cabf3fc5dc44dc8fbd9ca691b30 /gtk/gtktoolbar.c
parent72ef055bde913c993d4a38964542b1d1c4470e1b (diff)
downloadgtk+-74e7da214f1ee9b98304145813814d4f73a97a15.tar.gz
geez, don't call g_list funcs on GSList
2001-06-08 Havoc Pennington <hp@redhat.com> * gtk/gtktextbuffer.c (gtk_text_buffer_remove_all_tags): geez, don't call g_list funcs on GSList * gtk/gtkwidget.c (gtk_widget_child_focus): replaces gtk_container_focus(), since some widgets have focusable locations which are not other widgets. These widgets should not have to be containers just to manage the focus. For example, GtkHSV is currently a container for no good reason. Also, this cleans up the "if (is_container && is_sensitive && is_drawable) container_focus ()" mess in widget implementations. * gtk/gtkcontainer.c (gtk_container_focus): deprecate this function, and have it just call gtk_widget_child_focus(). * gtk/gtkhsv.c: derive from widget not container Throughout: fix to reflect GtkContainer::focus change
Diffstat (limited to 'gtk/gtktoolbar.c')
-rw-r--r--gtk/gtktoolbar.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 93dbadc394..9b5836410e 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -91,6 +91,8 @@ static void gtk_toolbar_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gtk_toolbar_style_set (GtkWidget *widget,
GtkStyle *prev_style);
+static gboolean gtk_toolbar_focus (GtkWidget *widget,
+ GtkDirectionType dir);
static void gtk_toolbar_show_all (GtkWidget *widget);
static void gtk_toolbar_add (GtkContainer *container,
GtkWidget *widget);
@@ -100,6 +102,7 @@ static void gtk_toolbar_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
+
static void gtk_real_toolbar_orientation_changed (GtkToolbar *toolbar,
GtkOrientation orientation);
static void gtk_real_toolbar_style_changed (GtkToolbar *toolbar,
@@ -192,11 +195,11 @@ gtk_toolbar_class_init (GtkToolbarClass *class)
widget_class->size_allocate = gtk_toolbar_size_allocate;
widget_class->style_set = gtk_toolbar_style_set;
widget_class->show_all = gtk_toolbar_show_all;
+ widget_class->focus = gtk_toolbar_focus;
container_class->add = gtk_toolbar_add;
container_class->remove = gtk_toolbar_remove;
container_class->forall = gtk_toolbar_forall;
- container_class->focus = NULL;
class->orientation_changed = gtk_real_toolbar_orientation_changed;
class->style_changed = gtk_real_toolbar_style_changed;
@@ -834,6 +837,15 @@ gtk_toolbar_style_set (GtkWidget *widget,
gtk_toolbar_update_button_relief (GTK_TOOLBAR (widget));
}
+static gboolean
+gtk_toolbar_focus (GtkWidget *widget,
+ GtkDirectionType dir)
+{
+ /* Focus can't go in toolbars */
+
+ return FALSE;
+}
+
static void
child_show_all (GtkWidget *widget)
{