From: Julien Rioux Date: Sat, 11 Jun 2011 15:29:41 +0000 (+0000) Subject: Fix bug #7609 (PDF (pdflatex) no more directly X-Git-Tag: 2.0.1~230 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d2a09bf5a6cfbd4c213247c30c3347bb6fba9f88;p=features.git Fix bug #7609 (PDF (pdflatex) no more directly listed in file->export menu). Do not remove customized document formats from the export menu. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39005 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 61a86730a2..942a17df2a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -25,6 +25,8 @@ this menu got too large. If the flag "menu=export" is not explicitly set, the formats are not included in the menu. This means that you might need to click "Show in export menu" in Preferences > File Formats for your customized file formats if you want them to appear in the menu. +Customized formats imported from a previous configuration are handled +by the prefs2prefs script, and should appear in the menu as before. Note, though, that you still can export to any possible format via File > Export > More Formats and Options ... diff --git a/lib/configure.py b/lib/configure.py index 99b04e5531..cc6be7bfa4 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1331,6 +1331,7 @@ def removeTempFiles(): if __name__ == '__main__': lyx_check_config = True outfile = 'lyxrc.defaults' + lyxrc_fileformat = 1 rc_entries = '' lyx_keep_temps = False version_suffix = '' @@ -1372,7 +1373,10 @@ Options: # want to customize LyX, use LyX' Preferences dialog or modify directly # the "preferences" file instead. Any setting in that file will # override the values given here. -''') + +Format %i + +''' % lyxrc_fileformat) # check latex LATEX = checkLatex(dtl_tools) checkFormatEntries(dtl_tools) diff --git a/lib/scripts/prefs2prefs_prefs.py b/lib/scripts/prefs2prefs_prefs.py index 2a77d79376..40b5072f82 100644 --- a/lib/scripts/prefs2prefs_prefs.py +++ b/lib/scripts/prefs2prefs_prefs.py @@ -77,12 +77,24 @@ def latex_flavor(line): return (True, "\\converter \"%s\" \"%s\" \"%s\" \"latex=%s\"" % (conv, fmat, args, flavor)) +emre = re.compile(r'^\\[Ff]ormat\s+(.*)\s+"(document[^"]*?)"') +def export_menu(line): + if not line.lower().startswith("\\format"): + return no_match + m = emre.match(line) + if not m: + return no_match + fmat = m.group(1) + opts = m.group(2) + return (True, + "\\Format %s \"%s,menu=export\"" % (fmat, opts)) ######################## conversions = [ [ # this will be a long list of conversions for format 0 + export_menu, latex_flavor, remove_obsolete, language_use_babel, diff --git a/status.20x b/status.20x index 45b385bd15..ec1edb12e8 100644 --- a/status.20x +++ b/status.20x @@ -89,6 +89,8 @@ What's new a document containing aligned and other multi-cell environments (bug 7549). +- Fixed the call to the svg converter on Windows (bug 7608). + - On Windows, allow to automatically switch TeX engines without the need of manually saving the preferences after reconfiguring (bug 7557). @@ -114,8 +116,6 @@ What's new - Fixed problem with display of Buffer load errors (bug 7622). -- Fixed the call to the svg converter on Windows (bug 7608). - - Show the correct label after adding a line to an AMS Multline formula (bug 7511). @@ -134,6 +134,8 @@ What's new - Fix On-the-fly spellchecker jumps to next pattern match when replacing a misspelled word with a suggested one from context menu (bug 7564). +- Keep customized file formats in the export menu by default (bug 7609). + - Add XeTeX/LuaTeX and derived formats to the Default Output list in the preferences dialog (bug 7543).