From dcaa329c797fd6a716ab5e24aefe27c6cb989f32 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Mon, 14 Dec 2015 19:05:16 +0100 Subject: GTK3: don't use deprecated gtk_icon_size_lookup_for_settings --- cut-n-paste/toolbar-editor/egg-toolbar-editor.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cut-n-paste/toolbar-editor/egg-toolbar-editor.c') diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c index e616443..fb547d2 100644 --- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c +++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c @@ -407,18 +407,26 @@ event_box_realize_cb (GtkWidget *widget, GtkImage *icon) const gchar *icon_name; GdkScreen *screen; GtkIconTheme *icon_theme; +#if !GTK_CHECK_VERSION (3, 0, 0) GtkSettings *settings; +#endif gint width, height; GdkPixbuf *pixbuf; gtk_image_get_icon_name (icon, &icon_name, NULL); screen = gtk_widget_get_screen (widget); icon_theme = gtk_icon_theme_get_for_screen (screen); +#if GTK_CHECK_VERSION (3, 0, 0) + + if (!gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, + &width, &height)) +#else settings = gtk_settings_get_for_screen (screen); if (!gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_LARGE_TOOLBAR, - &width, &height)) + &width, &height)) +#endif { width = height = 24; } -- cgit v1.2.1