summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/compat.c15
-rw-r--r--gtk/compat.h2
-rw-r--r--gtk/tabs.c2
3 files changed, 18 insertions, 1 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
+}
diff --git a/gtk/compat.h b/gtk/compat.h
index 748f1b4e4..15c30ab05 100644
--- a/gtk/compat.h
+++ b/gtk/compat.h
@@ -182,6 +182,8 @@ gboolean nsgtk_show_uri(GdkScreen *screen, const gchar *uri, guint32 timestamp,
GdkWindow *nsgtk_layout_get_bin_window(GtkLayout *layout);
void nsgtk_widget_get_allocation(GtkWidget *widget, GtkAllocation *allocation);
+gboolean nsgtk_icon_size_lookup_for_settings (GtkSettings *settings, GtkIconSize size, gint *width, gint *height);
+
GtkAdjustment *nsgtk_layout_get_vadjustment(GtkLayout *layout);
GtkAdjustment *nsgtk_layout_get_hadjustment(GtkLayout *layout);
void nsgtk_layout_set_hadjustment(GtkLayout *layout, GtkAdjustment *adj);
diff --git a/gtk/tabs.c b/gtk/tabs.c
index 75e3a03f2..f69966c8d 100644
--- a/gtk/tabs.c
+++ b/gtk/tabs.c
@@ -53,7 +53,7 @@ static void nsgtk_tab_update_size(GtkWidget *hbox, GtkStyle *previous_style,
char_width = pango_font_metrics_get_approximate_digit_width(metrics);
pango_font_metrics_unref(metrics);
- gtk_icon_size_lookup_for_settings(gtk_widget_get_settings (hbox),
+ nsgtk_icon_size_lookup_for_settings(gtk_widget_get_settings (hbox),
GTK_ICON_SIZE_MENU, &w, &h);
gtk_widget_set_size_request(hbox,