diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-03-21 01:14:13 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-03-21 01:14:13 +0100 |
commit | 52d9b7024689d1f2f5d9932d8bee5cb6e25ce88b (patch) | |
tree | 012b8e74d51949d3585814c1b933bcb5828975ce /wallpapers.c | |
parent | 5ebed0cd5dc2eb2f71e18b24148903f3c10ebf69 (diff) |
Move configuration options to the walls_config_t.
This closes feature #7.
Diffstat (limited to 'wallpapers.c')
-rw-r--r-- | wallpapers.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/wallpapers.c b/wallpapers.c index bc907d5..b5c7994 100644 --- a/wallpapers.c +++ b/wallpapers.c @@ -12,8 +12,7 @@ #include <gdk-pixbuf/gdk-pixbuf.h> #include "wallpapers.h" - -GdkInterpType interp_type = GDK_INTERP_NEAREST; +#include "walls_conf.h" gboolean wallpapers_add_dir(const gchar *path, sqlite_uint64 parent, GtkStatusbar *statusbar, gboolean recursive ) { static guint context_id = 0; @@ -212,7 +211,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, interp_type); + gdk_pixbuf_scale(orig, pb, 0, 0, width, height, 0, 0, scalex, scaley, config.interp_type); } else { width = img_width; height = img_height; @@ -237,6 +236,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, interp_type); + (gdouble)width / (gdouble)img_width, (gdouble)height / (gdouble)img_height, config.interp_type); return pb; } |