You are not logged in.
I'm trying to find out what image file is being used for the little arrow icon on symbolic links in PCManFM. I'd like to overwrite it with something else (like the symlink emblem from my current icon theme). It seems like the same icon is used by SpaceFM. I tried tracking it down using strace but with no luck.
Any ideas?
Last edited by meszka (2012-07-02 15:41:19)
Offline
Nope, it looks like this:
And it's the same icon regardless what gtk icon theme I have set.
Offline
try searching for "*symbolic-link.png" with locate or find.
or drop by the SpaceFM thread and ask IgnorantGuru (the SpaceFM dev)
Last edited by 2ManyDogs (2012-06-23 01:35:29)
Offline
Ok, I found the icon hardcoded in the source code.
For pcmanfm it's actually in the libfm package, in the file src/gtk/fm-cell-renderer-pixbuf.c
For spacefm it's in src/ptk/ptk-file-icon-renderer.c
In both cases the icon is defined in an array called "link_icon_data[]".
I tried to do a quick hack to change pcmanfm's symlink icon to the emblem from the current icon theme (like in thunar).
--- libfm-0.1.17/src/gtk/fm-cell-renderer-pixbuf.c 2011-10-24 22:21:17.000000000 +0200
+++ libfm-0.1.17_mod/src/gtk/fm-cell-renderer-pixbuf.c 2012-07-02 17:34:37.770639083 +0200
@@ -20,6 +20,7 @@
*/
#include "fm-cell-renderer-pixbuf.h"
+#include "fm-icon-pixbuf.h"
static void fm_cell_renderer_pixbuf_finalize (GObject *object);
@@ -143,12 +144,11 @@
static void fm_cell_renderer_pixbuf_init(FmCellRendererPixbuf *self)
{
+ FmIcon *fm_icon;
if( !link_icon )
{
- link_icon = gdk_pixbuf_new_from_inline(
- sizeof(link_icon_data),
- link_icon_data,
- FALSE, NULL );
+ fm_icon = fm_icon_from_name("emblem-symbolic-link");
+ link_icon = fm_icon_get_pixbuf(fm_icon, 8);
g_object_add_weak_pointer((GObject*)link_icon, (gpointer)&link_icon);
}
elseIt works but the size is the same regardless of the icon size of the file so it looks a bit ugly in thumbnail mode.
Offline