Re: EggRecent [was Re: libomelette [was Re: glib unicode regular expression api]]



On Wed, 2004-07-07 at 19:19 -0500, Federico Mena Quintero wrote:
<snip>
> 
> Also, in the very near future I would like to add a list of recent-files
> to GtkFileChooser.  It makes no sense to have that available everywhere
> but *the* file chooser itself!  This means we need the EggRecent stuff
> at the Glib level, or possibly GTK+.

I think it would be pretty cool to have this in the filesel.

> 
> In any case, we should clean up the EggRecent API a bit:
> 
> - egg_recent_model_add() is rather useless as it doesn't set a group for
> the new item.  So, your File menu can't have those items in it.

The original use case for this, was that apps would filter based on mime
type for the File menu, instead of relying on stuff being in a specific
group.  So this function was a bit less than useful for that :)

> 
> - egg_recent_item_get_uri_utf8() makes no sense.  URIs are, by
> definition, in ASCII.  In contrast, egg_recent_item_get_uri_for_display
> () does make sense, as gnome-vfs may unescape it and such.
> 

Yeah, get_uri_utf8 is on crack.

> - EggRecentItem is a boxed type, not a GObject, so it has its own ref()
> and unref() functions.  These are registered correctly, so why do we
> need to expose them?  E.g. can't one just use g_object_ref()/unref() on
> EggRecentItem rather than custom functions?

Can you use g_object_ref/unref on boxed types?  I thought you had to use
g_boxed_copy or something, which just seems ugly.  I mostly added the
boxed type stuff for bindings.

As we discussed on irc, there are some deps and stuff that would take
some work to remove in order to make the recent-files stuff suitable for
inclusion in glib/gtk.  Most notable is the use of gnome-vfs (for mime
type detection and file monitoring).

Thanks,
James





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]