nautilus r13736 - in trunk: . libnautilus-private
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus r13736 - in trunk: . libnautilus-private
- Date: Wed, 13 Feb 2008 12:52:59 +0000 (GMT)
Author: alexl
Date: Wed Feb 13 12:52:59 2008
New Revision: 13736
URL: http://svn.gnome.org/viewvc/nautilus?rev=13736&view=rev
Log:
2008-02-13 Alexander Larsson <alexl redhat com>
* libnautilus-private/nautilus-link.c:
(nautilus_link_get_link_icon_from_desktop):
Strip extension from non-absolute-filename icons.
This fixes icons for some old-school desktop files.
Modified:
trunk/ChangeLog
trunk/libnautilus-private/nautilus-link.c
Modified: trunk/libnautilus-private/nautilus-link.c
==============================================================================
--- trunk/libnautilus-private/nautilus-link.c (original)
+++ trunk/libnautilus-private/nautilus-link.c Wed Feb 13 12:52:59 2008
@@ -330,7 +330,7 @@
static char *
nautilus_link_get_link_icon_from_desktop (GnomeDesktopItem *desktop_file)
{
- char *icon_uri;
+ char *icon_uri, *icon_copy, *p;
const char *icon;
GnomeDesktopItemType desktop_type;
@@ -341,7 +341,15 @@
icon = gnome_desktop_item_get_string (desktop_file, GNOME_DESKTOP_ITEM_ICON);
if (icon != NULL) {
- return g_strdup (icon);
+ icon_copy = g_strdup (icon);
+ if (!g_path_is_absolute (icon_copy)) {
+ /* Strip out any extension on non-filename icons. Old desktop files may have this */
+ p = strchr (icon_copy, '.');
+ if (p != NULL) {
+ *p = 0;
+ }
+ }
+ return icon_copy;
}
desktop_type = gnome_desktop_item_get_entry_type (desktop_file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]