[LyX/2.3.x] Fix bug 4475. Add ability to create child from the include dialog.

Richard Kimberly Heck rikiheck at lyx.org
Tue Sep 1 05:42:45 UTC 2020


On 8/31/20 1:26 PM, Jürgen Spitzmüller wrote:
> Am Montag, den 31.08.2020, 17:21 +0200 schrieb Richard Kimberly Heck:
>> +       int const item = typeCO->currentIndex();
>>
>> +       // Are we inputting or including a LyX file?
>>
>> +       if (item != 0 && item != 1) {
>>
>> +               okPB->setText("OK");
>>
>> +               return true;
>>
>> +       }
>>
>> +       // Do we have a LyX filename?
>>
>> +       if (!support::isLyXFileName(fromqstr(fname))) {
>>
>> +               okPB->setText("OK");
>>
>> +               return false;
>>
>> +       }
>>
>> +       string const bpath = buffer().filePath();
>>
>> +       QString absfname = makeAbsPath(fname, toqstr(bpath));
>>
>> +       bool const fexists = QFile::exists(absfname);
>>
>> +       okPB->setText(fexists ? "OK" : "Create");
> Please use localizable strings in all these setText() calls.

Sorry for being cluelessly English-centric. Fixed.

Riki




More information about the lyx-devel mailing list