[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Open Recent... class ?
From:       Andreas Pour <pour () mieterra ! com>
Date:       2000-02-29 2:15:01
[Download RAW message or body]



Hi, Rik,

This is a cool idea!  I do have a suggestion below, you may like it :-).

Rik Hemsley wrote:
> 
> #if David Faure
> > Oh, well, it's very simple in fact. The question is : should it
> > be in kdelibs, or should we go on doing it in each app ?
> #endif
> 
> I did this sometime last year, but I didn't have CVS access and
> no-one wanted to test it or check it in.
> 
> It's even easier now with DCOP, and makes a great addition to
> kfiledialog.
> 
> The only things you needed to do in you app went something like
> this:
> 
> When you created your 'File' menu, you would say something
> like KRecentFiles::addMenu(&fileMenu);

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

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

Ciao,

Andreas

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic