On Saturday, 2013-08-10, Pali Rohár wrote:
> On Friday 09 August 2013 10:03:10 Kevin Krammer wrote:
> > Hmm, speaking of which: separate meta data could also help in the above
> > case of plugin getting uninstalled between sessions.
> > The program could always cache metadata of the use plugin user-locally,
> > having it accessible even when the plugin itself got uninstalled.
> > 
> > Cheers,
> > Kevin
> 
> In this case when plugin metadata will be stored separatly, it still does
> not solve problem when user uninstall (or remove or upgrading ...) plugin
> together with metadata file. So metadata content needs to be stored in
> trojita config file (or some other cache). And I think it is easier to
> store 2 other utf8 strings (one for addressbook description and one for
> password) to trojita config file as creating some api for storing some
> metadata cache to trojita config file...

I guess this is a misunderstanding. What I was proposing is to have the plugin 
metadata, e.g. user visible name and decription (probably other things like 
author, license) in a file alongside the plugin (e.g. a standard .desktop file 
[1]).

When a plugin is selected, its metadata file is simply copied to a Trojita 
locaton, e.g. xdg_data_home/Trojita

The program can then at any time refer to the metadata by simple file lookup. 
Even if the plugin gets uninstalled, the local copy will remain. The program 
can display the removal information and, on user acknowlegdment, remove the 
local copy.

This is the additional advantage that the data available for display can be 
translated at display time [2], without the program needing to check if the 
strings it safed somewhere are in the current language or if there is a need 
to update them.

Cheers,
Kevin

[1] that is what KDE is currently using. JSON could be an alternative, Qt5 is 
using that
[2] a .desktop file can contain every entry in localized form.

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to