[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 1:04:52
[Download RAW message or body]
#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);
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);
This would add your filename to the central store, remove any
duplicates, then add it to the top of your 'Open Recent' menu.
Shall I write it again ?
Rik
--
Traffic in novelty.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic