diff options
author | Tim Janik <timj@gtk.org> | 1998-06-18 03:22:09 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-06-18 03:22:09 +0000 |
commit | f83d57e91b6ffa2377d714f076343ac9e71b78c1 (patch) | |
tree | ae7428e1a0be53d24c94a645f01ca32eaecacfdc /gtk/gtkaccellabel.h | |
parent | 85adae970a84eaf5cb5d3ce8819044cb832e0d72 (diff) | |
download | gtk+-f83d57e91b6ffa2377d714f076343ac9e71b78c1.tar.gz |
yeppers, accelerator changes to fix the gimp. commit message dedicated to
yeppers, accelerator changes to fix the gimp.
commit message dedicated to sopwith ;)
Thu Jun 18 03:30:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new function gtk_accel_label_accelerator_width to
request the size of the accelerator portion of an accel label.
(gtk_accel_label_size_request): don't request for the accelerators size.
(gtk_accel_label_expose_event): only draw the accelerator if we got
enough extra space.
* gtk/gtkmenuitem.c (gtk_menu_item_size_request): request accelerator
width from children.
* gtk/gtkmenu.c (gtk_menu_key_press): when adding an accelerator to an
object (after removal has been requested) check if there is still an
accelerator remaining to avoid adding two accelerators on an object.
this can happen for locked accelerators (or accelerator-frozen widgets).
(gtk_menu_size_request): feature childrens accelerator width in size
requests.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): use
gtk_widget_freeze_accelerators() for dynamically created menu items.
* gtk/gtksignal.h:
* gtk/gtksignal.c: new function gtk_signal_handler_pending_by_func()
which will return a handler_id > 0 if the specified function is pending
for `signal_id'.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: remove gtk_widget_stop_accelerator, which was just
a signal handler function to stop accelerator addition.
added gtk_widget_freeze_accelerators and gtk_widget_thaw_accelerators
which will prevent (undo) any accelerators from being added to or
removed from a widget.
Diffstat (limited to 'gtk/gtkaccellabel.h')
-rw-r--r-- | gtk/gtkaccellabel.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk/gtkaccellabel.h b/gtk/gtkaccellabel.h index c0233bf7e2..b384f01807 100644 --- a/gtk/gtkaccellabel.h +++ b/gtk/gtkaccellabel.h @@ -50,7 +50,7 @@ struct _GtkAccelLabel guint accel_padding; GtkWidget *accel_widget; gchar *accel_string; - guint accel_string_width : 16; + guint16 accel_string_width; }; struct _GtkAccelLabelClass @@ -68,11 +68,12 @@ struct _GtkAccelLabelClass }; -GtkType gtk_accel_label_get_type (void); -GtkWidget* gtk_accel_label_new (const gchar *string); -void gtk_accel_label_set_accel_widget (GtkAccelLabel *accel_label, - GtkWidget *accel_widget); -gboolean gtk_accel_label_refetch (GtkAccelLabel *accel_label); +GtkType gtk_accel_label_get_type (void); +GtkWidget* gtk_accel_label_new (const gchar *string); +guint gtk_accel_label_accelerator_width (GtkAccelLabel *accel_label); +void gtk_accel_label_set_accel_widget (GtkAccelLabel *accel_label, + GtkWidget *accel_widget); +gboolean gtk_accel_label_refetch (GtkAccelLabel *accel_label); #ifdef __cplusplus |