comparison src/view_file_list.c @ 1242:187e6096cc6c

show symlinks in filelist
author nadvornik
date Sun, 11 Jan 2009 21:28:03 +0000
parents 947e603a52c6
children 3814f5828376
comparison
equal deleted inserted replaced
1241:8cb82b33cab8 1242:187e6096cc6c
781 gchar *size; 781 gchar *size;
782 gchar *sidecars = NULL; 782 gchar *sidecars = NULL;
783 gchar *name_sidecars; 783 gchar *name_sidecars;
784 gchar *multiline; 784 gchar *multiline;
785 const gchar *time = text_from_time(fd->date); 785 const gchar *time = text_from_time(fd->date);
786 name_sidecars = (gchar *)fd->name; 786 gchar *link = islink(fd->path) ? GQ_LINK_STR : "";
787
787 788
788 if (fd->sidecar_files) 789 if (fd->sidecar_files)
789 { 790 {
790 sidecars = file_data_sc_list_to_string(fd); 791 sidecars = file_data_sc_list_to_string(fd);
791 name_sidecars = g_strdup_printf("%s %s", fd->name, sidecars); 792 name_sidecars = g_strdup_printf("%s%s %s", link, fd->name, sidecars);
793 }
794 else
795 {
796 name_sidecars = g_strdup_printf("%s%s", link, fd->name);
792 } 797 }
793 size = text_from_size(fd->size); 798 size = text_from_size(fd->size);
794 799
795 multiline = g_strdup_printf("%s\n%s\n%s", name_sidecars, size, time); 800 multiline = g_strdup_printf("%s\n%s\n%s", name_sidecars, size, time);
796 801
822 for (i = 0; i < FILEDATA_MARKS_SIZE; i++) 827 for (i = 0; i < FILEDATA_MARKS_SIZE; i++)
823 gtk_tree_store_set(store, iter, FILE_COLUMN_MARKS + i, file_data_get_mark(fd, i), -1); 828 gtk_tree_store_set(store, iter, FILE_COLUMN_MARKS + i, file_data_get_mark(fd, i), -1);
824 } 829 }
825 #endif 830 #endif
826 g_free(size); 831 g_free(size);
827 if (sidecars) 832 g_free(sidecars);
828 { 833 g_free(name_sidecars);
829 g_free(sidecars);
830 g_free(name_sidecars);
831 }
832 g_free(multiline); 834 g_free(multiline);
833 } 835 }
834 836
835 static void vflist_setup_iter_recursive(ViewFile *vf, GtkTreeStore *store, GtkTreeIter *parent_iter, GList *list, GList *selected) 837 static void vflist_setup_iter_recursive(ViewFile *vf, GtkTreeStore *store, GtkTreeIter *parent_iter, GList *list, GList *selected)
836 { 838 {