[PATCH] Show "No subfolders" in tree view instead of "empty" when only showing folders



The attached patch fixes the most urgent portion of bug 85141 [1].

[1] http://bugzilla.gnome.org/show_bug.cgi?id=85141

-- 
Christian Neumair <chris gnome-de org>
Index: src/file-manager/fm-tree-model.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-tree-model.c,v
retrieving revision 1.4
diff -u -r1.4 fm-tree-model.c
--- src/file-manager/fm-tree-model.c	16 Apr 2004 12:26:31 -0000	1.4
+++ src/file-manager/fm-tree-model.c	24 Jul 2004 11:40:31 -0000
@@ -1184,10 +1184,12 @@
 fm_tree_model_get_value (GtkTreeModel *model, GtkTreeIter *iter, int column, GValue *value)
 {
 	TreeNode *node, *parent;
+	FMTreeModel *fm_model;
 
 	g_return_if_fail (FM_IS_TREE_MODEL (model));
 	g_return_if_fail (iter_is_valid (FM_TREE_MODEL (model), iter));
-	
+
+	fm_model = FM_TREE_MODEL (model);
 	node = iter->user_data;
 
 	switch (column) {
@@ -1196,7 +1198,10 @@
 		if (node == NULL) {
 			parent = iter->user_data2;
 			g_value_set_static_string (value, parent->done_loading
-						   ? _("(Empty)") : _("Loading..."));
+							  ? fm_model->details->show_only_directories
+							    ? _("(No subfolders)")
+							    : _("(Empty)")
+							  : _("Loading..."));
 		} else {
 			g_value_set_string (value, tree_node_get_display_name (node));
 		}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]