mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #2665 from AskOldIch/master
Added new association with "new" extensions
This commit is contained in:
commit
e60fead024
@ -286,7 +286,7 @@ void SearchDialog::initialiseFileTypeMappings()
|
||||
/* edit these strings to change the range of extensions recognised by the search */
|
||||
SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_ANY, "");
|
||||
SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_AUDIO,
|
||||
"aac aif flac iff m3u m4a mid midi mp3 mpa ogg ra ram wav wma");
|
||||
"aac aif flac iff m3u m4a mid midi mp3 mpa ogg ra ram wav wma weba");
|
||||
SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_ARCHIVE,
|
||||
"7z bz2 gz pkg rar sea sit sitx tar zip tgz");
|
||||
SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_CDIMAGE,
|
||||
@ -295,11 +295,11 @@ void SearchDialog::initialiseFileTypeMappings()
|
||||
"doc odt ott rtf pdf ps txt log msg wpd wps ods xls epub" );
|
||||
SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_PICTURE,
|
||||
"3dm 3dmf ai bmp drw dxf eps gif ico indd jpe jpeg jpg mng pcx pcc pct pgm "
|
||||
"pix png psd psp qxd qxprgb sgi svg tga tif tiff xbm xcf");
|
||||
"pix png psd psp qxd qxprgb sgi svg tga tif tiff xbm xcf webp");
|
||||
SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_PROGRAM,
|
||||
"app bat cgi com bin exe js pif py pl sh vb ws bash");
|
||||
SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_VIDEO,
|
||||
"3gp asf asx avi mov mp4 mkv flv mpeg mpg qt rm swf vob wmv");
|
||||
"3gp asf asx avi mov mp4 mkv flv mpeg mpg qt rm swf vob wmv webm");
|
||||
SearchDialog::initialised = true;
|
||||
}
|
||||
|
||||
|
@ -33,13 +33,15 @@ static QString getInfoFromFilename(const QString& filename, bool anyForUnknown,
|
||||
{
|
||||
QString ext = QFileInfo(filename).suffix().toLower();
|
||||
|
||||
if (ext == "jpg" || ext == "jpeg" || ext == "tif" || ext == "tiff" || ext == "png" || ext == "gif" || ext == "bmp" || ext == "ico" || ext == "svg") {
|
||||
if (ext == "jpg" || ext == "jpeg" || ext == "tif" || ext == "tiff" || ext == "png" || ext == "gif" ||
|
||||
ext == "bmp" || ext == "ico" || ext == "svg" || ext == "webp") {
|
||||
return image ? ":/icons/filetype/picture.svg" : QApplication::translate("FilesDefs", "Picture");
|
||||
} else if (ext == "avi" || ext == "mpg" || ext == "mpeg" || ext == "wmv" || ext == "divx" || ext == "ts" ||
|
||||
ext == "mkv" || ext == "mp4" || ext == "flv" || ext == "mov" || ext == "asf" || ext == "xvid" ||
|
||||
ext == "vob" || ext == "qt" || ext == "rm" || ext == "3gp" || ext == "ogm") {
|
||||
ext == "vob" || ext == "qt" || ext == "rm" || ext == "3gp" || ext == "ogm" || ext == "webm") {
|
||||
return image ? ":/icons/filetype/video.svg" : QApplication::translate("FilesDefs", "Video");
|
||||
} else if (ext == "ogg" || ext == "mp3" || ext == "mp1" || ext == "mp2" || ext == "wav" || ext == "wma" || ext == "m4a" || ext == "flac" ||ext == "xpm") {
|
||||
} else if (ext == "ogg" || ext == "mp3" || ext == "mp1" || ext == "mp2" || ext == "wav" || ext == "wma" ||
|
||||
ext == "m4a" || ext == "flac" || ext == "xpm" || ext == "weba") {
|
||||
return image ? ":/icons/filetype/audio.svg" : QApplication::translate("FilesDefs", "Audio");
|
||||
} else if (ext == "tar" || ext == "bz2" || ext == "zip" || ext == "gz" || ext == "7z" || ext == "msi" ||
|
||||
ext == "rar" || ext == "rpm" || ext == "ace" || ext == "jar" || ext == "tgz" || ext == "lha" ||
|
||||
|
@ -108,6 +108,8 @@ bool misc::isPreviewable(QString extension)
|
||||
if(extension == "WAV") return true;
|
||||
if(extension == "WMA") return true;
|
||||
if(extension == "WMV") return true;
|
||||
if(extension == "WEBM") return true;
|
||||
if(extension == "WEBA") return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user