Re: gnome-vfs circular build dependency
- From: Alexander Larsson <alexl redhat com>
- To: Federico Mena Quintero <federico ximian com>
- Cc: "desktop-devel-list gnome org" <desktop-devel-list gnome org>
- Subject: Re: gnome-vfs circular build dependency
- Date: 20 Feb 2004 19:16:52 +0100
On Fri, 2004-02-20 at 18:30, Federico Mena Quintero wrote:
> 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?
Duplicating this code in three places sounds less than ideal. And
shouldn't we perhaps use a thumbnail factory? Do we want to read (not
generate) thumbnails in the file selector?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's an immortal neurotic gangster on a mission from God. She's a brilliant
bisexual museum curator in the witness protection program. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]