summaryrefslogtreecommitdiff
path: root/wallpapers.c
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-03-21 00:19:02 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-03-21 00:19:02 +0100
commit5ebed0cd5dc2eb2f71e18b24148903f3c10ebf69 (patch)
tree8da511b975aea9f8e8eb081993a761031a1996e2 /wallpapers.c
parentb6b63a3c51eab072483ac0c7ad07f107bb790788 (diff)
Implemented a very basic configuration dialog.
This code is a bit hackish, all configuration options should be collected in a single place (eg. a config struct) in order to easily keep track of all configuration options.
Diffstat (limited to 'wallpapers.c')
-rw-r--r--wallpapers.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/wallpapers.c b/wallpapers.c
index dbfb8a1..bc907d5 100644
--- a/wallpapers.c
+++ b/wallpapers.c
@@ -13,6 +13,8 @@
#include "wallpapers.h"
+GdkInterpType interp_type = GDK_INTERP_NEAREST;
+
gboolean wallpapers_add_dir(const gchar *path, sqlite_uint64 parent, GtkStatusbar *statusbar, gboolean recursive ) {
static guint context_id = 0;
GDir *dir;
@@ -210,7 +212,7 @@ GdkPixbuf *resize_pixbuf(GdkPixbuf *orig, gint win_width, gint win_height, gint
}
if(width == 0 || height == 0) return NULL;
pb = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height);
- gdk_pixbuf_scale(orig, pb, 0, 0, width, height, 0, 0, scalex, scaley, GDK_INTERP_BILINEAR);
+ gdk_pixbuf_scale(orig, pb, 0, 0, width, height, 0, 0, scalex, scaley, interp_type);
} else {
width = img_width;
height = img_height;
@@ -235,6 +237,6 @@ GdkPixbuf *zoom_pixbuf(GdkPixbuf *orig, gdouble zoom) {
height = img_height * zoom;
pb = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height);
gdk_pixbuf_scale(orig, pb, 0, 0, width, height, 0, 0,
- (gdouble)width / (gdouble)img_width, (gdouble)height / (gdouble)img_height, GDK_INTERP_NEAREST);
+ (gdouble)width / (gdouble)img_width, (gdouble)height / (gdouble)img_height, interp_type);
return pb;
}