changeset 834:e5cb9f4389f4

join name and sidecars to one string
author nadvornik
date Sat, 14 Jun 2008 17:32:27 +0000
parents 1d6fedb891dc
children 1014e8f72f94
files src/view_file_list.c
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/view_file_list.c	Sat Jun 14 17:14:28 2008 +0000
+++ b/src/view_file_list.c	Sat Jun 14 17:32:27 2008 +0000
@@ -725,16 +725,21 @@
 {
 	gchar *size;
 	gchar *sidecars = NULL;
+	gchar *name_sidecars;
+	
+	name_sidecars = (gchar *)fd->name;
 
 	if (fd->sidecar_files)
+		{
 		sidecars = file_data_sc_list_to_string(fd);
+		name_sidecars = g_strdup_printf("%s %s", fd->name, sidecars);
+		}
 	size = text_from_size(fd->size);
 
 	gtk_tree_store_set(store, iter, FILE_COLUMN_POINTER, fd,
 					FILE_COLUMN_VERSION, fd->version,
 					FILE_COLUMN_THUMB, fd->pixbuf,
-					FILE_COLUMN_NAME, fd->name,
-					FILE_COLUMN_SIDECARS, sidecars,
+					FILE_COLUMN_NAME, name_sidecars,
 					FILE_COLUMN_SIZE, size,
 					FILE_COLUMN_DATE, text_from_time(fd->date),
 #define STORE_SET_IS_SLOW 1
@@ -761,7 +766,10 @@
 #endif
 	g_free(size);
 	if (sidecars)
+		{
 		g_free(sidecars);
+		g_free(name_sidecars);
+		}
 }
 
 static void vflist_setup_iter_recursive(ViewFile *vf, GtkTreeStore *store, GtkTreeIter *parent_iter, GList *list, GList *selected)
@@ -1871,7 +1879,7 @@
 	for (i = 0; i < FILEDATA_MARKS_SIZE; i++)
     		vflist_listview_add_column_toggle(vf, i + FILE_COLUMN_MARKS, "");
 
-	vflist_listview_add_column(vf, FILE_COLUMN_NAME, _("Name"), FALSE, FALSE, FALSE);
+	vflist_listview_add_column(vf, FILE_COLUMN_NAME, _("Name"), FALSE, FALSE, TRUE);
 	vflist_listview_add_column(vf, FILE_COLUMN_SIDECARS, _("SC"), FALSE, FALSE, FALSE);
 
 	vflist_listview_add_column(vf, FILE_COLUMN_SIZE, _("Size"), FALSE, TRUE, FALSE);