wx: Now that Wii doesn't support descriptions, rename Notes to Maker

I'm not sure if Maker is the best name (Developer? Publisher?
Company? Copyright?) but I went with it because it's
what the game properties window uses. For the sake of
backwards compatibility, the INI option wasn't renamed.
This commit is contained in:
JosJuice 2015-04-20 13:00:15 +02:00
parent 2d5d5fa83e
commit df8e768b77
6 changed files with 21 additions and 37 deletions

View File

@ -304,7 +304,7 @@ void SConfig::SaveGameListSettings(IniFile& ini)
gamelist->Set("ColumnPlatform", m_showSystemColumn); gamelist->Set("ColumnPlatform", m_showSystemColumn);
gamelist->Set("ColumnBanner", m_showBannerColumn); gamelist->Set("ColumnBanner", m_showBannerColumn);
gamelist->Set("ColumnNotes", m_showNotesColumn); gamelist->Set("ColumnNotes", m_showMakerColumn);
gamelist->Set("ColumnID", m_showIDColumn); gamelist->Set("ColumnID", m_showIDColumn);
gamelist->Set("ColumnRegion", m_showRegionColumn); gamelist->Set("ColumnRegion", m_showRegionColumn);
gamelist->Set("ColumnSize", m_showSizeColumn); gamelist->Set("ColumnSize", m_showSizeColumn);
@ -556,7 +556,7 @@ void SConfig::LoadGameListSettings(IniFile& ini)
// Gamelist columns toggles // Gamelist columns toggles
gamelist->Get("ColumnPlatform", &m_showSystemColumn, true); gamelist->Get("ColumnPlatform", &m_showSystemColumn, true);
gamelist->Get("ColumnBanner", &m_showBannerColumn, true); gamelist->Get("ColumnBanner", &m_showBannerColumn, true);
gamelist->Get("ColumnNotes", &m_showNotesColumn, true); gamelist->Get("ColumnNotes", &m_showMakerColumn, true);
gamelist->Get("ColumnID", &m_showIDColumn, false); gamelist->Get("ColumnID", &m_showIDColumn, false);
gamelist->Get("ColumnRegion", &m_showRegionColumn, true); gamelist->Get("ColumnRegion", &m_showRegionColumn, true);
gamelist->Get("ColumnSize", &m_showSizeColumn, true); gamelist->Get("ColumnSize", &m_showSizeColumn, true);

View File

@ -84,7 +84,7 @@ struct SConfig : NonCopyable
// Game list column toggles // Game list column toggles
bool m_showSystemColumn; bool m_showSystemColumn;
bool m_showBannerColumn; bool m_showBannerColumn;
bool m_showNotesColumn; bool m_showMakerColumn;
bool m_showIDColumn; bool m_showIDColumn;
bool m_showRegionColumn; bool m_showRegionColumn;
bool m_showSizeColumn; bool m_showSizeColumn;

View File

@ -364,8 +364,8 @@ wxMenuBar* CFrame::CreateMenu()
columnsMenu->Check(IDM_SHOW_SYSTEM, SConfig::GetInstance().m_showSystemColumn); columnsMenu->Check(IDM_SHOW_SYSTEM, SConfig::GetInstance().m_showSystemColumn);
columnsMenu->AppendCheckItem(IDM_SHOW_BANNER, _("Banner")); columnsMenu->AppendCheckItem(IDM_SHOW_BANNER, _("Banner"));
columnsMenu->Check(IDM_SHOW_BANNER, SConfig::GetInstance().m_showBannerColumn); columnsMenu->Check(IDM_SHOW_BANNER, SConfig::GetInstance().m_showBannerColumn);
columnsMenu->AppendCheckItem(IDM_SHOW_NOTES, _("Notes")); columnsMenu->AppendCheckItem(IDM_SHOW_MAKER, _("Maker"));
columnsMenu->Check(IDM_SHOW_NOTES, SConfig::GetInstance().m_showNotesColumn); columnsMenu->Check(IDM_SHOW_MAKER, SConfig::GetInstance().m_showMakerColumn);
columnsMenu->AppendCheckItem(IDM_SHOW_ID, _("Game ID")); columnsMenu->AppendCheckItem(IDM_SHOW_ID, _("Game ID"));
columnsMenu->Check(IDM_SHOW_ID, SConfig::GetInstance().m_showIDColumn); columnsMenu->Check(IDM_SHOW_ID, SConfig::GetInstance().m_showIDColumn);
columnsMenu->AppendCheckItem(IDM_SHOW_REGION, _("Region")); columnsMenu->AppendCheckItem(IDM_SHOW_REGION, _("Region"));
@ -2035,8 +2035,8 @@ void CFrame::OnChangeColumnsVisible(wxCommandEvent& event)
case IDM_SHOW_BANNER: case IDM_SHOW_BANNER:
SConfig::GetInstance().m_showBannerColumn = !SConfig::GetInstance().m_showBannerColumn; SConfig::GetInstance().m_showBannerColumn = !SConfig::GetInstance().m_showBannerColumn;
break; break;
case IDM_SHOW_NOTES: case IDM_SHOW_MAKER:
SConfig::GetInstance().m_showNotesColumn = !SConfig::GetInstance().m_showNotesColumn; SConfig::GetInstance().m_showMakerColumn = !SConfig::GetInstance().m_showMakerColumn;
break; break;
case IDM_SHOW_ID: case IDM_SHOW_ID:
SConfig::GetInstance().m_showIDColumn = !SConfig::GetInstance().m_showIDColumn; SConfig::GetInstance().m_showIDColumn = !SConfig::GetInstance().m_showIDColumn;

View File

@ -116,16 +116,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
} }
return strcasecmp(iso1->GetName(languageOne).c_str(), return strcasecmp(iso1->GetName(languageOne).c_str(),
iso2->GetName(languageOther).c_str()) * t; iso2->GetName(languageOther).c_str()) * t;
case CGameListCtrl::COLUMN_NOTES: case CGameListCtrl::COLUMN_MAKER:
{ return strcasecmp(iso1->GetCompany().c_str(), iso2->GetCompany().c_str()) * t;
std::string cmp1 =
(iso1->GetPlatform() == GameListItem::GAMECUBE_DISC) ?
iso1->GetCompany() : iso1->GetDescription(languageOne);
std::string cmp2 =
(iso2->GetPlatform() == GameListItem::GAMECUBE_DISC) ?
iso2->GetCompany() : iso2->GetDescription(languageOther);
return strcasecmp(cmp1.c_str(), cmp2.c_str()) * t;
}
case CGameListCtrl::COLUMN_ID: case CGameListCtrl::COLUMN_ID:
return strcasecmp(iso1->GetUniqueID().c_str(), iso2->GetUniqueID().c_str()) * t; return strcasecmp(iso1->GetUniqueID().c_str(), iso2->GetUniqueID().c_str()) * t;
case CGameListCtrl::COLUMN_COUNTRY: case CGameListCtrl::COLUMN_COUNTRY:
@ -290,10 +282,7 @@ void CGameListCtrl::Update()
InsertColumn(COLUMN_BANNER, _("Banner")); InsertColumn(COLUMN_BANNER, _("Banner"));
InsertColumn(COLUMN_TITLE, _("Title")); InsertColumn(COLUMN_TITLE, _("Title"));
// Instead of showing the notes + the company, which is unknown with InsertColumn(COLUMN_MAKER, _("Maker"));
// Wii titles We show in the same column : company for GC games and
// description for Wii/wad games
InsertColumn(COLUMN_NOTES, _("Notes"));
InsertColumn(COLUMN_ID, _("ID")); InsertColumn(COLUMN_ID, _("ID"));
InsertColumn(COLUMN_COUNTRY, ""); InsertColumn(COLUMN_COUNTRY, "");
InsertColumn(COLUMN_SIZE, _("Size")); InsertColumn(COLUMN_SIZE, _("Size"));
@ -310,7 +299,7 @@ void CGameListCtrl::Update()
SetColumnWidth(COLUMN_PLATFORM, SConfig::GetInstance().m_showSystemColumn ? 35 + platform_padding : 0); SetColumnWidth(COLUMN_PLATFORM, SConfig::GetInstance().m_showSystemColumn ? 35 + platform_padding : 0);
SetColumnWidth(COLUMN_BANNER, SConfig::GetInstance().m_showBannerColumn ? 96 + platform_padding : 0); SetColumnWidth(COLUMN_BANNER, SConfig::GetInstance().m_showBannerColumn ? 96 + platform_padding : 0);
SetColumnWidth(COLUMN_TITLE, 175 + platform_padding); SetColumnWidth(COLUMN_TITLE, 175 + platform_padding);
SetColumnWidth(COLUMN_NOTES, SConfig::GetInstance().m_showNotesColumn ? 150 + platform_padding : 0); SetColumnWidth(COLUMN_MAKER, SConfig::GetInstance().m_showMakerColumn ? 150 + platform_padding : 0);
SetColumnWidth(COLUMN_ID, SConfig::GetInstance().m_showIDColumn ? 75 + platform_padding : 0); SetColumnWidth(COLUMN_ID, SConfig::GetInstance().m_showIDColumn ? 75 + platform_padding : 0);
SetColumnWidth(COLUMN_COUNTRY, SConfig::GetInstance().m_showRegionColumn ? 32 + platform_padding : 0); SetColumnWidth(COLUMN_COUNTRY, SConfig::GetInstance().m_showRegionColumn ? 32 + platform_padding : 0);
SetColumnWidth(COLUMN_EMULATION_STATE, SConfig::GetInstance().m_showStateColumn ? 50 + platform_padding : 0); SetColumnWidth(COLUMN_EMULATION_STATE, SConfig::GetInstance().m_showStateColumn ? 50 + platform_padding : 0);
@ -441,12 +430,7 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
name = title; name = title;
SetItem(_Index, COLUMN_TITLE, StrToWxStr(name), -1); SetItem(_Index, COLUMN_TITLE, StrToWxStr(name), -1);
SetItem(_Index, COLUMN_MAKER, StrToWxStr(rISOFile.GetCompany()), -1);
// We show the company string on GameCube only
// On Wii we show the description instead as the company string is empty
std::string const notes = (rISOFile.GetPlatform() == GameListItem::GAMECUBE_DISC) ?
rISOFile.GetCompany() : rISOFile.GetDescription();
SetItem(_Index, COLUMN_NOTES, StrToWxStr(notes), -1);
// Emulation state // Emulation state
SetItemColumnImage(_Index, COLUMN_EMULATION_STATE, m_EmuStateImageIndex[rISOFile.GetEmuState()]); SetItemColumnImage(_Index, COLUMN_EMULATION_STATE, m_EmuStateImageIndex[rISOFile.GetEmuState()]);
@ -670,7 +654,7 @@ void CGameListCtrl::ScanForISOs()
void CGameListCtrl::OnColBeginDrag(wxListEvent& event) void CGameListCtrl::OnColBeginDrag(wxListEvent& event)
{ {
if (event.GetColumn() != COLUMN_TITLE && event.GetColumn() != COLUMN_NOTES) if (event.GetColumn() != COLUMN_TITLE && event.GetColumn() != COLUMN_MAKER)
event.Veto(); event.Veto();
} }
@ -1319,13 +1303,13 @@ void CGameListCtrl::AutomaticColumnWidth()
+ GetColumnWidth(COLUMN_SIZE) + GetColumnWidth(COLUMN_SIZE)
+ GetColumnWidth(COLUMN_EMULATION_STATE)); + GetColumnWidth(COLUMN_EMULATION_STATE));
// We hide the Notes column if the window is too small // We hide the Maker column if the window is too small
if (resizable > 400) if (resizable > 400)
{ {
if (SConfig::GetInstance().m_showNotesColumn) if (SConfig::GetInstance().m_showMakerColumn)
{ {
SetColumnWidth(COLUMN_TITLE, resizable / 2); SetColumnWidth(COLUMN_TITLE, resizable / 2);
SetColumnWidth(COLUMN_NOTES, resizable / 2); SetColumnWidth(COLUMN_MAKER, resizable / 2);
} }
else else
{ {
@ -1335,7 +1319,7 @@ void CGameListCtrl::AutomaticColumnWidth()
else else
{ {
SetColumnWidth(COLUMN_TITLE, resizable); SetColumnWidth(COLUMN_TITLE, resizable);
SetColumnWidth(COLUMN_NOTES, 0); SetColumnWidth(COLUMN_MAKER, 0);
} }
} }
} }

View File

@ -52,7 +52,7 @@ public:
COLUMN_PLATFORM, COLUMN_PLATFORM,
COLUMN_BANNER, COLUMN_BANNER,
COLUMN_TITLE, COLUMN_TITLE,
COLUMN_NOTES, COLUMN_MAKER,
COLUMN_ID, COLUMN_ID,
COLUMN_COUNTRY, COLUMN_COUNTRY,
COLUMN_SIZE, COLUMN_SIZE,

View File

@ -176,7 +176,7 @@ enum
// List Column Title Toggles // List Column Title Toggles
IDM_SHOW_SYSTEM, IDM_SHOW_SYSTEM,
IDM_SHOW_BANNER, IDM_SHOW_BANNER,
IDM_SHOW_NOTES, IDM_SHOW_MAKER,
IDM_SHOW_ID, IDM_SHOW_ID,
IDM_SHOW_REGION, IDM_SHOW_REGION,
IDM_SHOW_SIZE, IDM_SHOW_SIZE,