summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-09 16:12:35 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-13 15:05:42 +0100
commitb1350c6d63250d5ecfab95804c1bb7f5eeefe29f (patch)
treee628a2563ba5091c394c4cf3e7b6508f9669d8e9
parent8d89b454e7eb52922b2ca3847c0ac909b352e67f (diff)
downloadcaja-b1350c6d63250d5ecfab95804c1bb7f5eeefe29f.tar.bz2
caja-b1350c6d63250d5ecfab95804c1bb7f5eeefe29f.tar.xz
GTK3 general: use eel_create_spotlight_pixbuf()
taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=8b13a04
-rw-r--r--src/caja-places-sidebar.c9
-rw-r--r--src/file-manager/fm-list-model.c8
-rw-r--r--src/file-manager/fm-tree-model.c8
3 files changed, 25 insertions, 0 deletions
diff --git a/src/caja-places-sidebar.c b/src/caja-places-sidebar.c
index ce7bccdf..0fdeb9e3 100644
--- a/src/caja-places-sidebar.c
+++ b/src/caja-places-sidebar.c
@@ -27,9 +27,14 @@
#include <eel/eel-debug.h>
#include <eel/eel-gtk-extensions.h>
#include <eel/eel-glib-extensions.h>
+#if GTK_CHECK_VERSION(3,0,0)
+#include <eel/eel-graphic-effects.h>
+#endif
#include <eel/eel-string.h>
#include <eel/eel-stock-dialogs.h>
+#if !GTK_CHECK_VERSION(3,0,0)
#include <eel/eel-gdk-pixbuf-extensions.h>
+#endif
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
@@ -244,7 +249,11 @@ get_eject_icon (gboolean highlighted)
if (highlighted) {
GdkPixbuf *high;
+#if GTK_CHECK_VERSION(3,0,0)
+ high = eel_create_spotlight_pixbuf (eject);
+#else
high = eel_gdk_pixbuf_render (eject, 1, 255, 255, 0, 0);
+#endif
g_object_unref (eject);
eject = high;
}
diff --git a/src/file-manager/fm-list-model.c b/src/file-manager/fm-list-model.c
index 6a1692f4..1bf2d599 100644
--- a/src/file-manager/fm-list-model.c
+++ b/src/file-manager/fm-list-model.c
@@ -29,7 +29,11 @@
#include <libegg/eggtreemultidnd.h>
#include <string.h>
+#if GTK_CHECK_VERSION(3,0,0)
+#include <eel/eel-graphic-effects.h>
+#else
#include <eel/eel-gdk-pixbuf-extensions.h>
+#endif
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libcaja-private/caja-dnd.h>
@@ -386,7 +390,11 @@ fm_list_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, int column
g_list_find_custom (model->details->highlight_files,
file, (GCompareFunc) caja_file_compare_location))
{
+#if GTK_CHECK_VERSION(3,0,0)
+ rendered_icon = eel_create_spotlight_pixbuf (icon);
+#else
rendered_icon = eel_gdk_pixbuf_render (icon, 1, 255, 255, 0, 0);
+#endif
if (rendered_icon != NULL)
{
diff --git a/src/file-manager/fm-tree-model.c b/src/file-manager/fm-tree-model.c
index 504dd89a..039a1ef8 100644
--- a/src/file-manager/fm-tree-model.c
+++ b/src/file-manager/fm-tree-model.c
@@ -29,7 +29,11 @@
#include <config.h>
#include "fm-tree-model.h"
+#if GTK_CHECK_VERSION(3,0,0)
+#include <eel/eel-graphic-effects.h>
+#else
#include <eel/eel-gdk-pixbuf-extensions.h>
+#endif
#include <glib/gi18n.h>
#include <libcaja-private/caja-directory.h>
#include <libcaja-private/caja-file-attributes.h>
@@ -332,7 +336,11 @@ get_menu_icon_for_file (TreeNode *node,
if (highlight)
{
+#if GTK_CHECK_VERSION(3,0,0)
+ pixbuf = eel_create_spotlight_pixbuf (retval);
+#else
pixbuf = eel_gdk_pixbuf_render (retval, 1, 255, 255, 0, 0);
+#endif
if (pixbuf != NULL)
{