Various formatting and consistency fixes

This commit is contained in:
Stevoisiak
2014-11-13 21:28:27 -05:00
parent 5fb94230cd
commit b25e1a2eb4
61 changed files with 143 additions and 178 deletions

View File

@ -307,8 +307,8 @@ void CGameListCtrl::Update()
InsertColumn(COLUMN_TITLE, _("Title"));
// Instead of showing the notes + the company, which is unknown with
// wii titles We show in the same column : company for GC games and
// description for wii/wad games
// 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_COUNTRY, "");
@ -448,14 +448,13 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
std::string line;
if (!std::getline(titlestxt, line) && titlestxt.eof())
break;
break;
if (line.substr(0,rISOFile.GetUniqueID().size()) == rISOFile.GetUniqueID())
{
name = line.substr(rISOFile.GetUniqueID().size() + 3);
break;
}
}
titlestxt.close();
}
@ -684,7 +683,7 @@ void CGameListCtrl::OnColBeginDrag(wxListEvent& event)
event.Veto();
}
const GameListItem *CGameListCtrl::GetISO(size_t index) const
const GameListItem* CGameListCtrl::GetISO(size_t index) const
{
if (index < m_ISOFiles.size())
return m_ISOFiles[index];
@ -692,14 +691,14 @@ const GameListItem *CGameListCtrl::GetISO(size_t index) const
return nullptr;
}
static CGameListCtrl *caller;
static CGameListCtrl* caller;
static int wxCALLBACK wxListCompare(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
{
// return 1 if item1 > item2
// return -1 if item1 < item2
// return 0 for identity
const GameListItem *iso1 = caller->GetISO(item1);
const GameListItem *iso2 = caller->GetISO(item2);
const GameListItem* iso1 = caller->GetISO(item1);
const GameListItem* iso2 = caller->GetISO(item2);
return CompareGameListItems(iso1, iso2, sortData);
}
@ -900,7 +899,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
}
if (GetSelectedItemCount() == 1)
{
const GameListItem *selected_iso = GetSelectedISO();
const GameListItem* selected_iso = GetSelectedISO();
if (selected_iso)
{
wxMenu popupMenu;
@ -990,7 +989,7 @@ const GameListItem * CGameListCtrl::GetSelectedISO()
void CGameListCtrl::OnOpenContainingFolder(wxCommandEvent& WXUNUSED (event))
{
const GameListItem *iso = GetSelectedISO();
const GameListItem* iso = GetSelectedISO();
if (!iso)
return;
@ -1001,7 +1000,7 @@ void CGameListCtrl::OnOpenContainingFolder(wxCommandEvent& WXUNUSED (event))
void CGameListCtrl::OnOpenSaveFolder(wxCommandEvent& WXUNUSED (event))
{
const GameListItem *iso = GetSelectedISO();
const GameListItem* iso = GetSelectedISO();
if (!iso)
return;
std::string path = iso->GetWiiFSPath();
@ -1011,7 +1010,7 @@ void CGameListCtrl::OnOpenSaveFolder(wxCommandEvent& WXUNUSED (event))
void CGameListCtrl::OnExportSave(wxCommandEvent& WXUNUSED (event))
{
const GameListItem *iso = GetSelectedISO();
const GameListItem* iso = GetSelectedISO();
if (!iso)
return;
@ -1027,7 +1026,7 @@ void CGameListCtrl::OnExportSave(wxCommandEvent& WXUNUSED (event))
// Save this file as the default file
void CGameListCtrl::OnSetDefaultISO(wxCommandEvent& event)
{
const GameListItem *iso = GetSelectedISO();
const GameListItem* iso = GetSelectedISO();
if (!iso) return;
if (event.IsChecked())
@ -1049,7 +1048,7 @@ void CGameListCtrl::OnDeleteISO(wxCommandEvent& WXUNUSED (event))
{
if (GetSelectedItemCount() == 1)
{
const GameListItem *iso = GetSelectedISO();
const GameListItem* iso = GetSelectedISO();
if (!iso)
return;
if (wxMessageBox(_("Are you sure you want to delete this file? It will be gone forever!"),
@ -1068,7 +1067,7 @@ void CGameListCtrl::OnDeleteISO(wxCommandEvent& WXUNUSED (event))
for (int i = 0; i < selected; i++)
{
const GameListItem *iso = GetSelectedISO();
const GameListItem* iso = GetSelectedISO();
File::Delete(iso->GetFileName());
}
Update();
@ -1078,7 +1077,7 @@ void CGameListCtrl::OnDeleteISO(wxCommandEvent& WXUNUSED (event))
void CGameListCtrl::OnProperties(wxCommandEvent& WXUNUSED (event))
{
const GameListItem *iso = GetSelectedISO();
const GameListItem* iso = GetSelectedISO();
if (!iso)
return;
@ -1089,7 +1088,7 @@ void CGameListCtrl::OnProperties(wxCommandEvent& WXUNUSED (event))
void CGameListCtrl::OnWiki(wxCommandEvent& WXUNUSED (event))
{
const GameListItem *iso = GetSelectedISO();
const GameListItem* iso = GetSelectedISO();
if (!iso)
return;
@ -1130,23 +1129,23 @@ void CGameListCtrl::CompressSelection(bool _compress)
bool all_good = true;
{
wxProgressDialog progressDialog(
_compress ? _("Compressing ISO") : _("Decompressing ISO"),
_("Working..."),
1000,
this,
wxPD_APP_MODAL |
wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME |
wxPD_SMOOTH
);
wxProgressDialog progressDialog(
_compress ? _("Compressing ISO") : _("Decompressing ISO"),
_("Working..."),
1000,
this,
wxPD_APP_MODAL |
wxPD_ELAPSED_TIME | wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME |
wxPD_SMOOTH
);
m_currentItem = 0;
m_numberItem = GetSelectedItemCount();
for (u32 i=0; i < m_numberItem; i++)
{
const GameListItem *iso = GetSelectedISO();
if (iso->GetPlatform() == GameListItem::WII_WAD || iso->GetFileName().rfind(".wbfs") != std::string::npos)
continue;
m_currentItem = 0;
m_numberItem = GetSelectedItemCount();
for (u32 i=0; i < m_numberItem; i++)
{
const GameListItem* iso = GetSelectedISO();
if (iso->GetPlatform() == GameListItem::WII_WAD || iso->GetFileName().rfind(".wbfs") != std::string::npos)
continue;
if (!iso->IsCompressed() && _compress)
{
@ -1200,7 +1199,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
OutputFileName.c_str(), &MultiCompressCB, &progressDialog);
}
m_currentItem++;
}
}
}
if (!all_good)
@ -1217,7 +1216,7 @@ void CGameListCtrl::CompressCB(const std::string& text, float percent, void* arg
void CGameListCtrl::OnCompressISO(wxCommandEvent& WXUNUSED (event))
{
const GameListItem *iso = GetSelectedISO();
const GameListItem* iso = GetSelectedISO();
if (!iso)
return;
@ -1297,7 +1296,7 @@ void CGameListCtrl::OnCompressISO(wxCommandEvent& WXUNUSED (event))
void CGameListCtrl::OnChangeDisc(wxCommandEvent& WXUNUSED(event))
{
const GameListItem *iso = GetSelectedISO();
const GameListItem* iso = GetSelectedISO();
if (!iso || !Core::IsRunning())
return;
DVDInterface::ChangeDisc(WxStrToStr(iso->GetFileName()));
@ -1324,7 +1323,6 @@ void CGameListCtrl::AutomaticColumnWidth()
}
else if (GetColumnCount() > 0)
{
int resizable = rc.GetWidth() - (
GetColumnWidth(COLUMN_PLATFORM)
+ GetColumnWidth(COLUMN_BANNER)