summaryrefslogtreecommitdiff
path: root/gtk/compat.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-04-10 16:39:23 +0100
committerVincent Sanders <vince@kyllikki.org>2015-04-10 16:39:23 +0100
commit4f13cbd31c984957d17081ac6d59a62b04d57765 (patch)
tree882003de2a575f1efc46ac1d517505e754076eb1 /gtk/compat.c
parent267fb0b00eec762da36f9f763521399efb914c2b (diff)
downloadnetsurf-4f13cbd31c984957d17081ac6d59a62b04d57765.tar.gz
netsurf-4f13cbd31c984957d17081ac6d59a62b04d57765.tar.bz2
Fixup deprication of gtk_icon_size_lookup_for_settings in gtk 3.10
Diffstat (limited to 'gtk/compat.c')
-rw-r--r--gtk/compat.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gtk/compat.c b/gtk/compat.c
index dc9864bb9..7f6d061d8 100644
--- a/gtk/compat.c
+++ b/gtk/compat.c
@@ -506,6 +506,7 @@ void nsgtk_scrolled_window_add_with_viewport(GtkScrolledWindow *window,
#endif
}
+/* exported interface documented in gtk/compat.h */
GtkWidget *nsgtk_image_menu_item_new_with_mnemonic(const gchar *label)
{
#if GTK_CHECK_VERSION(3,10,0)
@@ -515,9 +516,23 @@ GtkWidget *nsgtk_image_menu_item_new_with_mnemonic(const gchar *label)
#endif
}
+/* exported interface documented in gtk/compat.h */
void nsgtk_image_menu_item_set_image(GtkWidget *image_menu_item, GtkWidget *image)
{
#if !GTK_CHECK_VERSION(3,10,0)
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(image_menu_item), image);
#endif
}
+
+/* exported interface documented in gtk/compat.h */
+gboolean nsgtk_icon_size_lookup_for_settings(GtkSettings *settings,
+ GtkIconSize size,
+ gint *width,
+ gint *height)
+{
+#if GTK_CHECK_VERSION(3,10,0)
+ return gtk_icon_size_lookup(size, width, height);
+#else
+ return gtk_icon_size_lookup_for_settings(settings, size, width, height);
+#endif
+}