diff --git a/NEWS.md b/NEWS.md index 49b71a000..9f1c6d62c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -34,6 +34,9 @@ could be interpreted as the 639-2 alpha-2 code for "Irish" or as the name of the language called "Ga") and only worked with languages whose name was at most three letters long. +* MKVToolNix GUI: header editor: the header editor will now honor the "use + legacy MIME types when adding font attachments" setting when adding new + attachments. # Version 59.0.0 "Shining Star" 2021-07-10 diff --git a/src/mkvtoolnix-gui/header_editor/tab.cpp b/src/mkvtoolnix-gui/header_editor/tab.cpp index f98624313..90406883a 100644 --- a/src/mkvtoolnix-gui/header_editor/tab.cpp +++ b/src/mkvtoolnix-gui/header_editor/tab.cpp @@ -45,6 +45,7 @@ #include "mkvtoolnix-gui/header_editor/unsigned_integer_value_page.h" #include "mkvtoolnix-gui/main_window/main_window.h" #include "mkvtoolnix-gui/util/basic_tree_view.h" +#include "mkvtoolnix-gui/util/file.h" #include "mkvtoolnix-gui/util/file_dialog.h" #include "mkvtoolnix-gui/util/header_view_manager.h" #include "mkvtoolnix-gui/util/model.h" @@ -792,12 +793,12 @@ Tab::createAttachmentFromFile(QString const &fileName) { if (!content) return {}; - auto mimeType = mtx::mime::guess_type_for_file(to_utf8(fileName)); + auto mimeType = Util::detectMIMEType(fileName); auto uid = create_unique_number(UNIQUE_ATTACHMENT_IDS); auto fileData = new KaxFileData; auto attachment = KaxAttachedPtr{ mtx::construct::cons(new KaxFileName, to_wide(QFileInfo{fileName}.fileName()), - new KaxMimeType, mimeType, + new KaxMimeType, to_utf8(mimeType), new KaxFileUID, uid) };