On Friday 09 August 2013 10:03:10 Kevin Krammer wrote: > On Thursday, 2013-08-08, Pali Rohár wrote: > > On Monday 05 August 2013 16:40:02 Jan Kundrát wrote: > > > - Why do you store the plugin's *description* in settings? I > > > understand the plugin ID, but not the human readable > > > description. Perhaps it's needed -- but if so, a comment > > > saying that *must* be in the source. > > > > This was suggested by Kevin. Internal untranstaled plugin id > > should not be visible to user. And when plugin becomes > > unavailable we need translated string which will user see. So > > only option is to save this description to config file. > > Just to clarify: my suggestion was to never display an untranslatable string > in the UI, definitely not an internal identifier. > Whether or not it is necessary to store the translated strings in the config > is a different matter though. Pali came up with that as a workaround. > > > - Why is function "loadPlugin" trying to unload plugins? > > > > It is not "trying", but clean up resources when library is not > > for trojita or if plugin for category is already loaded and > > selected. But for creating list of available plugins it is needed > > to open all libraries call needed functions and close them. > > KDE solves that problem by having plugin metadata available along side the > plugin code. Qt5 uses that now as well, but bundles the metadata into the > library file instead of having a separate metadata file. > > 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... -- Pali Rohár pali.ro...@gmail.com
signature.asc
Description: This is a digitally signed message part.