> So, what is the purpose of this inset? Only to display the shortcut or
> also to modify them?

Only to display them. Although it is *very* tempting, and is not
difficult to do (implementation wise), I do not think it is a good
idea to modify shortcuts etc in these insets. Customization belongs to
Tools->Preference, and this is Help->Shortcuts (and others).

> Some style comments below,

Corrected. Thanks.

> +I am not sure if it is a good idea to add
> +
> +buffer:buffer_params
> +
> +The problem is that those are not 'stable' information.
>
> What do you mean by stable? That they can change within an editing
> context? I guess what you want to discribe is the document class and
> associated layout, don't you?

Yes. Generally buffer information such as document class, layout, or
everything in BufferParams. By 'unstable' I mean that
InsetInfo::updateInfo() is not called after info_ is created, so if
something in BufferParams changes, the inset would not be up to date.

Anyway, if such information is considered useful, the update problem
is not difficult to fix.

> +               cutSelection(cur, true, false);
> +               insertInset(cur, inset);
> +               static_cast<InsetInfo *>(inset)->setInfo(to_utf8(ds));
>
> Isn't it possible to set the info within the ctor in order to avoid this
> static_cast?

Unless I modify createInset and pass to_utf8(ds) in... this is
certainly possible.

Cheers,
Bo

Reply via email to