From b6359a078536363244e2a8b028eb8aa45d1a9736 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 28 Nov 2007 14:10:25 +0000 Subject: [PATCH] Use wxStdDialogButtonSizer git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/richtext/richtextsymboldlg.h | 1 - src/richtext/richtextdialogs.pjd | 452 ++++++++---------------- src/richtext/richtextsymboldlg.cpp | 41 +-- 3 files changed, 158 insertions(+), 336 deletions(-) diff --git a/include/wx/richtext/richtextsymboldlg.h b/include/wx/richtext/richtextsymboldlg.h index 97e00fa919..f9d99e917b 100644 --- a/include/wx/richtext/richtextsymboldlg.h +++ b/include/wx/richtext/richtextsymboldlg.h @@ -117,7 +117,6 @@ public: void OnFromUnicodeSelected( wxCommandEvent& event ); #endif - /// wxEVT_UPDATE_UI event handler for wxID_OK void OnOkUpdate( wxUpdateUIEvent& event ); diff --git a/src/richtext/richtextdialogs.pjd b/src/richtext/richtextdialogs.pjd index d137b863c3..b1d6241d26 100644 --- a/src/richtext/richtextdialogs.pjd +++ b/src/richtext/richtextdialogs.pjd @@ -8329,7 +8329,7 @@ 1 0 0 - "5/10/2006" + "28/11/2007" "wbBoxSizerProxy" "Horizontal" "" @@ -8344,192 +8344,7 @@ 0 0 0 - "__WXMSW__,__WXGTK__,__WXPM__,__WXMGL__,__WXMOTIF__,__WXCOCOA__,__WXX11__,__WXPALMOS__" - - "Spacer" - "dialog-control-document" - "" - "spacer" - 0 - 1 - 0 - 0 - "5/10/2006" - "wbSpacerProxy" - 5 - 5 - "Centre" - "Centre" - 1 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - - "wxButton: wxID_OK" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "5/10/2006" - "wbButtonProxy" - "wxEVT_UPDATE_UI|OnOkUpdate" - "wxID_OK" - 5100 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "Insert" - 1 - "Inserts the chosen symbol." - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxButton: wxID_CANCEL" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "5/10/2006" - "wbButtonProxy" - "wxID_CANCEL" - 5101 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "Close" - 0 - "Closes the dialog without inserting a symbol." - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - "wxBoxSizer H" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "5/10/2006" - "wbBoxSizerProxy" - "Horizontal" - "" - "Expand" - "Centre" - 0 - 5 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "__WXMAC__" + "<Any platform>" "Spacer" "dialog-control-document" @@ -8539,7 +8354,7 @@ 1 0 0 - "5/10/2006" + "28/11/2007" "wbSpacerProxy" 5 5 @@ -8557,137 +8372,170 @@ "<Any platform>" - "wxButton: wxID_CANCEL" + "wxStdDialogButtonSizer" "dialog-control-document" "" - "dialogcontrol" + "sizer" 0 1 0 0 - "5/10/2006" - "wbButtonProxy" - "wxID_CANCEL" - 5101 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" + "28/11/2007" + "wbStdDialogButtonSizerProxy" + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 "" - "Close" - 0 - "Closes the dialog without inserting a symbol." - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 "Centre" "Centre" 0 5 - 1 - 1 + 0 + 0 1 1 0 0 0 - "" - "" - - - "wxButton: wxID_OK" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "5/10/2006" - "wbButtonProxy" - "wxEVT_UPDATE_UI|OnOkUpdate" - "wxID_OK" - 5100 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "Insert" - 1 - "Inserts the chosen symbol." - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" + + "wxButton: wxID_OK" + "dialog-control-document" + "" + "dialogcontrol" + 0 + 1 + 0 + 1 + "28/11/2007" + "wbButtonProxy" + "wxEVT_UPDATE_UI|OnOkUpdate|NONE||wxSymbolPickerDialog" + "wxID_OK" + 5100 + "" + "wxButton" + "wxButton" + 1 + 0 + "" + "" + "" + "Insert" + 1 + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + + + "wxButton: wxID_CANCEL" + "dialog-control-document" + "" + "dialogcontrol" + 0 + 1 + 0 + 1 + "28/11/2007" + "wbButtonProxy" + "wxID_CANCEL" + 5101 + "" + "wxButton" + "wxButton" + 1 + 0 + "" + "" + "" + "Close" + 0 + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + diff --git a/src/richtext/richtextsymboldlg.cpp b/src/richtext/richtextsymboldlg.cpp index bf5aa0d7c0..6926dae724 100644 --- a/src/richtext/richtextsymboldlg.cpp +++ b/src/richtext/richtextsymboldlg.cpp @@ -459,47 +459,22 @@ void wxSymbolPickerDialog::CreateControls() #endif -#if defined(__WXMSW__) || defined(__WXGTK__) || defined(__WXPM__) || defined(__WXMGL__) || defined(__WXMOTIF__) || defined(__WXCOCOA__) || defined(__WXX11__) || defined(__WXPALMOS__) wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL); itemBoxSizer3->Add(itemBoxSizer20, 0, wxGROW, 5); itemBoxSizer20->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5); - wxButton* itemButton22 = new wxButton( itemDialog1, wxID_OK, _("Insert"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton22->SetDefault(); - itemButton22->SetHelpText(_("Inserts the chosen symbol.")); - if (wxSymbolPickerDialog::ShowToolTips()) - itemButton22->SetToolTip(_("Inserts the chosen symbol.")); - itemBoxSizer20->Add(itemButton22, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxButton* itemButton23 = new wxButton( itemDialog1, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton23->SetHelpText(_("Closes the dialog without inserting a symbol.")); - if (wxSymbolPickerDialog::ShowToolTips()) - itemButton23->SetToolTip(_("Closes the dialog without inserting a symbol.")); - itemBoxSizer20->Add(itemButton23, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - -#endif + wxStdDialogButtonSizer* itemStdDialogButtonSizer22 = new wxStdDialogButtonSizer; -#if defined(__WXMAC__) - wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxHORIZONTAL); - itemBoxSizer3->Add(itemBoxSizer24, 0, wxGROW, 5); + itemBoxSizer20->Add(itemStdDialogButtonSizer22, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); + wxButton* itemButton23 = new wxButton( itemDialog1, wxID_OK, _("Insert"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton23->SetDefault(); + itemStdDialogButtonSizer22->AddButton(itemButton23); - itemBoxSizer24->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5); + wxButton* itemButton24 = new wxButton( itemDialog1, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + itemStdDialogButtonSizer22->AddButton(itemButton24); - wxButton* itemButton26 = new wxButton( itemDialog1, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton26->SetHelpText(_("Closes the dialog without inserting a symbol.")); - if (wxSymbolPickerDialog::ShowToolTips()) - itemButton26->SetToolTip(_("Closes the dialog without inserting a symbol.")); - itemBoxSizer24->Add(itemButton26, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxButton* itemButton27 = new wxButton( itemDialog1, wxID_OK, _("Insert"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton27->SetDefault(); - itemButton27->SetHelpText(_("Inserts the chosen symbol.")); - if (wxSymbolPickerDialog::ShowToolTips()) - itemButton27->SetToolTip(_("Inserts the chosen symbol.")); - itemBoxSizer24->Add(itemButton27, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - -#endif + itemStdDialogButtonSizer22->Realize(); ////@end wxSymbolPickerDialog content construction -- 2.47.2