Re: Built in themed icons
- From: Owen Taylor <otaylor redhat com>
- To: "J. Ali Harlow" <ali optosun7 city ac uk>
- Cc: gtk-devel-list gnome org
- Subject: Re: Built in themed icons
- Date: 11 May 2003 08:21:12 -0400
On Sun, 2003-05-11 at 02:06, J. Ali Harlow wrote:
> On 2003.05.11 03:46 Owen Taylor wrote:
>
> > Thinking about it, really the answer is just to do things right,
> > instead of hacking around.
> >
> >
> > char *gtk_icon_theme_lookup_icon (GtkIconTheme *theme,
> > const gchar *icon_name,
> > gint size,
> > GtkIconLookupFlags flags,
> > G_CONST_RETURN GtkIconData **icon_data,
> > gint
> > *base_size);
> >
> > Should be redone as:
> >
> > GtkIconInfo *gtk_icon_theme_lookup_icon (GtkIconTheme *theme
> > const gchar *icon_name,
> > GtkIconLookupFlags flags)
> Looks good to me. Have I missed something or has the functionality
> changed though - in your first proposal the caller was able to
> specify a size and your notes implied that the icon would be
> scaled appropriately. I don't see a way of doing that in this
> proposed API so presumably the caller would have to scale the
> icon themselves.
The size just got dropped off inadvertently, there should be a
'gint size' parameter above, since size affects the lookup.
That being said, this is a meant as a raw 'look up the icon source'
call, and the original API has a separate:
gtk_icon_theme_load_icon()
that actually loads filenames and scaled as appropriate. I suppose
we could add a load() onto GtkIconInfo * as well, though:
GtkIconInfo *info = gtk_icon_theme_lookup_icon (theme, name, size, 0);
GdkPixbuf *pixbuf = gtk_icon_info_load_icon (info);
gdk_icon_info_free (info);
Is clumsy enough that a convenience function is likely warranted.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]