If you open the External dialog in order to insert a new inset, you're 
currently faced with the combox of available templates being set to 
'RasterImage', thanks to this code in insetexternal.C

namespace {
        string const defaultTemplateName = "RasterImage";
} // namespace anon

InsetExternalParams::InsetExternalParams()
        : templatename_(defaultTemplateName)
{}


I have been mulling over the best way to implement André and Konni's 
desire that the combox be set to 'XFig' and I think that it would be 
easiest to use the point of application of the inset params:

void InsetExternal::setParams(InsetExternalParams const & p,
                              Buffer const & buffer)
{
        params_ = p;
+       defaultTemplateName = params_.templatename();
        ...
}

Thus, if you open an existing file containing only XFig external 
insets or if you 'Apply' an XFig inset from the dialog, then the 
combox wll be set to 'XFig' the next time that the dialog is opened.

It seems to me that this is the generic solution to this type of 
problem too (since all dialogs use the data in the inset's params 
struct to set their widgets).

Are you all happy with this scheme?

-- 
Angus

Reply via email to