Comment 1 for bug 398448

Revision history for this message
Markus Korn (thekorn) wrote :

Yes, you are right, the current code is not optimal, and I thought about this at the time when I wrote the code. the problem here is a more general one: a user can have many different .desktop files on his system describing the very same application (like one in /usr/share/applications and one in ~/.local/share/applications), but the zeitgeist engine will always treat them as different apps. So I decided to hardcode the same .desktop file in the query for the last inserted data and the item dict in _get_items_uncached().
The best solution for this would be if we had an Dbus API which returns the .desktop file for an application, like
GetDesktopfileForApplication("firefox") -> /usr/share/applications/firefox.desktop
If this method raises a "NotFoundError" (or similar) the FF dataprovider should try to find the desktop file related to the profile it is watching