diff options
author | Owen Taylor <otaylor@redhat.com> | 1998-09-04 15:02:08 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-09-04 15:02:08 +0000 |
commit | e9c260180cd03a12c44807a81f236d43fbaf3cc0 (patch) | |
tree | d7ce46f49efc480622558ed75353cc998b9231d4 /gtk/gtktoolbar.c | |
parent | 9d4587fc545fb576c065cc1a01e55e8a6ff531a3 (diff) | |
download | gtk+-e9c260180cd03a12c44807a81f236d43fbaf3cc0.tar.gz |
Merges from HEAD.
Thu Sep 3 19:45:34 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkthemes.c: Use g_module instead of dlopen()
Thu Sep 3 19:30:11 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c (gtk_tooltips_expose): Check
if we've changed widgets since the expose event
was queued.
Diffstat (limited to 'gtk/gtktoolbar.c')
-rw-r--r-- | gtk/gtktoolbar.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 6e62117ad3..8457d6c7de 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -52,7 +52,8 @@ static void gtk_toolbar_add (GtkContainer *container, GtkWidget *widget); static void gtk_toolbar_remove (GtkContainer *container, GtkWidget *widget); -static void gtk_toolbar_foreach (GtkContainer *container, +static void gtk_toolbar_forall (GtkContainer *container, + gboolean include_internals, GtkCallback callback, gpointer callback_data); static void gtk_real_toolbar_orientation_changed (GtkToolbar *toolbar, @@ -134,7 +135,7 @@ gtk_toolbar_class_init (GtkToolbarClass *class) container_class->add = gtk_toolbar_add; container_class->remove = gtk_toolbar_remove; - container_class->foreach = gtk_toolbar_foreach; + container_class->forall = gtk_toolbar_forall; container_class->focus = NULL; class->orientation_changed = gtk_real_toolbar_orientation_changed; @@ -543,9 +544,10 @@ gtk_toolbar_remove (GtkContainer *container, } static void -gtk_toolbar_foreach (GtkContainer *container, - GtkCallback callback, - gpointer callback_data) +gtk_toolbar_forall (GtkContainer *container, + gboolean include_internals, + GtkCallback callback, + gpointer callback_data) { GtkToolbar *toolbar; GList *children; @@ -736,7 +738,13 @@ gtk_toolbar_insert_element (GtkToolbar *toolbar, g_return_val_if_fail (toolbar != NULL, NULL); g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), NULL); - g_return_val_if_fail ((type != GTK_TOOLBAR_CHILD_WIDGET) || (widget != NULL), NULL); + if (type == GTK_TOOLBAR_CHILD_WIDGET) + { + g_return_val_if_fail (widget != NULL, NULL); + g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL); + } + else + g_return_val_if_fail (widget == NULL, NULL); child = g_new (GtkToolbarChild, 1); child->type = type; @@ -841,6 +849,9 @@ void gtk_toolbar_set_orientation (GtkToolbar *toolbar, GtkOrientation orientation) { + g_return_if_fail (toolbar != NULL); + g_return_if_fail (GTK_IS_TOOLBAR (toolbar)); + gtk_signal_emit (GTK_OBJECT (toolbar), toolbar_signals[ORIENTATION_CHANGED], orientation); } @@ -848,6 +859,9 @@ void gtk_toolbar_set_style (GtkToolbar *toolbar, GtkToolbarStyle style) { + g_return_if_fail (toolbar != NULL); + g_return_if_fail (GTK_IS_TOOLBAR (toolbar)); + gtk_signal_emit (GTK_OBJECT (toolbar), toolbar_signals[STYLE_CHANGED], style); } @@ -904,7 +918,7 @@ gtk_toolbar_set_button_relief (GtkToolbar *toolbar, } GtkReliefStyle -gtk_toolbar_get_button_relief (GtkToolbar *toolbar) +gtk_toolbar_get_button_relief (GtkToolbar *toolbar) { g_return_val_if_fail (toolbar != NULL, GTK_RELIEF_NORMAL); g_return_val_if_fail (GTK_IS_TOOLBAR (toolbar), GTK_RELIEF_NORMAL); |