proposal: permanent dialog setting templates

meik michalke meik.michalke at uni-duesseldorf.de
Tue Jul 12 10:19:22 BST 2022


hi,

we have run again links, which is a great feature. i was wondering if it was 
useful to allow these settings also to be stored apart from an output file. a 
use case i have in mind is new dialogs to create RMarkdown files from 
templates with previously stored user data, so you don't have to fill in your 
name and other standard stuff you usually want to be in that document. but it 
can also be helpful in other cases.

if we think this is useful, i'd suggest storing this data in a way so that it 
is being added to .Options like we already do for some RKWard related 
settings, e.g. in a structure like

  .Options[["rk.plugin.templates"]][[<plugin ID>]][[<custom template ID>]]

by default all dialogs would need to get a new "save template" button (which 
would then ask for a <custom template ID> and then store all current plugin 
settings similar to the arguments in run again links, i.e. only store fields 
that were altered from their defaults) and a new dropdown menu (offering all 
<custom template ID>s found for the plugin, adjusting settings as you select 
one, similar to what would happen if the dialog was opened using a run again 
link). not sure where to best place those two, though.

further things to think about would be the ability to overwrite a previously 
saved template with new settings as part of the "save template" button, delete 
custom templates, or chose a template to be used as the global default when a 
dialog comes up.

being a feature of the dialog framework, i think it should work for all 
plugins without the need to change anything, right?

a bonus would be the ability to sync these templates between machines, i.e., 
store them in a separate config file that can be shared between hosts.

discuss :)


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  institut f"ur experimentelle psychologie
  abt. f"ur diagnostik und differentielle psychologie
  heinrich-heine-universit"at d-40204 d"usseldorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20220712/edf6c9e6/attachment.sig>


More information about the rkward-devel mailing list