Stephan Witt wrote:
> I'm trying to go for ticket #6861 http://www.lyx.org/trac/ticket/6861 ...
> 
> Now I'm wondering about the implementation of
> 
> static FileName selectTemplateFile()
> {
>       FileDialog dlg(qt_("Select template file"));
>       dlg.setButton1(qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
>       dlg.setButton1(qt_("Templates|#T#t"), toqstr(lyxrc.template_path));
> 
>       FileDialog::Result result = dlg.open(toqstr(lyxrc.template_path),
>                                QStringList(qt_("LyX Documents (*.lyx)")));
> 
>       if (result.first == FileDialog::Later)
>               return FileName();
>       if (result.second.isEmpty())
>               return FileName();
>       return FileName(fromqstr(result.second));
> }
> 
> The two calls to setButton1() look really strange.

A typo, I suppose. The dialog should have two buttons, one pointing to the 
template directory, the other one to the documents directory.

> Why does nobody care here?

Huh?

> If I assume the 2nd call should be setButton2...

Yes.

> Is it of any use to provide lyxrc.template_path twice?
> Once in the sidebar and again in the presetted path?

I don't understand. Where is it provided twice?

The long term goal, I think, would be to get rid of the buttons and use the 
sidebar only.

> I'd expect lyxrc.template_path in Button1 and sys-template-path in Button2.

What is sys-template-path?

> Stephan

Jürgen

Reply via email to