Re: RecentManager and win32



Hi James,

On 10/3/05, James Henstridge <james jamesh id au> wrote:
> Emmanuele Bassi wrote:
>
> >* Strategy
> >==========
> >
> >Obviously, we can't have two APIs, so the best thing that I could come
> >up with was:
> >
> >1. we use, for the recently used resources list, the same storage system
> >on both Unix *and* win32: a dot file inside $HOME, which stores
> >everything using an XBEL dialect;
> >
> >2. plus, protected by arch-dependent #ifdefs, when we register every new
> >item inside *ours* recently used resources list, we also register it
> >inside windows' MRU list, using the win32 shell API.
> >
> >By doing this, we keep the same meta-data on both archs, but we make
> >windows aware of what we are registering.
> >
> >
> With this scheme, what do you do if the two recent files lists are out
> of sync?  Which one is considered correct in such a case?

Since there's no common way to programmatically access the Recent
Documents list (except, as written by Tor, list the directory
contents), Gtk applications would only access the gtk recent files
list, which should be considered, at all effects, as an "extended
MRUList", not stored inside the win32 register...

> If you treat the XML file as canonical, how do applications find out
> about new items added by native Windows applications?

As far as I can see on MSDN, no application has access to recently
used files registered by other applications.

Global recently used files are activated using the default MIME type handler.

> If you try to merge the two lists, how do you remove items from the list?

I'm not trying to merge the two list: these list are separated, and
they are supposed to be.

But they are separated for every win32 application; every win32 app
register an item *twice*: one inside the Recent Documents global list,
and one inside its own MRUList. Applications have access to their own
MRUList - the global Recent Documents directory is handled by the
shell.

Just to be sure: try and open a new file inside a win32 application -
say Word; then, clear the Recent Documents contents.  Open Word again,
and you should see that the file is still listed inside the File menu,
even though the global Recent Documents list is empty[1].

So, when a Gtk application registers a new recent file, it will
register it in two list: the list held by the RecentManager, and the
list held by the win32 shell.

This is what I inferred from the API documentation on MSDN. If I'm
mistaken, I'd like a pointer to something else that explains how
recently used documents works on win32.

+++

[1] This is totally braindead.  I wouldn't believe it myself, when I tried it.

Regards,
 Emmanuele.

--
It is against the grain of modern education to teach children to program.
What fun is there in making plans, acquiring discipline in organizing
thoughts, devoting attention to detail, and learning to be self-critical?
                -- Alan Perlis



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