Re: RecentManager and win32



Emmanuele Bassi writes:
 > Win32[1] has its own Most Recently Used list. It is stored inside the
 > registry, in a per-application sub-tree; that is: each application
 > directory has its own MRU list.

The docs for SHAddToRecentDocs() doesn't mention that? Or is there
some other API to maintain this per-app MRU list?

Have you BTW found any API to query what SHAddToRecentDocs() stores?
Or should one just call SHGetSpecialFolderPath(CSIDL_RECENT) and then
scan that folder?

 > 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.

Although not documented, googling indicates that SHAddToRecentDocs()
only adds files that have an extension that is registered. So if you
use some GTK+ application to save some document with a random foo.bar
name, this won't get saved in the Recent Documents list. Oh well, this
is understandable, since Windows would have no way of knowing what to
open the foo.bar with.

This brings up the idea, if the RecentManager API is given meta-data
that tells what app should be used to open a document that is being
saved in the MRU list, and that document has an extension that is not
registered, should it then go ahead and register that extension
automatically associating it with the given application? Probably not,
that might be a bit too automatic. (But should there be a
platform-independent API to wrap this kind of functionality, querying
registered types (extensions) and registering new ones? Or is there
already?)

--tml




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