mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-16 11:48:28 +12:00
Rename path _utf8Wrapper to _utf8ToPath for better clarity
This commit is contained in:
parent
168ecf8825
commit
680beaaf21
19 changed files with 60 additions and 67 deletions
|
@ -251,7 +251,7 @@ void GameUpdateWindow::ThreadWork()
|
|||
error_msg << GetSystemErrorMessage(ex);
|
||||
|
||||
if(currentDirEntry != fs::directory_entry{})
|
||||
error_msg << fmt::format("\n{}\n{}",_("Current file:").ToStdString(), _utf8Wrapper(currentDirEntry.path()));
|
||||
error_msg << fmt::format("\n{}\n{}",_("Current file:").ToStdString(), _pathToUtf8(currentDirEntry.path()));
|
||||
|
||||
m_thread_exception = error_msg.str();
|
||||
m_thread_state = ThreadCanceled;
|
||||
|
|
|
@ -1947,7 +1947,7 @@ public:
|
|||
"/*****************************************************************************/\r\n"
|
||||
);
|
||||
delete fs;
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(tempPath))));
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(tempPath))));
|
||||
});
|
||||
lineSizer->Add(noticeLink, 0);
|
||||
lineSizer->Add(new wxStaticText(parent, -1, ")"), 0);
|
||||
|
|
|
@ -275,7 +275,7 @@ void MemorySearcherTool::Load()
|
|||
if (!memSearcherIniContents)
|
||||
return;
|
||||
|
||||
IniParser iniParser(*memSearcherIniContents, _utf8Wrapper(memorySearcherPath));
|
||||
IniParser iniParser(*memSearcherIniContents, _pathToUtf8(memorySearcherPath));
|
||||
while (iniParser.NextSection())
|
||||
{
|
||||
auto option_description = iniParser.FindOption("description");
|
||||
|
|
|
@ -480,7 +480,7 @@ void TitleManager::OnSaveOpenDirectory(wxCommandEvent& event)
|
|||
if (!fs::exists(target) || !fs::is_directory(target))
|
||||
return;
|
||||
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(target))));
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(target))));
|
||||
}
|
||||
|
||||
void TitleManager::OnSaveDelete(wxCommandEvent& event)
|
||||
|
|
|
@ -563,7 +563,7 @@ void wxGameList::OnContextMenuSelected(wxCommandEvent& event)
|
|||
{
|
||||
fs::path path(gameInfo.GetBase().GetPath());
|
||||
_stripPathFilename(path);
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(path))));
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(path))));
|
||||
break;
|
||||
}
|
||||
case kWikiPage:
|
||||
|
@ -584,21 +584,21 @@ void wxGameList::OnContextMenuSelected(wxCommandEvent& event)
|
|||
|
||||
case kContextMenuSaveFolder:
|
||||
{
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(gameInfo.GetSaveFolder()))));
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(gameInfo.GetSaveFolder()))));
|
||||
break;
|
||||
}
|
||||
case kContextMenuUpdateFolder:
|
||||
{
|
||||
fs::path path(gameInfo.GetUpdate().GetPath());
|
||||
_stripPathFilename(path);
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(path))));
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(path))));
|
||||
break;
|
||||
}
|
||||
case kContextMenuDLCFolder:
|
||||
{
|
||||
fs::path path(gameInfo.GetAOC().front().GetPath());
|
||||
_stripPathFilename(path);
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(path))));
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(path))));
|
||||
break;
|
||||
}
|
||||
case kContextMenuEditGraphicPacks:
|
||||
|
|
|
@ -293,21 +293,21 @@ void wxTitleManagerList::OnConvertToCompressedFormat(uint64 titleId)
|
|||
std::string msg = wxHelper::MakeUTF8(_("The following content will be converted to a compressed Wii U archive file (.wua):\n \n"));
|
||||
|
||||
if (titleInfo_base.IsValid())
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("Base game: {}"))), _utf8Wrapper(titleInfo_base.GetPath())));
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("Base game: {}"))), _pathToUtf8(titleInfo_base.GetPath())));
|
||||
else
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("Base game: Not installed")))));
|
||||
|
||||
msg.append("\n");
|
||||
|
||||
if (titleInfo_update.IsValid())
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("Update: {}"))), _utf8Wrapper(titleInfo_update.GetPath())));
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("Update: {}"))), _pathToUtf8(titleInfo_update.GetPath())));
|
||||
else
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("Update: Not installed")))));
|
||||
|
||||
msg.append("\n");
|
||||
|
||||
if (titleInfo_aoc.IsValid())
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("DLC: {}"))), _utf8Wrapper(titleInfo_aoc.GetPath())));
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("DLC: {}"))), _pathToUtf8(titleInfo_aoc.GetPath())));
|
||||
else
|
||||
msg.append(fmt::format(fmt::runtime(wxHelper::MakeUTF8(_("DLC: Not installed")))));
|
||||
|
||||
|
@ -778,9 +778,9 @@ bool wxTitleManagerList::DeleteEntry(long index, const TitleEntry& entry)
|
|||
wxString msg;
|
||||
const bool is_directory = fs::is_directory(entry.path);
|
||||
if(is_directory)
|
||||
msg = wxStringFormat2(_("Are you really sure that you want to delete the following folder:\n{}"), wxHelper::FromUtf8(_utf8Wrapper(entry.path)));
|
||||
msg = wxStringFormat2(_("Are you really sure that you want to delete the following folder:\n{}"), wxHelper::FromUtf8(_pathToUtf8(entry.path)));
|
||||
else
|
||||
msg = wxStringFormat2(_("Are you really sure that you want to delete the following file:\n{}"), wxHelper::FromUtf8(_utf8Wrapper(entry.path)));
|
||||
msg = wxStringFormat2(_("Are you really sure that you want to delete the following file:\n{}"), wxHelper::FromUtf8(_pathToUtf8(entry.path)));
|
||||
|
||||
const auto result = wxMessageBox(msg, _("Warning"), wxYES_NO | wxCENTRE | wxICON_EXCLAMATION, this);
|
||||
if (result == wxNO)
|
||||
|
@ -852,7 +852,7 @@ void wxTitleManagerList::OnContextMenuSelected(wxCommandEvent& event)
|
|||
case kContextMenuOpenDirectory:
|
||||
{
|
||||
const auto path = fs::is_directory(entry->path) ? entry->path : entry->path.parent_path();
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _utf8Wrapper(path))));
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(path))));
|
||||
}
|
||||
break;
|
||||
case kContextMenuDelete:
|
||||
|
|
|
@ -170,7 +170,7 @@ void SaveImportWindow::OnImport(wxCommandEvent& event)
|
|||
{
|
||||
if (!fs::is_directory(target_path))
|
||||
{
|
||||
const auto msg = wxStringFormat2(_("There's already a file at the target directory:\n{}"), _utf8Wrapper(target_path));
|
||||
const auto msg = wxStringFormat2(_("There's already a file at the target directory:\n{}"), _pathToUtf8(target_path));
|
||||
wxMessageBox(msg, _("Error"), wxOK | wxCENTRE | wxICON_ERROR, this);
|
||||
m_return_code = wxCANCEL;
|
||||
Close();
|
||||
|
|
|
@ -108,7 +108,7 @@ void SaveTransfer::OnTransfer(wxCommandEvent& event)
|
|||
{
|
||||
if(!fs::is_directory(target_path))
|
||||
{
|
||||
const auto msg = wxStringFormat2(_("There's already a file at the target directory:\n{}"), _utf8Wrapper(target_path));
|
||||
const auto msg = wxStringFormat2(_("There's already a file at the target directory:\n{}"), _pathToUtf8(target_path));
|
||||
wxMessageBox(msg, _("Error"), wxOK | wxCENTRE | wxICON_ERROR, this);
|
||||
m_return_code = wxCANCEL;
|
||||
Close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue