From 117df9d694bbcfe9fc0c9f8ffc15c46be85ea5b6 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sun, 8 Aug 2004 15:24:29 +0000 Subject: [PATCH] always have "All Files" as filter in the list git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8873 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/globbing.C | 5 +++-- src/support/globbing.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/support/globbing.C b/src/support/globbing.C index b112db32ae..eb351cf12b 100644 --- a/src/support/globbing.C +++ b/src/support/globbing.C @@ -114,8 +114,9 @@ vector const expand_globs(string const & mask, FileFilterList::FileFilterList(string const & qt_style_filter) { - string const filter = qt_style_filter.empty() ? - _("All files (*)") : qt_style_filter; + string const filter = qt_style_filter + + (qt_style_filter.empty() ? string() : ";;") + + _("All files (*)"); // Split data such as "TeX documents (*.tex);;LyX Documents (*.lyx)" // into individual filters. diff --git a/src/support/globbing.h b/src/support/globbing.h index 08f117c47d..a5f7b04e58 100644 --- a/src/support/globbing.h +++ b/src/support/globbing.h @@ -68,8 +68,8 @@ public: }; /** \param qt_style_filter a list of available file filters. - * Eg. "TeX documents (*.tex);;LyX Documents (*.lyx)" - * If empty, set to "All files (*)". + * Eg. "TeX documents (*.tex);;LyX Documents (*.lyx)". + * The "All files (*)" filter is always added to the list. */ explicit FileFilterList(std::string const & qt_style_filter = std::string()); std::vector const & filters() const { return filters_; } -- 2.39.2