char const * languages_supported[] =
-{ "no language", "ABAP", "ACSL", "Ada", "ALGOL", "Assembler", "Awk", "bash", "Basic", "C",
- "C++", "Caml", "Clean", "Cobol", "Comal 80", "command.com", "Comsol", "csh", "Delphi",
- "Eiffel", "Elan", "erlang", "Euphoria", "Fortran", "Gnuplot", "Haskell", "HTML", "IDL", "inform",
- "Java", "JVMIS", "ksh", "Lingo", "Lisp", "Logo", "make", "Mathematica", "Matlab", "Mercury",
- "MetaPost", "Miranda", "ML", "Modula-2", "MuPAD", "NASTRAN", "Oberon-2", "OCL", "Octave",
+{ "no language", "ABAP", "ACM", "ACMscript", "ACSL", "Ada", "ALGOL", "Ant", "Assembler", "Awk", "bash", "Basic", "C",
+ "C++", "Caml", "CIL", "Clean", "Cobol", "Comal 80", "command.com", "Comsol", "csh", "Delphi",
+ "Eiffel", "Elan", "elisp", "erlang", "Euphoria", "Fortran", "GAP", "GCL", "Gnuplot", "Go",
+ "hansl", "Haskell", "HTML", "IDL", "inform",
+ "Java", "JVMIS", "ksh", "Lingo", "Lisp", "LLVM", "Logo", "Lua", "make", "Mathematica", "Matlab", "Mercury",
+ "MetaPost", "Miranda", "Mizar", "ML", "Modula-2", "MuPAD", "NASTRAN", "Oberon-2", "OCL", "Octave", "OORexx",
"Oz", "Pascal", "Perl", "PHP", "PL/I", "Plasm", "PostScript", "POV", "Prolog", "Promela",
- "PSTricks", "Python", "R", "Reduce", "Rexx", "RSL", "Ruby", "S", "SAS", "Scilab", "sh",
- "SHELXL", "Simula", "tcl", "SPARQL", "SQL", "tcl", "TeX", "VBScript", "Verilog", "VHDL",
+ "PSTricks", "Python", "R", "Reduce", "Rexx", "RSL", "Ruby", "S", "SAS", "Scala", "Scilab", "sh",
+ "SHELXL", "Simula", "SPARQL", "SQL", "Swift", "tcl", "TeX", "VBScript", "Verilog", "VHDL",
"VRML", "XML", "XSLT", "" };
char const * languages_gui[] =
-{ N_("No language"), "ABAP", "ACSL", "Ada", "ALGOL", "Assembler", "Awk", "bash", "Basic",
- "C", "C++", "Caml", "Clean", "Cobol", "Comal 80", "command.com", "Comsol", "csh", "Delphi",
- "Eiffel", "Elan", "Erlang", "Euphoria", "Fortran", "Gnuplot", "Haskell", "HTML", "IDL", "inform",
- "Java", "JVMIS", "ksh", "Lingo", "Lisp", "Logo", "make", "Mathematica", "Matlab", "Mercury",
- "MetaPost", "Miranda", "ML", "Modula-2", "MuPAD", "NASTRAN", "Oberon-2", "OCL", "Octave",
+{ N_("No language"), "ABAP", "ACM", "ACMscript", "ACSL", "Ada", "ALGOL", "Ant", "Assembler", "Awk", "bash", "Basic", "C",
+ "C++", "Caml", "CIL", "Clean", "Cobol", "Comal 80", "command.com", "Comsol", "csh", "Delphi",
+ "Eiffel", "Elan", "elisp", "erlang", "Euphoria", "Fortran", "GAP", "GCL", "Gnuplot", "Go",
+ "hansl", "Haskell", "HTML", "IDL", "inform",
+ "Java", "JVMIS", "ksh", "Lingo", "Lisp", "LLVM", "Logo", "Lua", "make", "Mathematica", "Matlab", "Mercury",
+ "MetaPost", "Miranda", "Mizar", "ML", "Modula-2", "MuPAD", "NASTRAN", "Oberon-2", "OCL", "Octave", "OORexx",
"Oz", "Pascal", "Perl", "PHP", "PL/I", "Plasm", "PostScript", "POV", "Prolog", "Promela",
- "PSTricks", "Python", "R", "Reduce", "Rexx", "RSL", "Ruby", "S", "SAS", "Scilab", "sh",
- "SHELXL", "Simula", "tcl", "SPARQL", "SQL", "tcl", "TeX", "VBScript", "Verilog", "VHDL",
+ "PSTricks", "Python", "R", "Reduce", "Rexx", "RSL", "Ruby", "S", "SAS", "Scala", "Scilab", "sh",
+ "SHELXL", "Simula", "SPARQL", "SQL", "Swift", "tcl", "TeX", "VBScript", "Verilog", "VHDL",
"VRML", "XML", "XSLT", "" };
{
setupUi(this);
- connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
- connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
- connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
+ connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+ this, SLOT(slotButtonBox(QAbstractButton *)));
connect(languageCO, SIGNAL(currentIndexChanged(int)),
this, SLOT(change_adaptor()));
placementLE->setValidator(new QRegExpValidator(QRegExp("[\\*tbph]*"), this));
bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
- bc().setOK(okPB);
- bc().setApply(applyPB);
- bc().setCancel(closePB);
+ bc().setOK(buttonBox->button(QDialogButtonBox::Ok));
+ bc().setApply(buttonBox->button(QDialogButtonBox::Apply));
+ bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
listingsTB->setPlainText(
qt_("Input listing parameters on the right. Enter ? for a list of parameters."));
string fontstyle = font_styles[qMax(0, fontstyleCO->currentIndex())];
string basicstyle;
string mintedsize;
+ // FIXME: We should not compose listings- or minted-dependant string here
+ // This breaks if a users switches the backend without opening and
+ // re-applying all listings insets. Use a backend-abstract syntax!
bool const use_minted = buffer().params().use_minted;
if (fontsize != "default") {
if (use_minted)
InsetListingsParams par;
par.setMinted(use_minted);
if (use_minted) {
- if (language == "no language" && !contains(extra, "language="))
- par.addParam("language", "TeX");
- else
+ if (language == "no language" && !contains(extra, "language=")) {
+ string const & blp = buffer().params().listings_params;
+ size_t start = blp.find("language=");
+ if (start != string::npos) {
+ start += strlen("language=");
+ size_t len = blp.find(",", start);
+ if (len != string::npos)
+ len -= start;
+ par.addParam("language", blp.substr(start, len));
+ } else
+ par.addParam("language", "TeX");
+ } else
par.addParam("language", language);
} else if (language != "no language" && !contains(extra, "language=")) {
if (dialect.empty())
}
}
dialectCO->setCurrentIndex(default_dialect);
- dialectCO->setEnabled(dialectCO->count() > 1);
+ dialectCO->setEnabled(dialectCO->count() > 1
+ && !buffer().params().use_minted);
}
}
-bool GuiListings::initialiseParams(string const & data)
+bool GuiListings::initialiseParams(string const & sdata)
{
- InsetListings::string2params(data, params_);
+ InsetListings::string2params(sdata, params_);
return true;
}