show symlinks in filelist
authorVladimir Nadvornik <nadvornik@suse.cz>
Sun, 11 Jan 2009 21:28:03 +0000 (21:28 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Sun, 11 Jan 2009 21:28:03 +0000 (21:28 +0000)
src/main.h
src/view_file_icon.c
src/view_file_list.c

index d1070ba..549bb21 100644 (file)
                                "%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"
index a7c307c..2f9de25 100644 (file)
@@ -2349,13 +2349,18 @@ static void vficon_cell_data_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer
                {
                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 @@ static void vficon_cell_data_cb(GtkTreeViewColumn *tree_column, GtkCellRenderer
                                                "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
                        {
index 71b26ad..3b3db57 100644 (file)
@@ -783,12 +783,17 @@ static void vflist_setup_iter(ViewFile *vf, GtkTreeStore *store, GtkTreeIter *it
        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 @@ static void vflist_setup_iter(ViewFile *vf, GtkTreeStore *store, GtkTreeIter *it
        }
 #endif
        g_free(size);
-       if (sidecars)
-               {
-               g_free(sidecars);
-               g_free(name_sidecars);
-               }
+       g_free(sidecars);
+       g_free(name_sidecars);
        g_free(multiline);
 }