diff options
author | lukefromdc <[email protected]> | 2016-11-22 15:02:51 -0500 |
---|---|---|
committer | lukefromdc <[email protected]> | 2016-11-22 15:02:51 -0500 |
commit | 276eb145ce96d5f75f8d3901daf6310f60ddbb81 (patch) | |
tree | 544f41e76c9a91973867065696fc2e414ca60170 /eel/eel-gdk-pixbuf-extensions.c | |
parent | 969e4d021fe49654fe6e5ee7e88c920fec126505 (diff) | |
download | caja-276eb145ce96d5f75f8d3901daf6310f60ddbb81.tar.bz2 caja-276eb145ce96d5f75f8d3901daf6310f60ddbb81.tar.xz |
move to GTK+3 (>= 3.14), drop libunique, GTK+2 code, and --with-gtk build option
*Remove GTK_VERSION_CHECK (3, 0, 0) and libunique selectors
*Remove GTK2 and libunique specific code.
*Leaves selector for specific GTK3 versions.
*Remove #DEFINES for vbox/hbox previously required for GTK2 compatability
*Keep vbox in caja-spatial-window.c, it is necessary for the desktop to work
*spatial-window vbox issue at https://github.com/mate-desktop/caja/issues/591
Diffstat (limited to 'eel/eel-gdk-pixbuf-extensions.c')
-rw-r--r-- | eel/eel-gdk-pixbuf-extensions.c | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/eel/eel-gdk-pixbuf-extensions.c b/eel/eel-gdk-pixbuf-extensions.c index bbbffc3a..f86ad086 100644 --- a/eel/eel-gdk-pixbuf-extensions.c +++ b/eel/eel-gdk-pixbuf-extensions.c @@ -622,11 +622,7 @@ eel_gdk_pixbuf_unref_if_not_null (GdkPixbuf *pixbuf_or_null) void eel_gdk_pixbuf_draw_to_drawable (const GdkPixbuf *pixbuf, -#if GTK_CHECK_VERSION (3, 0, 0) cairo_t *cr, -#else - GdkDrawable *drawable, -#endif int source_x, int source_y, EelIRect destination_area) @@ -638,16 +634,10 @@ eel_gdk_pixbuf_draw_to_drawable (const GdkPixbuf *pixbuf, int target_height; int source_width; int source_height; -#if !GTK_CHECK_VERSION (3, 0, 0) - cairo_t *cr; -#endif g_return_if_fail (eel_gdk_pixbuf_is_valid (pixbuf)); -#if GTK_CHECK_VERSION (3, 0, 0) g_return_if_fail (cr != NULL); -#else - g_return_if_fail (drawable != NULL); -#endif + g_return_if_fail (!eel_irect_is_empty (&destination_area)); dimensions = eel_gdk_pixbuf_get_dimensions (pixbuf); @@ -683,9 +673,6 @@ eel_gdk_pixbuf_draw_to_drawable (const GdkPixbuf *pixbuf, target.x1 = target.x0 + MIN (target_width, source_width); target.y1 = target.y0 + MIN (target_height, source_height); -#if !GTK_CHECK_VERSION (3, 0, 0) - cr = gdk_cairo_create (drawable); -#endif gdk_cairo_set_source_pixbuf (cr, (GdkPixbuf *) pixbuf, source.x0 - target.x0, source.y0 - target.y0); cairo_rectangle (cr, target.x0, target.y0, @@ -1265,11 +1252,8 @@ eel_gdk_pixbuf_render (GdkPixbuf *pixbuf, guint saturation, guint brightness, guint lighten_value, -#if GTK_CHECK_VERSION(3,0,0) GdkRGBA *color) -#else - guint color) -#endif + { GdkPixbuf *temp_pixbuf, *old_pixbuf; @@ -1281,27 +1265,14 @@ eel_gdk_pixbuf_render (GdkPixbuf *pixbuf, else if (render_mode == 2) { /* colorize icon */ -#if GTK_CHECK_VERSION(3,0,0) temp_pixbuf = eel_create_colorized_pixbuf (pixbuf, color); -#else - temp_pixbuf = eel_create_colorized_pixbuf (pixbuf, - EEL_RGBA_COLOR_GET_R (color), - EEL_RGBA_COLOR_GET_G (color), - EEL_RGBA_COLOR_GET_B (color)); -#endif } else if (render_mode == 3) { /* monochromely colorize icon */ old_pixbuf = eel_create_darkened_pixbuf (pixbuf, 0, 255); -#if GTK_CHECK_VERSION(3,0,0) temp_pixbuf = eel_create_colorized_pixbuf (old_pixbuf, color); -#else - temp_pixbuf = eel_create_colorized_pixbuf (old_pixbuf, - EEL_RGBA_COLOR_GET_R (color), - EEL_RGBA_COLOR_GET_G (color), - EEL_RGBA_COLOR_GET_B (color)); -#endif + g_object_unref (old_pixbuf); } else |