X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94e0018723919fe2ca2f5b5f0a42804c16dbf3a1..80dcb89812d84f41567a69ff83769b26ab519468:/src/richtext/richtextliststylepage.cpp?ds=sidebyside diff --git a/src/richtext/richtextliststylepage.cpp b/src/richtext/richtextliststylepage.cpp index 9f7710fe82..b5cc9614d3 100644 --- a/src/richtext/richtextliststylepage.cpp +++ b/src/richtext/richtextliststylepage.cpp @@ -184,7 +184,7 @@ void wxRichTextListStylePage::CreateControls() wxStaticText* itemStaticText5 = new wxStaticText( itemRichTextDialogPage1, wxID_STATIC, _("&List level:"), wxDefaultPosition, wxDefaultSize, 0 ); itemBoxSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - m_levelCtrl = new wxSpinCtrl( itemRichTextDialogPage1, ID_RICHTEXTLISTSTYLEPAGE_LEVEL, _T("1"), wxDefaultPosition, wxSize(60, -1), wxSP_ARROW_KEYS, 1, 10, 1 ); + m_levelCtrl = new wxSpinCtrl( itemRichTextDialogPage1, ID_RICHTEXTLISTSTYLEPAGE_LEVEL, wxT("1"), wxDefaultPosition, wxSize(60, -1), wxSP_ARROW_KEYS, 1, 10, 1 ); m_levelCtrl->SetHelpText(_("Selects the list level to edit.")); if (wxRichTextListStylePage::ShowToolTips()) m_levelCtrl->SetToolTip(_("Selects the list level to edit.")); @@ -666,7 +666,13 @@ bool wxRichTextListStylePage::TransferDataFromWindow() bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_SYMBOL; else if (index == wxRICHTEXT_BULLETINDEX_BITMAP) + { bulletStyle |= wxTEXT_ATTR_BULLET_STYLE_BITMAP; + if (m_bulletNameCtrl->GetValue().IsEmpty()) + attr->SetFlags(attr->GetFlags() & ~wxTEXT_ATTR_BULLET_NAME); + else + attr->SetBulletName(m_bulletNameCtrl->GetValue()); + } else if (index == wxRICHTEXT_BULLETINDEX_STANDARD) { @@ -891,7 +897,7 @@ void wxRichTextListStylePage::TransferAndPreview() /*! - * wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + * wxEVT_SPINCTRL event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL */ void wxRichTextListStylePage::OnLevelUpdated( wxSpinEvent& WXUNUSED(event) ) @@ -930,7 +936,7 @@ void wxRichTextListStylePage::OnLevelDown( wxSpinEvent& event ) } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL */ void wxRichTextListStylePage::OnLevelTextUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -958,7 +964,7 @@ void wxRichTextListStylePage::OnLevelUIUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX + * wxEVT_LISTBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX */ void wxRichTextListStylePage::OnStylelistboxSelected( wxCommandEvent& WXUNUSED(event) ) @@ -976,7 +982,7 @@ void wxRichTextListStylePage::OnSymbolstaticUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL */ void wxRichTextListStylePage::OnSymbolctrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -985,7 +991,7 @@ void wxRichTextListStylePage::OnSymbolctrlSelected( wxCommandEvent& WXUNUSED(eve } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL + * wxEVT_TEXT event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL */ void wxRichTextListStylePage::OnSymbolctrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1003,7 +1009,7 @@ void wxRichTextListStylePage::OnSymbolctrlUIUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL + * wxEVT_BUTTON event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL */ void wxRichTextListStylePage::OnChooseSymbolClick( wxCommandEvent& WXUNUSED(event) ) @@ -1039,7 +1045,7 @@ void wxRichTextListStylePage::OnChooseSymbolUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL */ void wxRichTextListStylePage::OnSymbolfontctrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1048,7 +1054,7 @@ void wxRichTextListStylePage::OnSymbolfontctrlSelected( wxCommandEvent& WXUNUSED } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL */ void wxRichTextListStylePage::OnSymbolfontctrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1066,7 +1072,7 @@ void wxRichTextListStylePage::OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE__PARENTHESESCTRL */ void wxRichTextListStylePage::OnParenthesesctrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -1087,7 +1093,7 @@ void wxRichTextListStylePage::OnParenthesesctrlUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL */ void wxRichTextListStylePage::OnPeriodctrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -1108,7 +1114,7 @@ void wxRichTextListStylePage::OnPeriodctrlUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT */ void wxRichTextListStylePage::OnRichtextliststylepageAlignleftSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1117,7 +1123,7 @@ void wxRichTextListStylePage::OnRichtextliststylepageAlignleftSelected( wxComman } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT */ void wxRichTextListStylePage::OnRichtextliststylepageAlignrightSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1126,7 +1132,7 @@ void wxRichTextListStylePage::OnRichtextliststylepageAlignrightSelected( wxComma } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED */ void wxRichTextListStylePage::OnRichtextliststylepageJustifiedSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1135,7 +1141,7 @@ void wxRichTextListStylePage::OnRichtextliststylepageJustifiedSelected( wxComman } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_CENTERED + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CENTERED */ void wxRichTextListStylePage::OnRichtextliststylepageCenteredSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1144,7 +1150,7 @@ void wxRichTextListStylePage::OnRichtextliststylepageCenteredSelected( wxCommand } /*! - * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE + * wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE */ void wxRichTextListStylePage::OnRichtextliststylepageAlignindeterminateSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1153,7 +1159,7 @@ void wxRichTextListStylePage::OnRichtextliststylepageAlignindeterminateSelected( } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT */ void wxRichTextListStylePage::OnIndentLeftUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1162,7 +1168,7 @@ void wxRichTextListStylePage::OnIndentLeftUpdated( wxCommandEvent& WXUNUSED(even } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE */ void wxRichTextListStylePage::OnIndentFirstLineUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1171,7 +1177,7 @@ void wxRichTextListStylePage::OnIndentFirstLineUpdated( wxCommandEvent& WXUNUSED } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT */ void wxRichTextListStylePage::OnIndentRightUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1180,7 +1186,7 @@ void wxRichTextListStylePage::OnIndentRightUpdated( wxCommandEvent& WXUNUSED(eve } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE */ void wxRichTextListStylePage::OnSpacingBeforeUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1189,7 +1195,7 @@ void wxRichTextListStylePage::OnSpacingBeforeUpdated( wxCommandEvent& WXUNUSED(e } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER */ void wxRichTextListStylePage::OnSpacingAfterUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1198,7 +1204,7 @@ void wxRichTextListStylePage::OnSpacingAfterUpdated( wxCommandEvent& WXUNUSED(ev } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_LINESPACING + * wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_LINESPACING */ void wxRichTextListStylePage::OnLineSpacingSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1262,11 +1268,11 @@ void wxRichTextListStylePage::OnNumberUpdate( wxUpdateUIEvent& event ) void wxRichTextListStylePage::OnStandardBulletUpdate( wxUpdateUIEvent& event ) { int sel = m_styleListBox->GetSelection(); - event.Enable( sel == wxRICHTEXT_BULLETINDEX_STANDARD ); + event.Enable( sel == wxRICHTEXT_BULLETINDEX_STANDARD || sel == wxRICHTEXT_BULLETINDEX_BITMAP ); } /*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT + * wxEVT_BUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT */ void wxRichTextListStylePage::OnChooseFontClick( wxCommandEvent& WXUNUSED(event) ) @@ -1294,7 +1300,7 @@ void wxRichTextListStylePage::OnNamestaticUpdate( wxUpdateUIEvent& event ) } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL */ void wxRichTextListStylePage::OnNamectrlSelected( wxCommandEvent& WXUNUSED(event) ) @@ -1303,7 +1309,7 @@ void wxRichTextListStylePage::OnNamectrlSelected( wxCommandEvent& WXUNUSED(event } /*! - * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL + * wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL */ void wxRichTextListStylePage::OnNamectrlUpdated( wxCommandEvent& WXUNUSED(event) ) @@ -1320,7 +1326,7 @@ void wxRichTextListStylePage::OnNamectrlUIUpdate( wxUpdateUIEvent& event ) OnStandardBulletUpdate(event); } /*! - * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL + * wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL */ void wxRichTextListStylePage::OnRightParenthesisCtrlClick( wxCommandEvent& WXUNUSED(event) ) @@ -1341,12 +1347,10 @@ void wxRichTextListStylePage::OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& eve } /*! - * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL + * wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL */ void wxRichTextListStylePage::OnBulletAlignmentCtrlSelected( wxCommandEvent& WXUNUSED(event) ) { TransferAndPreview(); } - -