summaryrefslogtreecommitdiff
path: root/gtk/gtkaccellabel.h
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2001-07-25 13:36:02 +0000
committerJames Henstridge <jamesh@src.gnome.org>2001-07-25 13:36:02 +0000
commite70939234cf3af180b4d2a695a0076b4538a3889 (patch)
tree5e26f207b4f43cc10ee5445ca8083138fb86b66c /gtk/gtkaccellabel.h
parentafacc246f17fa078fa9a47f7496d570a1b0f97c8 (diff)
downloadgtk+-e70939234cf3af180b4d2a695a0076b4538a3889.tar.gz
commiting patch after comments from Alex on IRC
2001-07-15 James Henstridge <james@daa.com.au> * gtk/gtkwindow.c (gtk_window_add_accel_group): cast to GObject. (gtk_window_remove_accel_group): same here. (gtk_window_key_press_event): same here. * gtk/gtkwidget.c (gtk_widget_add_accelerator): cast to GObject. (gtk_widget_remove_accelerator): same here. (gtk_widget_remove_accelerators): same here. * gtk/gtkplug.c (gtk_plug_accel_entries_changed): same here. * gtk/gtkmenushell.c (gtk_menu_shell_key_press): cast to GObject instead of GtkObject. * gtk/gtkmenu.c (gtk_menu_key_press): update since GtkAccelGroup now takes GObjects. * gtk/gtkitemfactory.c (gtk_item_factory_propagate_accelerator): pass a GObject to gtk_accel_group_entries_from_object. (gtk_item_factory_create_item): s/accel_widget/accel_object/ * gtk/gtk-boxed.defs: remove GtkAccelGroup boxed def. * gtk/gtkaccellabel.c: convert to handle GObject accel objects. * gtk/gtkaccellabel.h: fix header to reflect that arbitrary GObjects can have accelerators set now. Add compatibility defines. * gtk/gtkmarshal.list: add missing marshallers. * gtk/gtkaccelgroup.[ch]: convert to a GObject, and allow setting accelerators on plain GObjects. gtk_accel_group_object_destroy has been converted into a weak reference, and gtk_accel_group_delete_entries is now a destroy notify for that piece of data.
Diffstat (limited to 'gtk/gtkaccellabel.h')
-rw-r--r--gtk/gtkaccellabel.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/gtk/gtkaccellabel.h b/gtk/gtkaccellabel.h
index 9ed18a0628..65dc533bda 100644
--- a/gtk/gtkaccellabel.h
+++ b/gtk/gtkaccellabel.h
@@ -56,7 +56,7 @@ struct _GtkAccelLabel
guint queue_id;
guint accel_padding;
- GtkWidget *accel_widget;
+ GObject *accel_object;
gchar *accel_string;
guint16 accel_string_width;
};
@@ -77,13 +77,19 @@ struct _GtkAccelLabelClass
GtkType gtk_accel_label_get_type (void) G_GNUC_CONST;
-GtkWidget* gtk_accel_label_new (const gchar *string);
-GtkWidget* gtk_accel_label_get_accel_widget (GtkAccelLabel *accel_label);
+GtkWidget *gtk_accel_label_new (const gchar *string);
+GObject *gtk_accel_label_get_accel_object (GtkAccelLabel *accel_label);
guint gtk_accel_label_get_accel_width (GtkAccelLabel *accel_label);
-void gtk_accel_label_set_accel_widget (GtkAccelLabel *accel_label,
- GtkWidget *accel_widget);
+void gtk_accel_label_set_accel_object (GtkAccelLabel *accel_label,
+ GObject *accel_object);
gboolean gtk_accel_label_refetch (GtkAccelLabel *accel_label);
+#ifndef GTK_DISABLE_DEPRECATED
+#define gtk_accel_label_get_accel_widget(accel_label) \
+ GTK_WIDGET(gtk_accel_label_get_accel_object(acel_label))
+#define gtk_accel_label_set_accel_widget(accel_label, accel_widget) \
+ gtk_accel_label_set_accel_object((accel_label), G_OBJECT(accel_widget))
+#endif
#ifdef __cplusplus
}