gui: Added location column in Title Manager (#697)

Thanks @RivanParmar!
This commit is contained in:
Rivan Parmar 2023-03-19 15:55:05 +05:30 committed by GitHub
parent 9049ad91f9
commit 823386cc09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View file

@ -156,6 +156,12 @@ void wxTitleManagerList::AddColumns()
col5.SetText(_("Format"));
col5.SetWidth(63);
InsertColumn(ColumnFormat, col5);
wxListItem col6;
col6.SetId(ColumnLocation);
col6.SetText(_("Location"));
col6.SetWidth(63);
InsertColumn(ColumnLocation, col6);
}
wxString wxTitleManagerList::OnGetItemText(long item, long column) const
@ -935,6 +941,16 @@ wxString wxTitleManagerList::GetTitleEntryText(const TitleEntry& entry, ItemColu
return "";
//return wxStringFormat2("{}", entry.format);
}
case ColumnLocation:
{
const auto relative_mlc_path =
entry.path.lexically_relative(ActiveSettings::GetMlcPath()).string();
if (relative_mlc_path.starts_with("usr") || relative_mlc_path.starts_with("sys"))
return _("MLC");
else
return _("Game Paths");
}
default:
UNREACHABLE;
}

View file

@ -24,6 +24,7 @@ public:
ColumnVersion,
ColumnRegion,
ColumnFormat,
ColumnLocation,
ColumnMAX,
};