bc().addReadOnly(typeCO);
bc().addReadOnly(listingsED);
- bc().addCheckedLineEdit(filenameED, filenameLA);
+ // FIXME does not make sense, as we do not have a validator
+ // for this widget
+ //bc().addCheckedLineEdit(filenameED, filenameLA);
}
int const item = typeCO->currentIndex();
// Are we inputting or including a LyX file?
if (item != 0 && item != 1) {
- okbutton->setText("OK");
+ okbutton->setText(qt_("&OK"));
return true;
}
- // Do we have a LyX filename?
- if (!isLyXFileName(fromqstr(fname))) {
- okbutton->setText("OK");
- return false;
- }
+
string const bpath = buffer().filePath();
// Path might be relative to current Buffer, so make absolute
FileName const absfname = support::makeAbsPath(fromqstr(fname), bpath);
+
+ // Do we have a LyX filename?
+ if (!isLyXFileName(fromqstr(fname))) {
+ okbutton->setText(qt_("&OK"));
+ return absfname.exists();
+ }
+
// Set OK button text according to whether file already exists
- okbutton->setText(absfname.exists() ? "OK" : "Create");
+ okbutton->setText(absfname.exists() ? qt_("&OK") : qt_("&Create"));
// enable edit button iff file is open in some Buffer
editPB->setEnabled(theBufferList().getBuffer(absfname));
return true;
}
-Dialog * createGuiInclude(GuiView & lv) { return new GuiInclude(lv); }
-
-
} // namespace frontend
} // namespace lyx