From 52d9b7024689d1f2f5d9932d8bee5cb6e25ce88b Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 21 Mar 2010 01:14:13 +0100 Subject: Move configuration options to the walls_config_t. This closes feature #7. --- preload.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'preload.c') diff --git a/preload.c b/preload.c index 62664cf..a287471 100644 --- a/preload.c +++ b/preload.c @@ -6,8 +6,6 @@ #include "wallpapers.h" #include "walls_conf.h" -guint preload_max = 2; - static gboolean preload_thread_exit = FALSE; static GHashTable *hashtable = NULL; static GMutex *preload_hashtable_mutex = NULL, *preload_thread_mutex = NULL; @@ -34,7 +32,6 @@ static void preload_hash_table_free(gpointer data) { } void preload_init() { - preload_max = conf_get_int("walls", "max_preload", 2); preload_hashtable_mutex = g_mutex_new(); preload_thread_mutex = g_mutex_new(); @@ -106,7 +103,7 @@ static GArray *preload_prepare_data(GtkWidget *thumbview) { g_array_append_val(array, filename); } - for(gint i = 0; i < preload_max; i++) { + for(gint i = 0; i < config.max_preload; i++) { /* Make sure the selected pixbuf is also preloaded. */ if(array->len == 0 && gtk_tree_model_get_iter(model, &iter, sel_path)) { gtk_tree_model_get_value(model, &iter, 1, &value); -- cgit v1.2.3