Mercurial > geeqie
changeset 1242:187e6096cc6c
show symlinks in filelist
author | nadvornik |
---|---|
date | Sun, 11 Jan 2009 21:28:03 +0000 |
parents | 8cb82b33cab8 |
children | 5106f40597a3 |
files | src/main.h src/view_file_icon.c src/view_file_list.c |
diffstat | 3 files changed, 19 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main.h Sun Jan 11 21:24:58 2009 +0000 +++ b/src/main.h Sun Jan 11 21:28:03 2009 +0000 @@ -117,6 +117,7 @@ "%formatted.Aperture%|%formatted.ShutterSpeed%|%formatted.ISOSpeedRating:ISO *%|%formatted.FocalLength%|%formatted.ExposureBias:* Ev%\n" \ "%formatted.Camera:40%|%formatted.Flash%" +#define GQ_LINK_STR "↗" #include "typedefs.h" #include "debug.h" #include "options.h"
--- a/src/view_file_icon.c Sun Jan 11 21:24:58 2009 +0000 +++ b/src/view_file_icon.c Sun Jan 11 21:28:03 2009 +0000 @@ -2349,13 +2349,18 @@ { if (id) { - gchar *name_sidecars = (gchar *)id->fd->name; + gchar *name_sidecars; gchar *sidecars = NULL; + gchar *link = islink(id->fd->path) ? GQ_LINK_STR : ""; if (id->fd->sidecar_files) { sidecars = file_data_sc_list_to_string(id->fd); - name_sidecars = g_strdup_printf("%s %s", id->fd->name, sidecars); + name_sidecars = g_strdup_printf("%s%s %s", link, id->fd->name, sidecars); + } + else + { + name_sidecars = g_strdup_printf("%s%s", link, id->fd->name); } g_object_set(cell, "pixbuf", id->fd->thumb_pixbuf, @@ -2367,11 +2372,8 @@ "foreground-gdk", &color_fg, "foreground-set", TRUE, "has-focus", (VFICON(vf)->focus_id == id), NULL); - if (sidecars) - { - g_free(sidecars); - g_free(name_sidecars); - } + g_free(sidecars); + g_free(name_sidecars); } else {
--- a/src/view_file_list.c Sun Jan 11 21:24:58 2009 +0000 +++ b/src/view_file_list.c Sun Jan 11 21:28:03 2009 +0000 @@ -783,12 +783,17 @@ gchar *name_sidecars; gchar *multiline; const gchar *time = text_from_time(fd->date); - name_sidecars = (gchar *)fd->name; + gchar *link = islink(fd->path) ? GQ_LINK_STR : ""; + if (fd->sidecar_files) { sidecars = file_data_sc_list_to_string(fd); - name_sidecars = g_strdup_printf("%s %s", fd->name, sidecars); + name_sidecars = g_strdup_printf("%s%s %s", link, fd->name, sidecars); + } + else + { + name_sidecars = g_strdup_printf("%s%s", link, fd->name); } size = text_from_size(fd->size); @@ -824,11 +829,8 @@ } #endif g_free(size); - if (sidecars) - { - g_free(sidecars); - g_free(name_sidecars); - } + g_free(sidecars); + g_free(name_sidecars); g_free(multiline); }