You are not logged in.

#1 2012-06-22 20:44:52

meszka
Member
From: Poznań, Poland
Registered: 2010-07-18
Posts: 7

[SOLVED] PCManFM symlink icon

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

#2 2012-06-22 22:07:22

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] PCManFM symlink icon

This one emblem_symbolic_link.png? It's at /usr/share/icons/gnome/8x8/emblems/emblem-symbolic-link.png

Offline

#3 2012-06-22 23:34:57

meszka
Member
From: Poznań, Poland
Registered: 2010-07-18
Posts: 7

Re: [SOLVED] PCManFM symlink icon

Nope, it looks like this:
pcmanfm_symlink.png
And it's the same icon regardless what gtk icon theme I have set.

Offline

#4 2012-06-23 00:20:41

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] PCManFM symlink icon

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

#5 2012-07-02 15:40:55

meszka
Member
From: Poznań, Poland
Registered: 2010-07-18
Posts: 7

Re: [SOLVED] PCManFM symlink icon

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);
     }
     else

It 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

Board footer

Powered by FluxBB