We have this nice class kde:KRecentDocument (we dont use it nearly where we should but thats another rant ;) ). As I have been working at making KDE more usable I found we dont track recently run applications the way we should. We seem only to track them via the kicker. While this is nice, its useless for those of those of us who use krun, or the quickstart applet.

To work arround this I have been playing with kde:KRun and using a class krecentApplication, a class almost identical to kde:KRecentDocument. The cool thing here is that recently used applications that start from all over KDE start to appear in the kicker menu.... once we have this data, phase two starts, but more on that later...


IIRC this was already proposed some time ago on kde-core-devel and there wo objections.

By KDE User at Mon, 07/28/2003 - 14:49

I was unable to find any mention of this in the core-devel threads. I did find some talk about a recent items class in 1999, but nothing beyond that. Do you have any better link? Im interested.

By Ian Reinhart Geiser at Mon, 07/28/2003 - 15:30

By KDE User at Mon, 07/28/2003 - 16:25

Yeah, this idea was only limited to the kicker. My idea was to expand beyond that, since the end goal of this will be the complete removal of kicker.

My class is similar to the one posted but again much simpler, as most of the noise provided by that API is not needed. Currently what I have is logic to add the desktop files in the identcal manner that recent documents works. This way 99% of the system can just access the directory and get the apps. While the special apps like the kde menu and kicker applets can use the API to get a list of applications.

My only point of contention is sort order... You see when dealing with recent anything frequency of the request and period between now and the last request are important. These items must be taken into account if any use will be made from this functionality, but that is more boring math ;) In short it consists of three ordered lists with a variant picker...

By Ian Reinhart Geiser at Mon, 07/28/2003 - 17:09

ah, this is so great, guy! i've had this on my TODO list for a bit now, but i can remove it now. i'll be using it for sure in TOM when i get back to hacking on that.

as a thank-you, i'm going to commit that patch to Konqi's servicemenu support adding the per-directory servicemenus you requested ;-)

By Aaron J. Seigo at Mon, 07/28/2003 - 22:06

When you say you played around with KRun, how do you handle applications started for a file (like when clicking on an image and KView gets started).

Do those end up in the recent applications menu or don't they?

By KDE User at Tue, 07/29/2003 - 15:16

I think they should... since KRun is basicly the class that will be called anytime you start an application by a service. I will have to check though to be sure, as I still get lost in the KDE startup sequence. I hope this is the case, since what I really want is to track all applications that are started. One cool side effect I found is that even when you start an application from Gnome its updated... This could maby be a interop area. Shared recent docs and apps?

By Ian Reinhart Geiser at Tue, 07/29/2003 - 15:42

For recent docs a proposal already exists: http://www.freedesktop.org/standards/recent-file-spec/

By KDE User at Tue, 07/29/2003 - 17:19

hrm... i guess XML could be used, but imho using plain desktop files would be easier. we all know how slow XML is, and using FAM to poll a file over and over it is not that cool... Also their locking is overkill since its really not neccisary unless two apps are started at once, but then again by using XML you back yourself into a corner.

i guess i should put in my 2c before someone does something silly and tries to use the current spec lucky its still draft.

By Ian Reinhart Geiser at Tue, 07/29/2003 - 17:40

I think it would be better to only list applications you started yourself, not those which where started by clicking on a file.

Lets say the number of entries would be five (just an example :) )
I start KMail, KNode, KDevelop during a session and they show up in the menu.
If i then start Konqueror and browse through my file system, it shows up as well, which is still ok.

But if i then start clicking on file to view them, say images, audio files and videos, the player applications will push the other apps out, rendering the menu mostly useless because it doesn't show the five applicatons I started most recently but a couple of viewers.

Those viewers can the be started with the files from recent files and from the recetn application menu, but the applications I explicitly start are not available.

Hmm, I hope I this make a little bit sense :)

By KDE User at Tue, 07/29/2003 - 21:45