diff options
author | Wolfgang Ulbrich <[email protected]> | 2015-12-14 19:05:16 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <[email protected]> | 2015-12-14 19:05:16 +0100 |
commit | dcaa329c797fd6a716ab5e24aefe27c6cb989f32 (patch) | |
tree | 5c25cd8bddc32cc97e28da2d5c2335e0fe7b69f0 /cut-n-paste/toolbar-editor/egg-editable-toolbar.c | |
parent | 581b297bc57e91e624b9a3eec27bde5b14b26c79 (diff) | |
download | eom-dcaa329c797fd6a716ab5e24aefe27c6cb989f32.tar.bz2 eom-dcaa329c797fd6a716ab5e24aefe27c6cb989f32.tar.xz |
GTK3: don't use deprecated gtk_icon_size_lookup_for_settings
Diffstat (limited to 'cut-n-paste/toolbar-editor/egg-editable-toolbar.c')
-rw-r--r-- | cut-n-paste/toolbar-editor/egg-editable-toolbar.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c index 4a29a2d..9ebae01 100644 --- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c +++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c @@ -467,16 +467,24 @@ configure_item_cursor (GtkToolItem *item, { GdkScreen *screen; GtkIconTheme *icon_theme; +#if !GTK_CHECK_VERSION (3, 0, 0) GtkSettings *settings; +#endif gint width, height; 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)) +#endif { width = height = 24; } @@ -1752,10 +1760,16 @@ new_pixbuf_from_widget (GtkWidget *widget) screen = gtk_widget_get_screen (widget); +#if GTK_CHECK_VERSION (3, 0, 0) + if (!gtk_icon_size_lookup (GTK_ICON_SIZE_LARGE_TOOLBAR, + NULL, + &icon_height)) +#else if (!gtk_icon_size_lookup_for_settings (gtk_settings_get_for_screen (screen), - GTK_ICON_SIZE_LARGE_TOOLBAR, - NULL, - &icon_height)) + GTK_ICON_SIZE_LARGE_TOOLBAR, + NULL, + &icon_height)) +#endif { icon_height = DEFAULT_ICON_HEIGHT; } |