mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Deal with some clang-inspired buglets.
Respect the initial fullscreen setting in nowx. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7089 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -488,7 +488,8 @@ void CheatSearchTab::UpdateCheatSearchResultsList()
|
||||
{
|
||||
lbox_search_results->Clear();
|
||||
|
||||
wxString count_label = _("Count:") + wxString::Format(wxT(" %i"), search_results.size());
|
||||
wxString count_label = _("Count:") + wxString::Format(wxT(" %lu"),
|
||||
(unsigned long)search_results.size());
|
||||
if (search_results.size() > MAX_CHEAT_SEARCH_RESULTS_DISPLAY)
|
||||
{
|
||||
count_label += _(" (too many to display)");
|
||||
|
@ -97,10 +97,6 @@ BEGIN_EVENT_TABLE(CMemcardManager, wxDialog)
|
||||
EVT_MENU_RANGE(COLUMN_BANNER, NUMBER_OF_COLUMN, CMemcardManager::OnMenuChange)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
BEGIN_EVENT_TABLE(CMemcardManager::CMemcardListCtrl, wxListCtrl)
|
||||
EVT_RIGHT_DOWN(CMemcardManager::CMemcardListCtrl::OnRightClick)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
CMemcardManager::CMemcardManager(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
{
|
||||
@ -111,7 +107,7 @@ CMemcardManager::CMemcardManager(wxWindow* parent, wxWindowID id, const wxString
|
||||
{
|
||||
itemsPerPage = 16;
|
||||
mcmSettings.usePages = true;
|
||||
for (int i = 0; i < NUMBER_OF_COLUMN; i++)
|
||||
for (int i = COLUMN_BANNER; i < NUMBER_OF_COLUMN; i++)
|
||||
{
|
||||
mcmSettings.column[i] = (i <= COLUMN_FIRSTBLOCK)? true:false;
|
||||
}
|
||||
@ -191,7 +187,7 @@ void CMemcardManager::CreateGUIControls()
|
||||
|
||||
m_ConvertToGci = new wxButton(this, ID_CONVERTTOGCI, _("Convert to GCI"));
|
||||
|
||||
for (int slot = SLOT_A; slot < SLOT_B + 1; slot++)
|
||||
for (int slot = SLOT_A; slot <= SLOT_B; slot++)
|
||||
{
|
||||
m_CopyFrom[slot] = new wxButton(this, ID_COPYFROM_A + slot,
|
||||
wxString::Format(_("%1$sCopy%1$s"), ARROW[slot ? 0 : 1]));
|
||||
@ -256,7 +252,7 @@ void CMemcardManager::CreateGUIControls()
|
||||
Fit();
|
||||
Center();
|
||||
|
||||
for (int i = SLOT_A; i < SLOT_B + 1; i++)
|
||||
for (int i = SLOT_A; i <= SLOT_B; i++)
|
||||
{
|
||||
m_PrevPage[i]->Disable();
|
||||
m_NextPage[i]->Disable();
|
||||
@ -274,7 +270,7 @@ void CMemcardManager::CreateGUIControls()
|
||||
|
||||
void CMemcardManager::OnClose(wxCloseEvent& WXUNUSED (event))
|
||||
{
|
||||
Close();
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
void CMemcardManager::OnPathChange(wxFileDirPickerEvent& event)
|
||||
@ -758,7 +754,7 @@ bool CMemcardManager::ReloadMemcard(const char *fileName, int card)
|
||||
|
||||
delete[] images;
|
||||
// Automatic column width and then show the list
|
||||
for (int i = 0; i < NUMBER_OF_COLUMN; i++)
|
||||
for (int i = COLUMN_BANNER; i <= COLUMN_FIRSTBLOCK; i++)
|
||||
{
|
||||
if (mcmSettings.column[i])
|
||||
m_MemcardList[card]->SetColumnWidth(i, wxLIST_AUTOSIZE);
|
||||
@ -767,7 +763,7 @@ bool CMemcardManager::ReloadMemcard(const char *fileName, int card)
|
||||
}
|
||||
|
||||
m_MemcardList[card]->Show();
|
||||
wxLabel.Printf(_("%d Free Blocks; %d Free Dir Entries"),
|
||||
wxLabel.Printf(_("%u Free Blocks; %u Free Dir Entries"),
|
||||
memoryCard[card]->GetFreeBlocks(), DIRLEN - nFiles);
|
||||
t_Status[card]->SetLabel(wxLabel);
|
||||
|
||||
@ -812,13 +808,15 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
|
||||
popupMenu->AppendSeparator();
|
||||
|
||||
popupMenu->AppendCheckItem(COLUMN_BANNER, _("Show save banner"));
|
||||
// popupMenu->AppendCheckItem(COLUMN_BANNER, _("Show save banner"));
|
||||
popupMenu->AppendCheckItem(COLUMN_TITLE, _("Show save title"));
|
||||
popupMenu->AppendCheckItem(COLUMN_COMMENT, _("Show save comment"));
|
||||
popupMenu->AppendCheckItem(COLUMN_ICON, _("Show save icon"));
|
||||
popupMenu->AppendCheckItem(COLUMN_BLOCKS, _("Show save blocks"));
|
||||
popupMenu->AppendCheckItem(COLUMN_FIRSTBLOCK, _("Show first block"));
|
||||
|
||||
for (int i = COLUMN_BANNER; i <= COLUMN_BLOCKS; i++)
|
||||
// for (int i = COLUMN_BANNER; i <= COLUMN_FIRSTBLOCK; i++)
|
||||
for (int i = COLUMN_TITLE; i <= COLUMN_FIRSTBLOCK; i++)
|
||||
{
|
||||
popupMenu->FindItem(i)->Check(__mcmSettings.column[i]);
|
||||
}
|
||||
|
@ -137,22 +137,35 @@ class CMemcardManager : public wxDialog
|
||||
|
||||
struct _mcmSettings
|
||||
{
|
||||
bool twoCardsLoaded,
|
||||
usePages,
|
||||
column[NUMBER_OF_COLUMN+1];
|
||||
}mcmSettings;
|
||||
bool twoCardsLoaded;
|
||||
bool usePages;
|
||||
bool column[NUMBER_OF_COLUMN + 1];
|
||||
} mcmSettings;
|
||||
|
||||
class CMemcardListCtrl : public wxListCtrl
|
||||
{
|
||||
//BEGIN_EVENT_TABLE(CMemcardManager::CMemcardListCtrl, wxListCtrl)
|
||||
// EVT_RIGHT_DOWN(CMemcardManager::CMemcardListCtrl::OnRightClick)
|
||||
//END_EVENT_TABLE()
|
||||
public:
|
||||
CMemcardListCtrl(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style, _mcmSettings& _mcmSetngs)
|
||||
: wxListCtrl(parent, id, pos, size, style), __mcmSettings(_mcmSetngs){;}
|
||||
~CMemcardListCtrl(){;}
|
||||
CMemcardListCtrl(wxWindow* parent, const wxWindowID id,
|
||||
const wxPoint& pos, const wxSize& size,
|
||||
long style, _mcmSettings& _mcmSetngs)
|
||||
: wxListCtrl(parent, id, pos, size, style)
|
||||
, __mcmSettings(_mcmSetngs)
|
||||
{
|
||||
Connect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(
|
||||
CMemcardListCtrl::OnRightClick));
|
||||
}
|
||||
~CMemcardListCtrl()
|
||||
{
|
||||
Disconnect(wxEVT_RIGHT_DOWN, wxMouseEventHandler(
|
||||
CMemcardListCtrl::OnRightClick));
|
||||
}
|
||||
_mcmSettings & __mcmSettings;
|
||||
bool prevPage,
|
||||
nextPage;
|
||||
private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
void OnRightClick(wxMouseEvent& event);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user