Re: [evolution-patches] Icon Theme Patch
- From: Not Zed <notzed ximian com>
- To: Michael Terry <mike mterry name>
- Cc: Rodney Dawes <dobey ximian com>, evolution-patches ximian com
- Subject: Re: [evolution-patches] Icon Theme Patch
- Date: Tue, 20 Apr 2004 12:34:49 +0800
On Mon, 2004-04-19 at 12:44 -0400, Michael Terry wrote:
On Sun, 2004-04-18 at 23:57, Not Zed wrote:
> + if (iconpath) {
> + CamelMimePart *iconpart;
> +
> + iconpart = em_format_html_file_part((EMFormatHTML
> *)emf, "image/png", iconpath);
> + g_free (iconpath);
> + if (iconpart) {
> + char *classid;
> +
> + classid ="">
> g_strdup_printf("icon:///em-format-html-display/%s/%s",
> emf->part_id->str, comp&&comp[0]?"comp":"uncomp");
> + camel_stream_printf(stream, "<td
> align=\"left\"><img src="" classid);
> + (void)em_format_add_puri(emf,
> sizeof(EMFormatPURI), classid, iconpart, efhd_write_image);
> + g_free(classid);
> + camel_object_unref(iconpart);
> + }
> }
>
>
> For above:
> 1. we need to display something if we get no filename. does
> e-icon-theme fallback to an unthemed icon if it can't find one? do we
> have to check for null filename at all?
> 2. how can we be sure that the icon has a filename, and that it is a
> png?
> 3. in the sign icon stuff later on we don't check filename isn't null.
If a NULL filename is passed or the icon cannot be found, a blank icon
is provided. This keeps everything looking normal and allows
e_icon_factory to promise that it will always return a pixbuf of the
right size.
A blank icon isn't displaying anything, its displaying a blank. this is for a button so it needs to have content too.
I should've added too:
4. are these calls thread safe? this code runs in another thread
5. can icons be in-memory, and hence this fail entirely?
You are right though, that the icon may not be a png. To fix that, we
could use gnome-vfs to figure out the mime type. But do we have to
specify a mime type there?
Hmm, we can probably get away with leaving it i guess. It just writes the content anyway i'm not sure now that the mime type is actually used.
> - char *filename;
> + gchar *basename;
>
> use char instead of gchar everywhere in the mail code.
OK.
> Also, why are we using pixbufs? Pixmaps would be far more efficient
> for most cases.
Pixbufs are the standard object for the icon theme. I also thought that
pixmaps were somewhat deprecated.
Thats a real pity. pixbufs are very slow and heavy on remote X. But hey I guess I forgot nobody gives a shit about efficiency anymore.
> Allso there is some inconsitency with hyphens. Should they all be -
> or _ or why the different mix?
The different mix is right. Icons all use hyphens except stock icons
which use one underscore after the word stock.
Wow. Thats a stupid idea. Not only does it read ugly, its a nightmare to get it right.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]