Fixup deprication of gtk_icon_size_lookup_for_settings in gtk 3.10
This commit is contained in:
parent
267fb0b00e
commit
4f13cbd31c
15
gtk/compat.c
15
gtk/compat.c
|
@ -506,6 +506,7 @@ void nsgtk_scrolled_window_add_with_viewport(GtkScrolledWindow *window,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* exported interface documented in gtk/compat.h */
|
||||||
GtkWidget *nsgtk_image_menu_item_new_with_mnemonic(const gchar *label)
|
GtkWidget *nsgtk_image_menu_item_new_with_mnemonic(const gchar *label)
|
||||||
{
|
{
|
||||||
#if GTK_CHECK_VERSION(3,10,0)
|
#if GTK_CHECK_VERSION(3,10,0)
|
||||||
|
@ -515,9 +516,23 @@ GtkWidget *nsgtk_image_menu_item_new_with_mnemonic(const gchar *label)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* exported interface documented in gtk/compat.h */
|
||||||
void nsgtk_image_menu_item_set_image(GtkWidget *image_menu_item, GtkWidget *image)
|
void nsgtk_image_menu_item_set_image(GtkWidget *image_menu_item, GtkWidget *image)
|
||||||
{
|
{
|
||||||
#if !GTK_CHECK_VERSION(3,10,0)
|
#if !GTK_CHECK_VERSION(3,10,0)
|
||||||
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(image_menu_item), image);
|
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(image_menu_item), image);
|
||||||
#endif
|
#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
|
||||||
|
}
|
||||||
|
|
|
@ -182,6 +182,8 @@ gboolean nsgtk_show_uri(GdkScreen *screen, const gchar *uri, guint32 timestamp,
|
||||||
GdkWindow *nsgtk_layout_get_bin_window(GtkLayout *layout);
|
GdkWindow *nsgtk_layout_get_bin_window(GtkLayout *layout);
|
||||||
void nsgtk_widget_get_allocation(GtkWidget *widget, GtkAllocation *allocation);
|
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_vadjustment(GtkLayout *layout);
|
||||||
GtkAdjustment *nsgtk_layout_get_hadjustment(GtkLayout *layout);
|
GtkAdjustment *nsgtk_layout_get_hadjustment(GtkLayout *layout);
|
||||||
void nsgtk_layout_set_hadjustment(GtkLayout *layout, GtkAdjustment *adj);
|
void nsgtk_layout_set_hadjustment(GtkLayout *layout, GtkAdjustment *adj);
|
||||||
|
|
|
@ -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);
|
char_width = pango_font_metrics_get_approximate_digit_width(metrics);
|
||||||
pango_font_metrics_unref(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_ICON_SIZE_MENU, &w, &h);
|
||||||
|
|
||||||
gtk_widget_set_size_request(hbox,
|
gtk_widget_set_size_request(hbox,
|
||||||
|
|
Loading…
Reference in New Issue