diff --git a/src/core/importer.cpp b/src/core/importer.cpp index 3f7713a..c6e9919 100644 --- a/src/core/importer.cpp +++ b/src/core/importer.cpp @@ -535,8 +535,8 @@ bool SDMCImporter::LoadTMD(const ContentSpecifier& specifier, TitleMetadata& out return LoadTMD(specifier.type, specifier.id, out); } -// English short title name, extdata id, encryption, seed, icon -using TitleData = std::tuple>; +// English short title name, extdata id, icon +using TitleData = std::tuple>; TitleData LoadTitleData(NCCHContainer& ncch) { std::string codeset_name; @@ -572,13 +572,8 @@ TitleData LoadTitleData(NCCHContainer& ncch) { u64 extdata_id{}; ncch.ReadExtdataId(extdata_id); - EncryptionType encryption = EncryptionType::None; - ncch.ReadEncryptionType(encryption); - - bool seed_crypto{}; - ncch.ReadSeedCrypto(seed_crypto); return {Common::UTF16BufferToUTF8(smdh.GetShortTitle(SMDH::TitleLanguage::English)), extdata_id, - encryption, seed_crypto, smdh.GetIcon(false)}; + smdh.GetIcon(false)}; } static std::string NormalizeFilename(std::string filename) { @@ -917,13 +912,12 @@ void SDMCImporter::ListTitle(std::vector& out) const { break; } - const auto& [name, extdata_id, encryption, seed_crypto, icon] = - LoadTitleData(ncch); + const auto& [name, extdata_id, icon] = LoadTitleData(ncch); const auto size = FileUtil::GetDirectoryTreeSize(directory + virtual_name + "/content/") + TitleSizeAllowance; out.push_back({type, id, FileUtil::Exists(citra_path + "content/"), size, - name, extdata_id, encryption, seed_crypto, icon}); + name, extdata_id, icon}); } while (false); } @@ -994,15 +988,14 @@ void SDMCImporter::ListNandTitle(std::vector& out) const { break; } - const auto& [name, extdata_id, encryption, seed_crypto, icon] = - LoadTitleData(ncch); + const auto& [name, extdata_id, icon] = LoadTitleData(ncch); const auto type = (id >> 32) == 0x00040030 ? ContentType::SystemApplet : ContentType::SystemTitle; const auto size = FileUtil::GetDirectoryTreeSize(directory + virtual_name + "/content/") + TitleSizeAllowance; out.push_back({type, id, FileUtil::Exists(citra_path + "content/"), size, - name, extdata_id, encryption, seed_crypto, icon}); + name, extdata_id, icon}); } while (false); } return true; diff --git a/src/core/importer.h b/src/core/importer.h index 477adee..43dc2ff 100644 --- a/src/core/importer.h +++ b/src/core/importer.h @@ -68,9 +68,7 @@ struct ContentSpecifier { u64 maximum_size; ///< The maximum size of the content. May be slightly bigger than real size. std::string name; ///< Optional. The content's preferred display name. u64 extdata_id; ///< Extdata ID for Applications. - EncryptionType encryption = EncryptionType::None; ///< Only for NCCHs. Encryption scheme. - bool seed_crypto = false; ///< Only for NCCHs. Whether seed crypto is used. - std::vector icon; ///< Optional. The content's icon. + std::vector icon; ///< Optional. The content's icon. }; /** diff --git a/src/frontend/import_dialog.cpp b/src/frontend/import_dialog.cpp index 4803e19..da8339e 100644 --- a/src/frontend/import_dialog.cpp +++ b/src/frontend/import_dialog.cpp @@ -124,10 +124,9 @@ ImportDialog::ImportDialog(QWidget* parent, const Core::Config& config_) // Set up column widths. // These values are tweaked with regard to the default dialog size. ui->main->setColumnWidth(0, width() * 0.11); - ui->main->setColumnWidth(1, width() * 0.415); - ui->main->setColumnWidth(2, width() * 0.14); - ui->main->setColumnWidth(3, width() * 0.17); - ui->main->setColumnWidth(4, width() * 0.08); + ui->main->setColumnWidth(1, width() * 0.525); + ui->main->setColumnWidth(2, width() * 0.18); + ui->main->setColumnWidth(3, width() * 0.10); connect(ui->main, &QTreeWidget::customContextMenuRequested, this, &ImportDialog::OnContextMenu); } @@ -246,22 +245,8 @@ void ImportDialog::InsertSecondLevelItem(std::size_t row, const Core::ContentSpe name = replace_name; } - QString encryption = tr(EncryptionTypeMap.at(content.encryption)); - if (content.seed_crypto) { - encryption.append(tr(" (Seed)")); - } - - if (content.type != Core::ContentType::Application && - content.type != Core::ContentType::Update && content.type != Core::ContentType::DLC && - content.type != Core::ContentType::SystemTitle && - content.type != Core::ContentType::SystemApplet) { - - // Do not display encryption in this case - encryption.clear(); - } - auto* item = new QTreeWidgetItem{{QString{}, name, ReadableByteSize(content.maximum_size), - encryption, content.already_exists ? tr("Yes") : tr("No")}}; + content.already_exists ? tr("Yes") : tr("No")}}; QPixmap icon; if (replace_icon.isNull()) { diff --git a/src/frontend/import_dialog.ui b/src/frontend/import_dialog.ui index 3cf2b4f..13c53ee 100644 --- a/src/frontend/import_dialog.ui +++ b/src/frontend/import_dialog.ui @@ -1,117 +1,112 @@ - - - ImportDialog - - - - 0 - 0 - 560 - 320 - - - - Select Contents - - - - - - - - Advanced... - - - - - - - Qt::Horizontal - - - - - - - Title View - - - - - - - Group View - - - - - - - - - Qt::CustomContextMenu - - - - - - - - - Name - - - - - Size - - - - - Encryption - - - - - Exists - - - - - - - - - - Available Space: - - - - - - - Qt::Horizontal - - - - - - - Total Size: - - - - - - - - - QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Reset - - - - - - - - + + + ImportDialog + + + + 0 + 0 + 560 + 320 + + + + Select Contents + + + + + + + + Advanced... + + + + + + + Qt::Horizontal + + + + + + + Title View + + + + + + + Group View + + + + + + + + + Qt::CustomContextMenu + + + + + + + + + Name + + + + + Size + + + + + Exists + + + + + + + + + + Available Space: + + + + + + + Qt::Horizontal + + + + + + + Total Size: + + + + + + + + + QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Reset + + + + + + + +