diff src/view_dir_list.c @ 373:61a3c8b05b24

Add a new option in Preferences > Filtering to allow the user to choose to display '.' directory in folder lists or not. This option is saved to rc file as file_filter.show_dot_directory. A minor fix was made to disable display of .. in folder selection dialogs when current path is /.
author zas_
date Tue, 15 Apr 2008 20:36:11 +0000
parents 673d1eb5af73
children 5afe77bb563a
line wrap: on
line diff
--- a/src/view_dir_list.c	Tue Apr 15 20:00:27 2008 +0000
+++ b/src/view_dir_list.c	Tue Apr 15 20:36:11 2008 +0000
@@ -861,10 +861,14 @@
 		vdl->list = g_list_prepend(vdl->list, fd);
 		g_free(filepath);
 		}
-	filepath = g_strconcat(vdl->path, "/", ".", NULL); 
-	fd = file_data_new_simple(filepath);
-	vdl->list = g_list_prepend(vdl->list, fd);
-	g_free(filepath);
+	
+	if (options->file_filter.show_dot_directory)
+		{
+		filepath = g_strconcat(vdl->path, "/", ".", NULL); 
+		fd = file_data_new_simple(filepath);
+		vdl->list = g_list_prepend(vdl->list, fd);
+		g_free(filepath);
+	}
 
 	vdlist_populate(vdl);