mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
FilesystemPanel: Replace Extract Apploader/DOL with Extract System Data
Because having one option for each thing to extract is going to be way too many options once I add support for more things to extract.
This commit is contained in:
@ -126,8 +126,7 @@ void FilesystemPanel::BindEvents()
|
|||||||
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractFile, this, ID_EXTRACT_FILE);
|
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractFile, this, ID_EXTRACT_FILE);
|
||||||
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractAll, this, ID_EXTRACT_ALL);
|
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractAll, this, ID_EXTRACT_ALL);
|
||||||
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractDirectories, this, ID_EXTRACT_DIR);
|
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractDirectories, this, ID_EXTRACT_DIR);
|
||||||
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractHeaderData, this, ID_EXTRACT_APPLOADER);
|
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractSystemData, this, ID_EXTRACT_SYSTEM_DATA);
|
||||||
Bind(wxEVT_MENU, &FilesystemPanel::OnExtractHeaderData, this, ID_EXTRACT_DOL);
|
|
||||||
Bind(wxEVT_MENU, &FilesystemPanel::OnCheckPartitionIntegrity, this, ID_CHECK_INTEGRITY);
|
Bind(wxEVT_MENU, &FilesystemPanel::OnCheckPartitionIntegrity, this, ID_CHECK_INTEGRITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,10 +202,7 @@ void FilesystemPanel::OnRightClickTree(wxTreeEvent& event)
|
|||||||
if (image_type == ICON_DISC)
|
if (image_type == ICON_DISC)
|
||||||
{
|
{
|
||||||
if (!is_parent_of_partitions)
|
if (!is_parent_of_partitions)
|
||||||
{
|
menu.Append(ID_EXTRACT_SYSTEM_DATA, _("Extract System Data..."));
|
||||||
menu.Append(ID_EXTRACT_APPLOADER, _("Extract Apploader..."));
|
|
||||||
menu.Append(ID_EXTRACT_DOL, _("Extract DOL..."));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (first_visible_item == selection)
|
if (first_visible_item == selection)
|
||||||
menu.Append(ID_EXTRACT_ALL, _("Extract Entire Disc..."));
|
menu.Append(ID_EXTRACT_ALL, _("Extract Entire Disc..."));
|
||||||
@ -247,7 +243,7 @@ void FilesystemPanel::OnExtractDirectories(wxCommandEvent& event)
|
|||||||
ExtractSingleDirectory(extract_path);
|
ExtractSingleDirectory(extract_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilesystemPanel::OnExtractHeaderData(wxCommandEvent& event)
|
void FilesystemPanel::OnExtractSystemData(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
const wxString path = wxDirSelector(_("Choose the folder to extract to"));
|
const wxString path = wxDirSelector(_("Choose the folder to extract to"));
|
||||||
|
|
||||||
@ -267,17 +263,7 @@ void FilesystemPanel::OnExtractHeaderData(wxCommandEvent& event)
|
|||||||
partition = DiscIO::PARTITION_NONE;
|
partition = DiscIO::PARTITION_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ret = false;
|
if (!DiscIO::ExportSystemData(*m_opened_iso, partition, WxStrToStr(path)))
|
||||||
if (event.GetId() == ID_EXTRACT_APPLOADER)
|
|
||||||
{
|
|
||||||
ret = DiscIO::ExportApploader(*m_opened_iso, partition, WxStrToStr(path) + "/apploader.img");
|
|
||||||
}
|
|
||||||
else if (event.GetId() == ID_EXTRACT_DOL)
|
|
||||||
{
|
|
||||||
ret = DiscIO::ExportDOL(*m_opened_iso, partition, WxStrToStr(path) + "/boot.dol");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ret)
|
|
||||||
{
|
{
|
||||||
WxUtils::ShowErrorDialog(
|
WxUtils::ShowErrorDialog(
|
||||||
wxString::Format(_("Failed to extract to %s!"), WxStrToStr(path).c_str()));
|
wxString::Format(_("Failed to extract to %s!"), WxStrToStr(path).c_str()));
|
||||||
|
@ -32,8 +32,7 @@ private:
|
|||||||
ID_EXTRACT_DIR = 20000,
|
ID_EXTRACT_DIR = 20000,
|
||||||
ID_EXTRACT_ALL,
|
ID_EXTRACT_ALL,
|
||||||
ID_EXTRACT_FILE,
|
ID_EXTRACT_FILE,
|
||||||
ID_EXTRACT_APPLOADER,
|
ID_EXTRACT_SYSTEM_DATA,
|
||||||
ID_EXTRACT_DOL,
|
|
||||||
ID_CHECK_INTEGRITY,
|
ID_CHECK_INTEGRITY,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -45,7 +44,7 @@ private:
|
|||||||
void OnRightClickTree(wxTreeEvent&);
|
void OnRightClickTree(wxTreeEvent&);
|
||||||
void OnExtractFile(wxCommandEvent&);
|
void OnExtractFile(wxCommandEvent&);
|
||||||
void OnExtractDirectories(wxCommandEvent&);
|
void OnExtractDirectories(wxCommandEvent&);
|
||||||
void OnExtractHeaderData(wxCommandEvent&);
|
void OnExtractSystemData(wxCommandEvent&);
|
||||||
void OnExtractAll(wxCommandEvent&);
|
void OnExtractAll(wxCommandEvent&);
|
||||||
void OnCheckPartitionIntegrity(wxCommandEvent&);
|
void OnCheckPartitionIntegrity(wxCommandEvent&);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user