Re: gnome-vfs circular build dependency



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]