Layout should not be called until after a sizer is inserted into its parent. This fixes the "gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 17" type console warnings that are annoying on linux. If there are issues with this on other platforms let me know, but there shouldn't be.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6459 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
3ebd09efc9
commit
cefaa393e6
|
@ -37,7 +37,6 @@ u32 Timer::GetTimeMs()
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return timeGetTime();
|
return timeGetTime();
|
||||||
#else
|
#else
|
||||||
printf("using gettimeofday\n");
|
|
||||||
struct timeval t;
|
struct timeval t;
|
||||||
(void)gettimeofday(&t, NULL);
|
(void)gettimeofday(&t, NULL);
|
||||||
return ((u32)(t.tv_sec * 1000 + t.tv_usec / 1000));
|
return ((u32)(t.tv_sec * 1000 + t.tv_usec / 1000));
|
||||||
|
|
|
@ -449,8 +449,6 @@ void CConfigMain::CreateGUIControls()
|
||||||
sGeneralPage->Add(sbAdvanced, 0, wxEXPAND | wxALL, 5);
|
sGeneralPage->Add(sbAdvanced, 0, wxEXPAND | wxALL, 5);
|
||||||
|
|
||||||
GeneralPage->SetSizer(sGeneralPage);
|
GeneralPage->SetSizer(sGeneralPage);
|
||||||
sGeneralPage->Layout();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Display page
|
// Display page
|
||||||
|
@ -520,8 +518,6 @@ void CConfigMain::CreateGUIControls()
|
||||||
sDisplayPage->Add(sbInterface, 0, wxEXPAND | wxALL, 5);
|
sDisplayPage->Add(sbInterface, 0, wxEXPAND | wxALL, 5);
|
||||||
|
|
||||||
DisplayPage->SetSizer(sDisplayPage);
|
DisplayPage->SetSizer(sDisplayPage);
|
||||||
sDisplayPage->Layout();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Gamecube page
|
// Gamecube page
|
||||||
|
@ -641,8 +637,6 @@ void CConfigMain::CreateGUIControls()
|
||||||
sGamecubePage->Add(sbGamecubeDeviceSettings, 0, wxEXPAND|wxALL, 5);
|
sGamecubePage->Add(sbGamecubeDeviceSettings, 0, wxEXPAND|wxALL, 5);
|
||||||
|
|
||||||
GamecubePage->SetSizer(sGamecubePage);
|
GamecubePage->SetSizer(sGamecubePage);
|
||||||
sGamecubePage->Layout();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Wii page
|
// Wii page
|
||||||
|
@ -690,8 +684,6 @@ void CConfigMain::CreateGUIControls()
|
||||||
sWiiPage->Add(sbWiiDeviceSettings, 0, wxEXPAND|wxALL, 5);
|
sWiiPage->Add(sbWiiDeviceSettings, 0, wxEXPAND|wxALL, 5);
|
||||||
|
|
||||||
WiiPage->SetSizer(sWiiPage);
|
WiiPage->SetSizer(sWiiPage);
|
||||||
sWiiPage->Layout();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Paths page
|
// Paths page
|
||||||
|
@ -737,8 +729,6 @@ void CConfigMain::CreateGUIControls()
|
||||||
sPathsPage->Add(sOtherPaths, 0, wxEXPAND|wxALL, 5);
|
sPathsPage->Add(sOtherPaths, 0, wxEXPAND|wxALL, 5);
|
||||||
|
|
||||||
PathsPage->SetSizer(sPathsPage);
|
PathsPage->SetSizer(sPathsPage);
|
||||||
sPathsPage->Layout();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Plugins page
|
// Plugins page
|
||||||
|
@ -763,7 +753,7 @@ void CConfigMain::CreateGUIControls()
|
||||||
sPluginsPage->Add(sbDSPPlugin, 0, wxEXPAND|wxALL, 5);
|
sPluginsPage->Add(sbDSPPlugin, 0, wxEXPAND|wxALL, 5);
|
||||||
|
|
||||||
PluginsPage->SetSizer(sPluginsPage);
|
PluginsPage->SetSizer(sPluginsPage);
|
||||||
sPluginsPage->Layout();
|
|
||||||
|
|
||||||
m_Ok = new wxButton(this, wxID_OK);
|
m_Ok = new wxButton(this, wxID_OK);
|
||||||
|
|
||||||
|
@ -795,8 +785,6 @@ void CConfigMain::OnClose(wxCloseEvent& WXUNUSED (event))
|
||||||
void CConfigMain::OnOk(wxCommandEvent& WXUNUSED (event))
|
void CConfigMain::OnOk(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
// Sysconf saves when it gets deleted
|
|
||||||
//delete SConfig::GetInstance().m_SYSCONF;
|
|
||||||
|
|
||||||
// Save the config. Dolphin crashes to often to save the settings on closing only
|
// Save the config. Dolphin crashes to often to save the settings on closing only
|
||||||
SConfig::GetInstance().SaveSettings();
|
SConfig::GetInstance().SaveSettings();
|
||||||
|
@ -1097,17 +1085,13 @@ void CConfigMain::AddRemoveISOPaths(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
if (event.GetId() == ID_ADDISOPATH)
|
if (event.GetId() == ID_ADDISOPATH)
|
||||||
{
|
{
|
||||||
wxString dirHome;
|
wxDirDialog dialog(this, _T("Choose a directory to add"), wxGetHomeDir(),
|
||||||
wxGetHomeDir(&dirHome);
|
wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
|
||||||
|
|
||||||
wxDirDialog dialog(this, _T("Choose a directory to add"), dirHome, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
|
|
||||||
|
|
||||||
if (dialog.ShowModal() == wxID_OK)
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
if (ISOPaths->FindString(dialog.GetPath()) != -1)
|
if (ISOPaths->FindString(dialog.GetPath()) != -1)
|
||||||
{
|
|
||||||
wxMessageBox(_("The chosen directory is already in the list"), _("Error"), wxOK);
|
wxMessageBox(_("The chosen directory is already in the list"), _("Error"), wxOK);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bRefreshList = true;
|
bRefreshList = true;
|
||||||
|
|
|
@ -317,9 +317,9 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Progressive Scan is not used by Dolphin itself,
|
// Progressive Scan is not used by Dolphin itself, and changing it on a per-game
|
||||||
//and changing it on a per-game basis would have the side-effect of changing the SysConf,
|
// basis would have the side-effect of changing the SysConf, making this setting
|
||||||
//making this setting rather useless.
|
// rather useless.
|
||||||
EnableProgressiveScan->Disable();
|
EnableProgressiveScan->Disable();
|
||||||
}
|
}
|
||||||
// Video
|
// Video
|
||||||
|
@ -397,7 +397,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sEmuState->Add(EmuIssues,1,wxEXPAND);
|
sEmuState->Add(EmuIssues,1,wxEXPAND);
|
||||||
sConfigPage->Add(sEmuState, 0, wxEXPAND|wxALL, 5);
|
sConfigPage->Add(sEmuState, 0, wxEXPAND|wxALL, 5);
|
||||||
m_GameConfig->SetSizer(sConfigPage);
|
m_GameConfig->SetSizer(sConfigPage);
|
||||||
sConfigPage->Layout();
|
|
||||||
|
|
||||||
|
|
||||||
// Patches
|
// Patches
|
||||||
|
@ -420,7 +419,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sPatches->Add(sPatchButtons, 0, wxEXPAND|wxALL, 0);
|
sPatches->Add(sPatchButtons, 0, wxEXPAND|wxALL, 0);
|
||||||
sPatchPage->Add(sPatches, 1, wxEXPAND|wxALL, 5);
|
sPatchPage->Add(sPatches, 1, wxEXPAND|wxALL, 5);
|
||||||
m_PatchPage->SetSizer(sPatchPage);
|
m_PatchPage->SetSizer(sPatchPage);
|
||||||
sPatchPage->Layout();
|
|
||||||
|
|
||||||
|
|
||||||
// Action Replay Cheats
|
// Action Replay Cheats
|
||||||
|
@ -443,7 +441,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sCheats->Add(sCheatButtons, 0, wxEXPAND|wxALL, 0);
|
sCheats->Add(sCheatButtons, 0, wxEXPAND|wxALL, 0);
|
||||||
sCheatPage->Add(sCheats, 1, wxEXPAND|wxALL, 5);
|
sCheatPage->Add(sCheats, 1, wxEXPAND|wxALL, 5);
|
||||||
m_CheatPage->SetSizer(sCheatPage);
|
m_CheatPage->SetSizer(sCheatPage);
|
||||||
sCheatPage->Layout();
|
|
||||||
|
|
||||||
|
|
||||||
m_NameText = new wxStaticText(m_Information, ID_NAME_TEXT, _("Name:"), wxDefaultPosition, wxDefaultSize);
|
m_NameText = new wxStaticText(m_Information, ID_NAME_TEXT, _("Name:"), wxDefaultPosition, wxDefaultSize);
|
||||||
|
@ -516,7 +513,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sInfoPage->Add(sbISODetails, 0, wxEXPAND|wxALL, 5);
|
sInfoPage->Add(sbISODetails, 0, wxEXPAND|wxALL, 5);
|
||||||
sInfoPage->Add(sbBannerDetails, 0, wxEXPAND|wxALL, 5);
|
sInfoPage->Add(sbBannerDetails, 0, wxEXPAND|wxALL, 5);
|
||||||
m_Information->SetSizer(sInfoPage);
|
m_Information->SetSizer(sInfoPage);
|
||||||
sInfoPage->Layout();
|
|
||||||
|
|
||||||
// Filesystem icons
|
// Filesystem icons
|
||||||
m_iconList = new wxImageList(16, 16);
|
m_iconList = new wxImageList(16, 16);
|
||||||
|
@ -533,7 +529,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sTreePage = new wxBoxSizer(wxVERTICAL);
|
sTreePage = new wxBoxSizer(wxVERTICAL);
|
||||||
sTreePage->Add(m_Treectrl, 1, wxEXPAND|wxALL, 5);
|
sTreePage->Add(m_Treectrl, 1, wxEXPAND|wxALL, 5);
|
||||||
m_Filesystem->SetSizer(sTreePage);
|
m_Filesystem->SetSizer(sTreePage);
|
||||||
sTreePage->Layout();
|
|
||||||
|
|
||||||
// It's a wad file, so we remove the FileSystem page
|
// It's a wad file, so we remove the FileSystem page
|
||||||
if (IsWad)
|
if (IsWad)
|
||||||
|
@ -547,8 +542,8 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||||
sMain->Add(sButtons, 0, wxEXPAND, 5);
|
sMain->Add(sButtons, 0, wxEXPAND, 5);
|
||||||
sMain->SetMinSize(wxSize(550, 600));
|
sMain->SetMinSize(wxSize(550, 600));
|
||||||
|
|
||||||
m_Notebook->SetMaxSize(wxSize(550, 600));
|
|
||||||
SetSizerAndFit(sMain);
|
SetSizerAndFit(sMain);
|
||||||
|
Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CISOProperties::OnClose(wxCloseEvent& WXUNUSED (event))
|
void CISOProperties::OnClose(wxCloseEvent& WXUNUSED (event))
|
||||||
|
|
Loading…
Reference in New Issue