diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-04-10 16:20:55 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-04-10 16:20:55 +0100 |
commit | 267fb0b00eec762da36f9f763521399efb914c2b (patch) | |
tree | dcabd2b7412e43bef694feaeb881eeb08e93b765 /gtk/compat.h | |
parent | 1922eb1e2a688c1927ab05436dec5043c31b8e78 (diff) | |
download | netsurf-267fb0b00eec762da36f9f763521399efb914c2b.tar.gz netsurf-267fb0b00eec762da36f9f763521399efb914c2b.tar.bz2 |
cope with deprication of image menus in GTK 3.10
Diffstat (limited to 'gtk/compat.h')
-rw-r--r-- | gtk/compat.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gtk/compat.h b/gtk/compat.h index a5fd33ce8..748f1b4e4 100644 --- a/gtk/compat.h +++ b/gtk/compat.h @@ -191,5 +191,29 @@ gdouble nsgtk_adjustment_get_upper(GtkAdjustment *adjustment); gdouble nsgtk_adjustment_get_lower(GtkAdjustment *adjustment); gdouble nsgtk_adjustment_get_page_increment(GtkAdjustment *adjustment); +/* menu compatability */ + +/** + * Creates a new GtkImageMenuItem containing a label. + * + * Compatability interface for original deprecated in GTK 3.10. + * @note post 3.10 this creates a GtkMenuItem. + * + * \param label The text of the button, with an underscore in front of + * the mnemonic character. + * \return a new GtkMenuItem + */ +GtkWidget *nsgtk_image_menu_item_new_with_mnemonic(const gchar *label); + +/** + * Sets the image of image_menu_item to the given widget. + * + * Compatability interface for original deprecated in GTK 3.10. + * @note post 3.10 this is empty as menu creation generates GtkMenuItem. + * + * \param image_menu_item The image menu entry item. + * \param image The image to set. + */ +void nsgtk_image_menu_item_set_image(GtkWidget *image_menu_item, GtkWidget *image); #endif /* NETSURF_GTK_COMPAT_H */ |