]> git.lyx.org Git - lyx.git/commitdiff
Show .htm files in HTML import file dialog (#6340).
authorJulien Rioux <jrioux@lyx.org>
Tue, 13 Sep 2011 20:42:38 +0000 (20:42 +0000)
committerJulien Rioux <jrioux@lyx.org>
Tue, 13 Sep 2011 20:42:38 +0000 (20:42 +0000)
  - Add "htm" as a known extension for HTML.

  - Use all the extensions of a format as file filter,
    instead of using only the default extension.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39671 a592a061-630c-0410-9148-cb99ea01b6c8

lib/configure.py
src/frontends/qt4/GuiView.cpp

index b5272b96df5ab43bb040525dc64d9749a66d0c00..8e8ed5f965aa4c8df711140ef366fffa97982d1c 100644 (file)
@@ -569,7 +569,7 @@ def checkFormatEntries(dtl_tools):
         addToRC(r'\Format dvi2       dvi     DraftDVI               "" ""      ""      "vector"')
     #
     checkViewer('an HTML previewer', ['firefox', 'mozilla file://$$p$$i', 'netscape'],
-        rc_entry = [r'\Format html       html    HTML                   H  "%%"        ""      "document,menu=export"'])
+        rc_entry = [r'\Format html      "html, htm" HTML                H  "%%"        ""      "document,menu=export"'])
     #
     checkViewerEditor('Noteedit', ['noteedit'],
         rc_entry = [r'\Format noteedit   not     Noteedit               "" "%%"        "%%"    "vector"'])
@@ -601,7 +601,7 @@ def checkFormatEntries(dtl_tools):
 \Format pstex      pstex_t PSTEX                  "" ""        ""      ""
 \Format wmf        wmf    "Windows Metafile"      "" ""        ""      "vector"
 \Format emf        emf    "Enhanced Metafile"     "" ""        ""      "vector"
-\Format wordhtml   html   "HTML (MS Word)"        "" "" ""     "document"
+\Format wordhtml  "html, htm" "HTML (MS Word)"    "" "" ""     "document"
 ''')
 
 
index 4f55834e692a4f5c524ff630f43c1692f117db40..225033b10a332ceb3f9a832fee6db4ee2185d37f 100644 (file)
@@ -2066,10 +2066,10 @@ void GuiView::importDocument(string const & argument)
                        toqstr(addPath(package().system_support().absFileName(), "examples")));
 
                docstring filter = formats.prettyName(format);
-               filter += " (*.";
+               filter += " (*.{";
                // FIXME UNICODE
-               filter += from_utf8(formats.extension(format));
-               filter += ')';
+               filter += from_utf8(formats.extensions(format));
+               filter += "})";
 
                FileDialog::Result result =
                        dlg.open(toqstr(initpath), fileFilters(toqstr(filter)));