X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/41d9dcbc6047e00f84de319d8036c80dd711c638..3cca1b3d8b187098cb67460fb2fc8115963fd2b9:/src/richtext/richtextliststylepage.cpp diff --git a/src/richtext/richtextliststylepage.cpp b/src/richtext/richtextliststylepage.cpp index 9f7710fe82..4acdca6a2a 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) { @@ -1262,7 +1268,7 @@ 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 ); } /*! @@ -1348,5 +1354,3 @@ void wxRichTextListStylePage::OnBulletAlignmentCtrlSelected( wxCommandEvent& WXU { TransferAndPreview(); } - -