summaryrefslogtreecommitdiff
path: root/cut-n-paste
diff options
context:
space:
mode:
Diffstat (limited to 'cut-n-paste')
-rw-r--r--cut-n-paste/toolbar-editor/egg-editable-toolbar.c20
-rw-r--r--cut-n-paste/toolbar-editor/egg-toolbar-editor.c10
2 files changed, 26 insertions, 4 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;
}
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;
}