Re: gnome-vfs circular build dependency
- From: Federico Mena Quintero <federico ximian com>
- To: Alexander Larsson <alexl redhat com>
- Cc: "desktop-devel-list gnome org" <desktop-devel-list gnome org>
- Subject: Re: gnome-vfs circular build dependency
- Date: Fri, 20 Feb 2004 11:30:43 -0600
On Thu, 2004-02-19 at 01:04, Alexander Larsson wrote:
> No. They are different things. gnome_icon_lookup goes from file -> icon
> name, and gtk_icon_theme goes from icon name -> pixbuf.
In GtkFileSystemUnix, ::render_icon() is implemented like this:
stat (filename, &buf);
if (S_ISBLK (buf.st_mode))
icon_name = "gnome-fs-blockdev";
else if (S_ISDIR (buf.st_mode))
icon_name = "gnome-fs-directory";
else if (...)
...
else {
mime_type = xdg_mime_get_mime_type_for_file (filename);
if (mime_type)
icon_name = g_strconcat ("gnome-mime-", deslashify (mime_type));
else
icon_name = "gnome-fs-regular";
}
icon = gtk_icon_theme_load_icon (icon_theme, icon_name);
E.g. it's basically 1) figure out an icon name with "manual" magic, 2)
call gtk_icon_theme_load_icon().
Then, GtkFileSystemGnomeVFS::render_icon() is implemented as
icon_name = gnome_icon_lookup (filename);
icon = gtk_icon_theme_load_icon (icon_theme, icon_name);
That is, there is no "manual" magic. But as far as I can tell, since
GtkFileSystemGnomeVFS is not using a thumbnail factory or anything
special, this *should* give the same results, shouldn't it?
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]