glib r7056 - trunk/gio
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7056 - trunk/gio
- Date: Thu, 19 Jun 2008 03:30:17 +0000 (UTC)
Author: matthiasc
Date: Thu Jun 19 03:30:17 2008
New Revision: 7056
URL: http://svn.gnome.org/viewvc/glib?rev=7056&view=rev
Log:
* glocalfileinfo.c: Don't do fallback for user-home and user-desktop
to avoid problems with partial icon themes.
Modified:
trunk/gio/ChangeLog
trunk/gio/glocalfileinfo.c
Modified: trunk/gio/glocalfileinfo.c
==============================================================================
--- trunk/gio/glocalfileinfo.c (original)
+++ trunk/gio/glocalfileinfo.c Thu Jun 19 03:30:17 2008
@@ -1465,7 +1465,6 @@
is_symlink = FALSE;
#endif
symlink_broken = FALSE;
-
#ifdef S_ISLNK
if (is_symlink)
{
@@ -1565,18 +1564,17 @@
{
GIcon *icon;
- icon = g_content_type_get_icon (content_type);
- if (icon != NULL)
+ if (strcmp (path, g_get_home_dir ()) == 0)
+ icon = g_themed_icon_new ("user-home");
+ else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0)
+ icon = g_themed_icon_new ("user-desktop");
+ else
{
+ icon = g_content_type_get_icon (content_type);
if (G_IS_THEMED_ICON (icon))
{
- const char *preferred_icon = NULL;
const char *type_icon = NULL;
- if (strcmp (path, g_get_home_dir ()) == 0)
- preferred_icon = "user-home";
- else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0)
- preferred_icon = "user-desktop";
if (S_ISDIR (statbuf.st_mode))
type_icon = "folder";
else if (statbuf.st_mode & S_IXUSR)
@@ -1584,12 +1582,12 @@
else
type_icon = "text-x-generic";
- if (preferred_icon)
- g_themed_icon_prepend_name (G_THEMED_ICON (icon), preferred_icon);
- if (type_icon)
- g_themed_icon_append_name (G_THEMED_ICON (icon), type_icon);
+ g_themed_icon_append_name (G_THEMED_ICON (icon), type_icon);
}
+ }
+ if (icon != NULL)
+ {
g_file_info_set_icon (info, icon);
g_object_unref (icon);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]