[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Open Recent... class ?
From: Rik Hemsley <rik () kde ! org>
Date: 2000-02-29 2:35:43
[Download RAW message or body]
#if Andreas Pour
> Do you think it would be a good idea to have an optional list of
> mimetypes as an argument? For example, an MP3 player would not be
> interested in opening a KWord document, and in fact it would help the
> user to see only MP3/MP2 files in the Open Recent menu . . . . Passing
> a '*' for mimetype would mean include all, and perhaps there could be
> some way to signal to list only files of the mimetypes which the program
> is registered for in its .desktop file as well, such as using 'default'
> as the Mimetype parameter . . . .
Well, what I did before, which you can't see in the code sample I
gave, was to steal the app name and use that when storing in the
central database. So your 'Open Recent' menu would only contain
files you had opened with _this_ application.
I think a mimetype option would be cool, but the question is how
to go about it.
> > A menu item called 'Open Recent' would be added to your file
> > menu, with a submenu which was automagically populated from
> > the list of recent files (stored centrally.)
> >
> > When you opened a file for the user, you called:
> > KRecentFiles::add(KURL);
>
> Here you could add an optional mimetype description (otherwise the
> library could calculate the mimetype before storing the data in the
> recent file database).
Ah yes, it could try to calculate the mimetype, but that would mean
a second access to the file, which is not good if the file is on
a remote server.
So yes, we could ask people to pass a mimetype parameter, but what
if one user (== programmer) fscks it up or doesn't pass it ? Then all
apps that use a mimetype parameter as filter for their 'Open Recent'
menu will have trouble, because files that should be in the menu
won't be.
I think the most hardy solution will be to have a peek at the
app name and store that next to the URL, as I did before.
If you can see a solid solution that allows using mimetypes, I'm
all for it.
Rik
--
Hype.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic