Set thumbs_enabled through new function vflist_thumbs_set() instead
authorLaurent Monin <geeqie@norz.org>
Sat, 3 May 2008 10:31:37 +0000 (10:31 +0000)
committerLaurent Monin <geeqie@norz.org>
Sat, 3 May 2008 10:31:37 +0000 (10:31 +0000)
of vflist_new().

src/layout.c
src/view_file_list.c
src/view_file_list.h

index 7a67814..581883c 100644 (file)
@@ -754,13 +754,14 @@ static GtkWidget *layout_list_new(LayoutWindow *lw)
                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;
 }
index 6e40bf3..0137749 100644 (file)
@@ -1981,7 +1981,12 @@ static void vflist_destroy_cb(GtkWidget *widget, gpointer data)
        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 @@ ViewFileList *vflist_new(const gchar *path, gint thumbs)
        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;
index 9b3e586..32359b6 100644 (file)
@@ -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);