Re: GIcon thoughts

2008-01-16 Thread Alexander Larsson
On Tue, 2008-01-15 at 21:59 -0500, Matthias Clasen wrote: > I have committed the stream i/o api in gdk-pixbuf now, after adding > GCancellable arguments > and removing the closing of the streams, since that seemed pretty > uncontroversial. > > Here are new versions of the resurrect-pixbuf and ico

Re: GIcon thoughts

2008-01-15 Thread Matthias Clasen
I have committed the stream i/o api in gdk-pixbuf now, after adding GCancellable arguments and removing the closing of the streams, since that seemed pretty uncontroversial. Here are new versions of the resurrect-pixbuf and iconinfo patches. I have added a iconinfo-from-pixbuf function. Caching i

Re: GIcon thoughts

2008-01-14 Thread Tim Janik
On Mon, 14 Jan 2008, Alexander Larsson wrote: > On Mon, 2008-01-14 at 10:12 +0100, Tim Janik wrote: >>> Of course, this is slightly harder, as GdkPixbuf is a public GObject >>> where we can't use toggle references. We could however implement this >>> with some help from the GdkPixbuf implementati

Re: GIcon thoughts

2008-01-14 Thread Alexander Larsson
On Mon, 2008-01-14 at 10:12 +0100, Tim Janik wrote: > On Thu, 10 Jan 2008, Alexander Larsson wrote: > > > On Wed, 2008-01-09 at 13:53 -0500, Matthias Clasen wrote: > > >> We can't implement the cache using toggle references for 2 reasons: > >> a) GtkIconSize is a boxed, not an object > >> b) tog

Re: GIcon thoughts

2008-01-14 Thread Tim Janik
On Thu, 10 Jan 2008, Alexander Larsson wrote: > On Wed, 2008-01-09 at 13:53 -0500, Matthias Clasen wrote: >> We can't implement the cache using toggle references for 2 reasons: >> a) GtkIconSize is a boxed, not an object >> b) toggle references only work for a single user, thus they have >>to

Re: GIcon thoughts

2008-01-14 Thread Alexander Larsson
On Sun, 2008-01-13 at 22:13 -0500, Matthias Clasen wrote: > gboolean > gdk_pixbuf_save_to_stream(GdkPixbuf *pixbuf, > GOutputStream *stream, > const char *type, >

Re: GIcon thoughts

2008-01-13 Thread Matthias Clasen
Here are some initial patches for discussion. The first adds stream support to gdk-pixbuf: GdkPixbuf * gdk_pixbuf_new_from_stream (GInputStream *stream, GError**error); GdkPixbuf * gdk_pixbuf_new_from_stream_at_scale (GInputStream *stream,

Re: GIcon thoughts

2008-01-11 Thread Matthias Clasen
On Jan 10, 2008 5:16 AM, Alexander Larsson <[EMAIL PROTECTED]> wrote: > > > GdkPixbuf * > > gtk_icon_info_load_at_size (GtkIconInfo *info, > > gint pixel_size); > > > > Since this does I/O it would be nice if it took a GCancellable argument. > However, that might

Re: GIcon thoughts

2008-01-10 Thread Alexander Larsson
On Wed, 2008-01-09 at 13:53 -0500, Matthias Clasen wrote: > This leaves GIcon support, pixel sizes and caching. Concrete API > additions could look as follows: That sounds like a good plan to me. > /* Creates a new GtkIconInfo for a fixed pixbuf - this is not > * really necessary as API, but it

GIcon thoughts

2008-01-09 Thread Matthias Clasen
One of the items on http://live.gnome.org/GioTodo is "GIcon renderer", so I started to think a bit about how that could look like. Alex' pointed me at NautilusIconInfo for ideas. Looking at that, it is somewhat similar in spirit to GtkIconInfo, with some differences: - supports lookup by GIcon in