diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-11-21 17:04:35 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-11-21 17:04:35 +0000 |
commit | c860866dd794b8abb0d185802d0a0dd17c5005ac (patch) | |
tree | 66eefe3e2b8cc52c655b072caa1be719ab7fa388 /gtk/gtkaccelgroup.c | |
parent | d5db986a0b11b2cb7ca4fb93a2d2d40c371d5cf2 (diff) | |
download | gtk+-c860866dd794b8abb0d185802d0a0dd17c5005ac.tar.gz |
Ref-sink the tooltips object. Ref-sink the tooltips object. Fix some
Wed Nov 21 11:41:29 2001 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c (create_tooltips): Ref-sink the tooltips object.
* gtk/gtktoolbar.c (gtk_toolbar_init): Ref-sink the tooltips object.
* gtk/gtkfilesel.c (open_new_dir): Fix some constness warnings.
* gtk/gtkaccelgroup.c: Rename gtk_accel_groups_from_acceleratable()
back to gtk_accel_groups_from_object(), change @acceleratable
parameter to gtk_accel_groups_activate() accordingly.
* gtk/gtkaccelmap.c (gtk_accel_map_lookup_entry): Remove
left-over comment about quark return.
* gtk/gtkaccelmap.h: Fix spelling of gtk_accel_map_foreach_unfiltered().
* gtk/gtk-boxed.defs (GtkIconSource): added as a boxed type.
(Patch from Matt Wilson)
* gtk/gtkobject.c (gtk_object_finalize): Warn if a floating
object is finalized.
Diffstat (limited to 'gtk/gtkaccelgroup.c')
-rw-r--r-- | gtk/gtkaccelgroup.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c index 8106f813e1..a502943223 100644 --- a/gtk/gtkaccelgroup.c +++ b/gtk/gtkaccelgroup.c @@ -242,7 +242,7 @@ _gtk_accel_group_detach (GtkAccelGroup *accel_group, } GSList* -gtk_accel_groups_from_acceleratable (GObject *object) +gtk_accel_groups_from_object (GObject *object) { g_return_val_if_fail (G_IS_OBJECT (object), NULL); @@ -706,23 +706,24 @@ _gtk_accel_group_activate (GtkAccelGroup *accel_group, /** * gtk_accel_groups_activate: - * @acceleratable: usually a #GtkWindow + * @object: the #Gobject, usually a #GtkWindow, on which + * to activate the accelerator. * @accel_key: accelerator keyval from a key event * @accel_mods: keyboard state mask from a key event * @returns: %TRUE if the accelerator was handled, %FALSE otherwise * * Finds the first accelerator in any #GtkAccelGroup attached - * to @acceleratable that matches @accel_key and @accel_mods, and + * to @object that matches @accel_key and @accel_mods, and * activates that accelerator. * If an accelerator was activated and handled this keypress, %TRUE * is returned. */ gboolean -gtk_accel_groups_activate (GObject *acceleratable, +gtk_accel_groups_activate (GObject *object, guint accel_key, GdkModifierType accel_mods) { - g_return_val_if_fail (G_IS_OBJECT (acceleratable), FALSE); + g_return_val_if_fail (G_IS_OBJECT (object), FALSE); if (gtk_accelerator_valid (accel_key, accel_mods)) { @@ -734,8 +735,8 @@ gtk_accel_groups_activate (GObject *acceleratable, accel_quark = g_quark_from_string (accel_name); g_free (accel_name); - for (slist = gtk_accel_groups_from_acceleratable (acceleratable); slist; slist = slist->next) - if (_gtk_accel_group_activate (slist->data, accel_quark, acceleratable, accel_key, accel_mods)) + for (slist = gtk_accel_groups_from_object (object); slist; slist = slist->next) + if (_gtk_accel_group_activate (slist->data, accel_quark, object, accel_key, accel_mods)) return TRUE; } |