Author: jrioux
Date: Sat Jun 11 17:29:41 2011
New Revision: 39005
URL: http://www.lyx.org/trac/changeset/39005

Log:
Fix bug #7609 (PDF (pdflatex) no more directly
listed in file->export menu). Do not remove customized
document formats from the export menu.

Modified:
   lyx-devel/branches/BRANCH_2_0_X/RELEASE-NOTES
   lyx-devel/branches/BRANCH_2_0_X/lib/configure.py
   lyx-devel/branches/BRANCH_2_0_X/lib/scripts/prefs2prefs_prefs.py
   lyx-devel/branches/BRANCH_2_0_X/status.20x

Modified: lyx-devel/branches/BRANCH_2_0_X/RELEASE-NOTES
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/RELEASE-NOTES       Sat Jun 11 17:27:20 
2011        (r39004)
+++ lyx-devel/branches/BRANCH_2_0_X/RELEASE-NOTES       Sat Jun 11 17:29:41 
2011        (r39005)
@@ -25,6 +25,8 @@
 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 ...
 

Modified: lyx-devel/branches/BRANCH_2_0_X/lib/configure.py
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/lib/configure.py    Sat Jun 11 17:27:20 
2011        (r39004)
+++ lyx-devel/branches/BRANCH_2_0_X/lib/configure.py    Sat Jun 11 17:29:41 
2011        (r39005)
@@ -1331,6 +1331,7 @@
 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 @@
 # 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)

Modified: lyx-devel/branches/BRANCH_2_0_X/lib/scripts/prefs2prefs_prefs.py
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/lib/scripts/prefs2prefs_prefs.py    Sat Jun 
11 17:27:20 2011        (r39004)
+++ lyx-devel/branches/BRANCH_2_0_X/lib/scripts/prefs2prefs_prefs.py    Sat Jun 
11 17:29:41 2011        (r39005)
@@ -77,12 +77,24 @@
        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,

Modified: lyx-devel/branches/BRANCH_2_0_X/status.20x
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/status.20x  Sat Jun 11 17:27:20 2011        
(r39004)
+++ lyx-devel/branches/BRANCH_2_0_X/status.20x  Sat Jun 11 17:29:41 2011        
(r39005)
@@ -89,6 +89,8 @@
   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 @@
 
 - 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 @@
 - 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).
 

Reply via email to