Warning fix and source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -101,7 +101,7 @@ wxSizer *wxDialogBase::CreateTextSizer( const wxString& message )
|
|||||||
switch ( text[pos] )
|
switch ( text[pos] )
|
||||||
{
|
{
|
||||||
case wxT('\n'):
|
case wxT('\n'):
|
||||||
if (!line.IsEmpty())
|
if (!line.empty())
|
||||||
{
|
{
|
||||||
wxStaticText *s = new wxStaticText( this, wxID_ANY, line );
|
wxStaticText *s = new wxStaticText( this, wxID_ANY, line );
|
||||||
box->Add( s );
|
box->Add( s );
|
||||||
@@ -155,7 +155,7 @@ wxSizer *wxDialogBase::CreateTextSizer( const wxString& message )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remaining text behind last '\n'
|
// remaining text behind last '\n'
|
||||||
if (!line.IsEmpty())
|
if (!line.empty())
|
||||||
{
|
{
|
||||||
wxStaticText *s2 = new wxStaticText( this, wxID_ANY, line );
|
wxStaticText *s2 = new wxStaticText( this, wxID_ANY, line );
|
||||||
box->Add( s2 );
|
box->Add( s2 );
|
||||||
@@ -177,38 +177,36 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
|
|||||||
{
|
{
|
||||||
wxStdDialogButtonSizer *sizer = new wxStdDialogButtonSizer();
|
wxStdDialogButtonSizer *sizer = new wxStdDialogButtonSizer();
|
||||||
wxButton *ok = NULL;
|
wxButton *ok = NULL;
|
||||||
wxButton *cancel = NULL;
|
|
||||||
wxButton *yes = NULL;
|
wxButton *yes = NULL;
|
||||||
wxButton *no = NULL;
|
wxButton *no = NULL;
|
||||||
wxButton *help = NULL;
|
|
||||||
|
|
||||||
if (flags & wxOK){
|
if (flags & wxOK){
|
||||||
ok = new wxButton(this, wxID_OK, _("OK"));
|
ok = new wxButton(this, wxID_OK, _("OK"));
|
||||||
sizer->AddButton(ok);
|
sizer->AddButton(ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & wxCANCEL){
|
if (flags & wxCANCEL){
|
||||||
cancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
|
wxButton *cancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
|
||||||
sizer->AddButton(cancel);
|
sizer->AddButton(cancel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & wxYES){
|
if (flags & wxYES){
|
||||||
yes = new wxButton(this, wxID_YES, _("Yes"));
|
yes = new wxButton(this, wxID_YES, _("Yes"));
|
||||||
sizer->AddButton(yes);
|
sizer->AddButton(yes);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & wxNO){
|
if (flags & wxNO){
|
||||||
no = new wxButton(this, wxID_NO, _("No"));
|
no = new wxButton(this, wxID_NO, _("No"));
|
||||||
sizer->AddButton(no);
|
sizer->AddButton(no);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & wxHELP){
|
if (flags & wxHELP){
|
||||||
help = new wxButton(this, wxID_HELP, _("Help"));
|
wxButton *help = new wxButton(this, wxID_HELP, _("Help"));
|
||||||
sizer->AddButton(help);
|
sizer->AddButton(help);
|
||||||
}
|
}
|
||||||
|
|
||||||
sizer->Finalise();
|
sizer->Finalise();
|
||||||
|
|
||||||
if (flags & wxNO_DEFAULT)
|
if (flags & wxNO_DEFAULT)
|
||||||
{
|
{
|
||||||
if (no)
|
if (no)
|
||||||
|
Reference in New Issue
Block a user