mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
Merge pull request #1227 from ONLYOFFICE/fix/allsupported-filter
Fix 'All supported files' filter
This commit is contained in:
@ -251,10 +251,10 @@ QStringList CFileDialogWrapper::modalOpen(const QString& path, const QString& fi
|
||||
tr("Presentations") + " (*.pptx *.ppt *.odp *.otp *.ppsm *.pptm *.ppsx *.pps *.potx *.pot *.potm *.fodp *.dps *.dpt *.sxi);;" +
|
||||
tr("Web Page") + " (*.html *.htm *.mht *.mhtml *.epub);;" +
|
||||
tr("Text files") + " (*.txt *.csv)";
|
||||
#ifdef __linux__
|
||||
//#ifdef __linux__
|
||||
_all_sup_files = tr("All supported files") + " " + joinExtentions(_filter_);
|
||||
_filter_.prepend(_all_sup_files + ";;");
|
||||
#endif
|
||||
//#endif
|
||||
_filter_.append(";;" + m_mapFilters[AVS_OFFICESTUDIO_FILE_UNKNOWN]);
|
||||
}
|
||||
const QString _default_sel_filter = _all_sup_files.isEmpty() ?
|
||||
|
||||
@ -72,6 +72,8 @@ auto stringToFilters(const wstring& wstr) -> specvector {
|
||||
wstring filter_pattern = filter_name.substr(mid, filter_name.find(L")", mid) - mid);
|
||||
|
||||
std::replace(begin(filter_pattern), end(filter_pattern), ' ', ';');
|
||||
if (filter_name.length() > 255 && mid > 2)
|
||||
filter_name = filter_name.substr(0, mid - 2) + L" (*.*)";
|
||||
return make_pair(filter_name, filter_pattern);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user