changeset 555:cca1c3b1b948

Set thumbs_enabled through new function vflist_thumbs_set() instead of vflist_new().
author zas_
date Sat, 03 May 2008 10:31:37 +0000
parents 2da72a136070
children fe675761d091
files src/layout.c src/view_file_list.c src/view_file_list.h
diffstat 3 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/layout.c	Sat May 03 09:41:09 2008 +0000
+++ b/src/layout.c	Sat May 03 10:31:37 2008 +0000
@@ -754,13 +754,14 @@
 		return lw->vfi->widget;
 		}
 
-	lw->vfl = vflist_new(NULL, lw->thumbs_enabled);
+	lw->vfl = vflist_new(NULL);
 	vflist_set_layout(lw->vfl, lw);
 
 	vflist_set_status_func(lw->vfl, layout_list_status_cb, lw);
 	vflist_set_thumb_status_func(lw->vfl, layout_list_thumb_cb, lw);
 
 	vflist_marks_set(lw->vfl, lw->marks_enabled);
+	vflist_thumbs_set(lw->vfl, lw->thumbs_enabled);
 
 	return lw->vfl->widget;
 }
--- a/src/view_file_list.c	Sat May 03 09:41:09 2008 +0000
+++ b/src/view_file_list.c	Sat May 03 10:31:37 2008 +0000
@@ -1981,7 +1981,12 @@
 	g_free(vfl);
 }
 
-ViewFileList *vflist_new(const gchar *path, gint thumbs)
+void vflist_thumbs_set(ViewFileList *vfl, gint enabled)
+{
+	vfl->thumbs_enabled = enabled; 
+}
+
+ViewFileList *vflist_new(const gchar *path)
 {
 	ViewFileList *vfl;
 	GtkTreeStore *store;
@@ -1998,7 +2003,7 @@
 	vfl->select_fd = NULL;
 	vfl->sort_method = SORT_NAME;
 	vfl->sort_ascend = TRUE;
-	vfl->thumbs_enabled = thumbs;
+	vfl->thumbs_enabled = FALSE;
 
 	vfl->thumbs_running = FALSE;
 	vfl->thumbs_count = 0;
--- a/src/view_file_list.h	Sat May 03 09:41:09 2008 +0000
+++ b/src/view_file_list.h	Sat May 03 10:31:37 2008 +0000
@@ -16,8 +16,9 @@
 
 #include "filelist.h"
 
+void vflist_thumbs_set(ViewFileList *vfl, gint enabled);
 
-ViewFileList *vflist_new(const gchar *path, gint thumbs);
+ViewFileList *vflist_new(const gchar *path);
 
 void vflist_set_status_func(ViewFileList *vfl,
 			    void (*func)(ViewFileList *vfl, gpointer data), gpointer data);