char const * const tex_graphics[] =
{
- "default", "dvips", "dvitops", "emtex",
- "ln", "oztex", "textures", "none", ""
+ "default", "dvialw", "dvilaser", "dvipdf", "dvipdfm", "dvipdfmx",
+ "dvips", "dvipsone", "dvitops", "dviwin", "dviwindo", "dvi2ps", "emtex",
+ "ln", "oztex", "pctexhp", "pctexps", "pctexwin", "pctex32", "pdftex",
+ "psprint", "pubps", "tcidvi", "textures", "truetex", "vtex", "xdvi",
+ "xetex", "none", ""
};
char const * const tex_graphics_gui[] =
{
- N_("Default"), "Dvips", "DVItoPS", "EmTeX",
- "LN", "OzTeX", "Textures", N_("None"), ""
+ N_("Default"), "dvialw", "DviLaser", "dvipdf", "DVIPDFM", "DVIPDFMx",
+ "Dvips", "DVIPSONE", "DVItoPS", "DVIWIN", "DVIWindo", "dvi2ps", "EmTeX",
+ "LN", "OzTeX", "pctexhp", "pctexps", "pctexwin", "PCTeX32", "pdfTeX",
+ "psprint", "pubps", "tcidvi", "Textures", "TrueTeX", "VTeX", "xdvi",
+ "XeTeX", N_("None"), ""
};
// latex class
connect(latexModule->optionsLE, SIGNAL(textChanged(QString)),
this, SLOT(change_adaptor()));
+ connect(latexModule->defaultOptionsCB, SIGNAL(clicked()),
+ this, SLOT(change_adaptor()));
connect(latexModule->psdriverCO, SIGNAL(activated(int)),
this, SLOT(change_adaptor()));
connect(latexModule->classCO, SIGNAL(activated(int)),
connect(latexModule->childDocPB, SIGNAL(clicked()),
this, SLOT(browseMaster()));
- selectionManager =
+ selectionManager =
new ModuleSelectionManager(latexModule->availableLV,
latexModule->selectedLV,
latexModule->addPB, latexModule->deletePB,
applyView();
}
bp_.useClassDefaults();
- paramsToDialog(bp_);
}
// FIXME There's a little bug here connected with auto_reset, namely,
// that, if the preceding is skipped and the user has changed the
// modules before changing the class, those changes will be lost on
// update. But maybe that's what we want?
updateSelectedModules();
+ bp_.makeDocumentClass();
+ paramsToDialog(bp_);
}
params.addLayoutModule(modules_sel_model_.getIDString(i));
// update the list of removed modules
params.clearRemovedModules();
- set<string> const & reqmods = params.baseClass()->defaultModules();
- set<string>::const_iterator rit = reqmods.begin();
- set<string>::const_iterator ren = reqmods.end();
+ list<string> const & reqmods = params.baseClass()->defaultModules();
+ list<string>::const_iterator rit = reqmods.begin();
+ list<string>::const_iterator ren = reqmods.end();
// check each of the required modules
for (; rit != ren; rit++) {
vector<string>::const_iterator mit = params.getModules().begin();
params.options =
fromqstr(latexModule->optionsLE->text());
+ params.use_default_options =
+ latexModule->defaultOptionsCB->isChecked();
+
if (latexModule->childDocGB->isChecked())
params.master =
fromqstr(latexModule->childDocLE->text());
latexModule->optionsLE->setText(QString());
}
+ latexModule->defaultOptionsCB->setChecked(
+ params.use_default_options);
+
+ if (!documentClass().options().empty()) {
+ latexModule->defaultOptionsLE->setText(
+ toqstr(documentClass().options()));
+ } else {
+ latexModule->defaultOptionsLE->setText(
+ toqstr(_("[No options predefined]")));
+ }
+
+ latexModule->defaultOptionsLE->setEnabled(
+ params.use_default_options
+ && !documentClass().options().empty());
+
+ latexModule->defaultOptionsCB->setEnabled(
+ !documentClass().options().empty());
+
if (!params.master.empty()) {
latexModule->childDocGB->setChecked(true);
latexModule->childDocLE->setText(
bool GuiDocument::initialiseParams(string const &)
{
- BufferView * view = bufferview();
+ BufferView const * view = bufferview();
if (!view) {
bp_ = BufferParams();
paramsToDialog(bp_);
support::onlyPath(buffer().absFileName()));
if (isLyXFilename(master_file.absFilename())) {
Buffer * master = checkAndLoadLyXFile(master_file);
- buffer().setParent(master);
+ const_cast<Buffer &>(buffer()).setParent(master);
}
}
BranchList::const_iterator it = branchlist.begin();
BranchList::const_iterator const end = branchlist.end();
for (; it != end; ++it) {
- docstring const & current_branch = it->getBranch();
+ docstring const & current_branch = it->branch();
Branch const * branch = branchlist.find(current_branch);
- string const x11hexname = X11hexname(branch->getColor());
+ string const x11hexname = X11hexname(branch->color());
// display the new color
docstring const str = current_branch + ' ' + from_ascii(x11hexname);
dispatch(FuncRequest(LFUN_SET_COLOR, str));
"assign branch"));
}
// FIXME: If we used an LFUN, we would not need those two lines:
- bufferview()->processUpdateFlags(Update::Force | Update::FitCursor);
+ BufferView * bv = const_cast<BufferView *>(bufferview());
+ bv->processUpdateFlags(Update::Force | Update::FitCursor);
}