From b74e3cc636dc7243d7c67a3d8b5ca451be756d4c Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 18 Sep 2003 06:18:40 +0000 Subject: Allow fully-qualified VFS icons to work in Nautilus. Obtained from: GNOME CVS git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1223 df743ca5-7f9a-e211-a948-0013205c9059 --- x11-toolkits/libgnomeui/Makefile | 1 + .../files/patch-libgnomeui_gnome-icon-lookup.c | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 x11-toolkits/libgnomeui/files/patch-libgnomeui_gnome-icon-lookup.c (limited to 'x11-toolkits/libgnomeui') diff --git a/x11-toolkits/libgnomeui/Makefile b/x11-toolkits/libgnomeui/Makefile index 48adcb363..c06e10151 100644 --- a/x11-toolkits/libgnomeui/Makefile +++ b/x11-toolkits/libgnomeui/Makefile @@ -7,6 +7,7 @@ PORTNAME= libgnomeui PORTVERSION= 2.4.0.1 +PORTREVISION= 1 CATEGORIES= x11-toolkits gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME}/2.4 diff --git a/x11-toolkits/libgnomeui/files/patch-libgnomeui_gnome-icon-lookup.c b/x11-toolkits/libgnomeui/files/patch-libgnomeui_gnome-icon-lookup.c new file mode 100644 index 000000000..ecb6739ab --- /dev/null +++ b/x11-toolkits/libgnomeui/files/patch-libgnomeui_gnome-icon-lookup.c @@ -0,0 +1,24 @@ +--- libgnomeui/gnome-icon-lookup.c.orig Thu Sep 18 02:13:50 2003 ++++ libgnomeui/gnome-icon-lookup.c Thu Sep 18 02:16:19 2003 +@@ -107,6 +107,10 @@ + + if (vfs_mime_name) + { ++ /* Handle absolute files */ ++ if (vfs_mime_name[0] == '/') ++ return g_strdup (vfs_mime_name); ++ + p = strrchr(vfs_mime_name, '.'); + + if (p) +@@ -293,7 +297,9 @@ + if (mime_type) + { + mime_name = get_vfs_mime_name (mime_type); +- if (mime_name && gnome_icon_theme_has_icon (icon_theme, mime_name)) ++ if (mime_name && ++ ((mime_name[0] == '/' && g_file_test (mime_name, G_FILE_TEST_IS_REGULAR) || ++ gnome_icon_theme_has_icon (icon_theme, mime_name)))) + return mime_name; + g_free (mime_name); + -- cgit v1.2.3