diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-05-18 04:56:30 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-05-18 13:06:32 +0000 |
commit | 6a7d70cc9f677fb8628c769e9f4f6bb688ac7f82 (patch) | |
tree | 1946d4801d0e43c1d39fbccaeb5d7bfbe7dfac29 /gtk/gtkmenubutton.h | |
parent | 7cec5323d13db5f64dfee7758d83faa6ef3da3d5 (diff) | |
download | gtk+-6a7d70cc9f677fb8628c769e9f4f6bb688ac7f82.tar.gz |
menubutton: Don't derive from GtkToggleButton
Make GtkMenuButton a widget that has a
toggle button, instead of deriving from it.
We give it icon-name and label properties,
to let people do what they expect to do
with menu buttons.
Diffstat (limited to 'gtk/gtkmenubutton.h')
-rw-r--r-- | gtk/gtkmenubutton.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gtk/gtkmenubutton.h b/gtk/gtkmenubutton.h index be019c30c3..d26d93f052 100644 --- a/gtk/gtkmenubutton.h +++ b/gtk/gtkmenubutton.h @@ -44,12 +44,12 @@ typedef struct _GtkMenuButtonPrivate GtkMenuButtonPrivate; struct _GtkMenuButton { - GtkToggleButton parent_instance; + GtkWidget parent_instance; }; struct _GtkMenuButtonClass { - GtkToggleButtonClass parent_class; + GtkWidgetClass parent_class; /* Padding for future expansion */ void (*_gtk_reserved1) (void); @@ -100,6 +100,18 @@ void gtk_menu_button_set_use_popover (GtkMenuButton *menu_button, GDK_AVAILABLE_IN_ALL gboolean gtk_menu_button_get_use_popover (GtkMenuButton *menu_button); +GDK_AVAILABLE_IN_ALL +void gtk_menu_button_set_icon_name (GtkMenuButton *menu_button, + const char *icon_name); +GDK_AVAILABLE_IN_ALL +const char * gtk_menu_button_get_icon_name (GtkMenuButton *menu_button); + +GDK_AVAILABLE_IN_ALL +void gtk_menu_button_set_label (GtkMenuButton *menu_button, + const char *label); +GDK_AVAILABLE_IN_ALL +const char * gtk_menu_button_get_label (GtkMenuButton *menu_button); + G_END_DECLS |