X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/458ca8c1fdad48cf05476338b946634eec03fe16..39fbbfda3c702e44d0c128a39440a321489b9b28:/src/common/dlgcmn.cpp?ds=sidebyside diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index 0fa83f4475..3aa20ce30a 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -6,7 +6,7 @@ // Created: 28.06.99 // RCS-ID: $Id$ // Copyright: (c) Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dialogbase.h" #endif @@ -67,7 +67,7 @@ void wxDialogBase::Init() #endif } -#if wxUSE_STATTEXT && wxUSE_TEXTCTRL +#if wxUSE_STATTEXT // && wxUSE_TEXTCTRL wxSizer *wxDialogBase::CreateTextSizer( const wxString& message ) { @@ -164,7 +164,7 @@ wxSizer *wxDialogBase::CreateTextSizer( const wxString& message ) return box; } -#endif // wxUSE_STATTEXT && wxUSE_TEXTCTRL +#endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL #if wxUSE_BUTTON @@ -172,14 +172,9 @@ wxSizer *wxDialogBase::CreateButtonSizer( long flags ) { bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA); - wxBoxSizer *box = NULL; - // If we have a PDA screen, put yes/no button over // all other buttons, otherwise on the left side. - if (is_pda) - box = new wxBoxSizer( wxVERTICAL ); - else - box = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer *box = is_pda ? new wxBoxSizer( wxVERTICAL ) : new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *inner_yes_no = NULL; @@ -201,7 +196,6 @@ wxSizer *wxDialogBase::CreateButtonSizer( long flags ) #endif wxButton *ok = (wxButton *) NULL; - wxButton *cancel = (wxButton *) NULL; wxButton *yes = (wxButton *) NULL; wxButton *no = (wxButton *) NULL; @@ -212,39 +206,39 @@ wxSizer *wxDialogBase::CreateButtonSizer( long flags ) if (flags & wxYES) { yes = new wxButton( this, wxID_YES, _("Yes"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ); - inner_yes_no->Add( yes, 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, margin ); + inner_yes_no->Add( yes, 0, wxLEFT|wxRIGHT, margin ); } if (flags & wxNO) { no = new wxButton( this, wxID_NO, _("No"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ); - inner_yes_no->Add( no, 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, margin ); + inner_yes_no->Add( no, 0, wxLEFT|wxRIGHT, margin ); } if (flags & wxOK) { ok = new wxButton( this, wxID_OK, _("OK"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ); - inner_rest->Add( ok, 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, margin ); + inner_rest->Add( ok, 0, wxLEFT|wxRIGHT, margin ); } if (flags & wxFORWARD) - inner_rest->Add( new wxButton( this, wxID_FORWARD, _("Forward"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, margin ); + inner_rest->Add( new wxButton( this, wxID_FORWARD, _("Forward"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT, margin ); if (flags & wxBACKWARD) - inner_rest->Add( new wxButton( this, wxID_BACKWARD, _("Backward"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, margin ); + inner_rest->Add( new wxButton( this, wxID_BACKWARD, _("Backward"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT, margin ); if (flags & wxSETUP) - inner_rest->Add( new wxButton( this, wxID_SETUP, _("Setup"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, margin ); + inner_rest->Add( new wxButton( this, wxID_SETUP, _("Setup"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT, margin ); if (flags & wxMORE) - inner_rest->Add( new wxButton( this, wxID_MORE, _("More..."),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, margin ); + inner_rest->Add( new wxButton( this, wxID_MORE, _("More..."),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT, margin ); if (flags & wxHELP) - inner_rest->Add( new wxButton( this, wxID_HELP, _("Help"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, margin ); + inner_rest->Add( new wxButton( this, wxID_HELP, _("Help"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ), 0, wxLEFT|wxRIGHT, margin ); if (flags & wxCANCEL) { - cancel = new wxButton( this, wxID_CANCEL, _("Cancel"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ); - inner_rest->Add( cancel, 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, margin ); + wxButton *cancel = new wxButton( this, wxID_CANCEL, _("Cancel"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS ); + inner_rest->Add( cancel, 0, wxLEFT|wxRIGHT, margin ); } // choose the default button