mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-29 06:15:24 +00:00
GUI: header editor: honor "use legacy MIME types for fonts" setting
This commit is contained in:
parent
7858db3ade
commit
fe79909f44
3
NEWS.md
3
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
|
||||
|
@ -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<KaxAttached>(new KaxFileName, to_wide(QFileInfo{fileName}.fileName()),
|
||||
new KaxMimeType, mimeType,
|
||||
new KaxMimeType, to_utf8(mimeType),
|
||||
new KaxFileUID, uid)
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user