diff --git a/checkin_notes b/checkin_notes index 3124a4fd1d..e1b977e856 100644 --- a/checkin_notes +++ b/checkin_notes @@ -1365,3 +1365,16 @@ David 23 Feb 2010 - web: translation typo html/user/ team_forum.php + +Charlie 25 Feb 2010 + - MGR: Fix a long-standing bug that made sizers fail on Mac for Advanced + Preferences dialog: I added bSizer1->Fit(this) to end of constructor. + To work around this bug, the dialog had been made resizeable and the + height and width were saved in the Manager settings. But this meant + that when we add an item to the dialog, it is too small until the + user expands it. And Modal dialogs like this should not be resizeable. + I also made the dialog no longer resizeable by the user. + + clientgui/ + DlgAdvPreferences.cpp + DlgAdvPreferencesBase.cpp, .h diff --git a/clientgui/DlgAdvPreferences.cpp b/clientgui/DlgAdvPreferences.cpp index e836f0c3e3..3290fdd059 100644 --- a/clientgui/DlgAdvPreferences.cpp +++ b/clientgui/DlgAdvPreferences.cpp @@ -143,8 +143,6 @@ bool CDlgAdvPreferences::SaveState() { pConfig->SetPath(strBaseConfigLocation); pConfig->Write(wxT("CurrentPage"),m_Notebook->GetSelection()); - pConfig->Write(wxT("Width"),this->GetSize().GetWidth()); - pConfig->Write(wxT("Height"),this->GetSize().GetHeight()); return true; } @@ -152,7 +150,7 @@ bool CDlgAdvPreferences::SaveState() { bool CDlgAdvPreferences::RestoreState() { wxString strBaseConfigLocation = wxString(wxT("/DlgAdvPreferences/")); wxConfigBase* pConfig = wxConfigBase::Get(FALSE); - int p,w,h; + int p; wxASSERT(pConfig); @@ -162,9 +160,6 @@ bool CDlgAdvPreferences::RestoreState() { pConfig->Read(wxT("CurrentPage"), &p,0); m_Notebook->SetSelection(p); - pConfig->Read(wxT("Width"), &w,-1); - pConfig->Read(wxT("Height"), &h,-1); - this->SetSize(w,h); return true; } diff --git a/clientgui/DlgAdvPreferencesBase.cpp b/clientgui/DlgAdvPreferencesBase.cpp index acb84045c7..d093fc23d9 100644 --- a/clientgui/DlgAdvPreferencesBase.cpp +++ b/clientgui/DlgAdvPreferencesBase.cpp @@ -644,6 +644,7 @@ CDlgAdvPreferencesBase::CDlgAdvPreferencesBase( wxWindow* parent, int id, wxStri bSizer5->Fit( m_panelButtons ); bSizer1->Add( m_panelButtons, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALL, 1 ); + bSizer1->Fit( this ); this->SetSizer( bSizer1 ); this->Layout(); } diff --git a/clientgui/DlgAdvPreferencesBase.h b/clientgui/DlgAdvPreferencesBase.h index 6f159e731c..2f77c768d0 100644 --- a/clientgui/DlgAdvPreferencesBase.h +++ b/clientgui/DlgAdvPreferencesBase.h @@ -202,7 +202,7 @@ class CDlgAdvPreferencesBase : public wxDialog wxButton* m_btnHelp; public: - CDlgAdvPreferencesBase( wxWindow* parent, int id = -1, wxString title = wxT(""), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 547,526 ), int style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + CDlgAdvPreferencesBase( wxWindow* parent, int id = -1, wxString title = wxT(""), wxPoint pos = wxDefaultPosition, wxSize size = wxSize( 547,526 ), int style = wxDEFAULT_DIALOG_STYLE ); };