mirror of https://github.com/BOINC/boinc.git
MGR: Fix Advanced Dialog sizer bug on Mac, make it no longer resizeable by user.
svn path=/trunk/boinc/; revision=20727
This commit is contained in:
parent
13513e3e24
commit
16e1ca0485
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue