From d57f66022c7159fff6a5c63fabe4dcde80ad7ef3 Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Tue, 13 Sep 2011 20:42:38 +0000 Subject: [PATCH] Show .htm files in HTML import file dialog (#6340). - 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 | 4 ++-- src/frontends/qt4/GuiView.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index b5272b96df..8e8ed5f965 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -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" ''') diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 4f55834e69..225033b10a 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -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))); -- 2.39.2