Merge pull request #1539 from Stevoisiak/newImprovedFormatting

Various formatting and consistency fixes
This commit is contained in:
Lioncash
2014-11-13 23:05:46 -05:00
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)

View File

@ -62,9 +62,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
if (!DiscIO::IsVolumeWadFile(pVolume))
m_Platform = DiscIO::IsVolumeWiiDisc(pVolume) ? WII_DISC : GAMECUBE_DISC;
else
{
m_Platform = WII_WAD;
}
m_volume_names = pVolume->GetNames();
@ -165,9 +163,7 @@ bool GameListItem::LoadFromCache()
void GameListItem::SaveToCache()
{
if (!File::IsDirectory(File::GetUserPath(D_CACHE_IDX)))
{
File::CreateDir(File::GetUserPath(D_CACHE_IDX));
}
CChunkFileReader::Save<GameListItem>(CreateCacheFilename(), CACHE_REVISION, *this);
}

View File

@ -246,7 +246,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
break;
}
if (IsWiiDisc) // Only one language with wii banners
if (IsWiiDisc) // Only one language with Wii banners
{
m_Lang->SetSelection(0);
m_Lang->Disable();

View File

@ -167,7 +167,7 @@ bool DolphinApp::OnInit()
},
{
wxCMD_LINE_OPTION, "e", "exec",
"Loads the specified file (DOL,ELF,GCM,ISO,WAD)",
"Loads the specified file (ELF, DOL, GCM, ISO, WBFS, CISO, GCZ, WAD)",
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
},
{
@ -396,7 +396,7 @@ void DolphinApp::InitLanguageSupport()
void DolphinApp::OnEndSession(wxCloseEvent& event)
{
// Close if we've recieved wxEVT_END_SESSION (ignore wxEVT_QUERY_END_SESSION)
// Close if we've received wxEVT_END_SESSION (ignore wxEVT_QUERY_END_SESSION)
if (!event.CanVeto())
{
main_frame->Close(true);
@ -464,7 +464,7 @@ void* Host_GetRenderHandle()
return main_frame->GetRenderHandle();
}
// OK, this thread boundary is DANGEROUS on linux
// OK, this thread boundary is DANGEROUS on Linux
// wxPostEvent / wxAddPendingEvent is the solution.
void Host_NotifyMapLoaded()
{