Replace strncpy with wxStrlcpy in wxSTC
Remove duplicate line in src/stc/gen_iface.py
Use wxScopedCharBuffer instead of wxCharBuffer in wxSTC Direct2D code
Fix assert when clipboard atom names are not ASCII strings Although atom names are usually ASCII-only, this is not always the case, especially when considering MIME type names using extra parameters which may contain arbitrary and even user-provided data (e.g. LibreOffice uses the file name as one of the parameters for the data it puts on clipboard). Assume the string is in UTF-8 instead, as this seems to be the only reasonable thing to do, but also account for the possibility that it might not be a valid UTF-8 string by using MAP_INVALID_UTF8_TO_PUA fallback flag to wxMBConvUTF8. Closes #26263.
Update project version to 3.3.3 in Doxygen docs This wasn't committed before due to an operator mistake.
Remove mnemonics from accessible labels of controls Strip '&' accelerator markers from the label returned by wxWindowAccessible::GetName() by using wxControl::GetLabelText() instead of assigning the raw label directly. This is an extra bug fix on top of 85c436dcc4 (Fix accessible label of checkboxes broken by recent changes, 2026-03-06). See #26184, #26187, #26270. Closes #26275.
Merge branch 'stc_cleanup' of github.com:filip-hejsek/wxWidgets Minor STC cleanup. See #26273.
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | |
| 7 | 7 | DOXYFILE_ENCODING = UTF-8
|
| 8 | 8 | PROJECT_NAME = wxWidgets
|
| 9 | -PROJECT_NUMBER = 3.3.1
|
|
| 9 | +PROJECT_NUMBER = 3.3.3
|
|
| 10 | 10 | PROJECT_BRIEF =
|
| 11 | 11 | PROJECT_LOGO = logo.png
|
| 12 | 12 | OUTPUT_DIRECTORY = out
|
| ... | ... | @@ -3891,7 +3891,7 @@ wxAccStatus wxWindowAccessible::GetName(int childId, wxString* name) |
| 3891 | 3891 | |
| 3892 | 3892 | if (!title.empty())
|
| 3893 | 3893 | {
|
| 3894 | - *name = title;
|
|
| 3894 | + *name = wxStripMenuCodes(title, wxStrip_Mnemonics);
|
|
| 3895 | 3895 | return wxACC_OK;
|
| 3896 | 3896 | }
|
| 3897 | 3897 | else
|
| ... | ... | @@ -140,7 +140,11 @@ wxDataFormatId wxDataFormat::GetType() const |
| 140 | 140 | wxString wxDataFormat::GetId() const
|
| 141 | 141 | {
|
| 142 | 142 | wxGtkString atom_name(gdk_atom_name(m_format));
|
| 143 | - return wxString::FromAscii(atom_name);
|
|
| 143 | + |
|
| 144 | + // In practice atom name is always in UTF-8, but don't lose the name
|
|
| 145 | + // entirely if it isn't.
|
|
| 146 | + wxMBConvUTF8 conv(wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA);
|
|
| 147 | + return wxString(conv.cMB2WX(atom_name.c_str()));
|
|
| 144 | 148 | }
|
| 145 | 149 | |
| 146 | 150 | void wxDataFormat::SetId( NativeFormat format )
|
| ... | ... | @@ -2920,8 +2920,7 @@ void wxSTCListBox::Select(int n) |
| 2920 | 2920 | |
| 2921 | 2921 | void wxSTCListBox::GetValue(int n, char *value, int len) const
|
| 2922 | 2922 | {
|
| 2923 | - strncpy(value, m_labels[n].utf8_str(), len);
|
|
| 2924 | - value[len-1] = '\0';
|
|
| 2923 | + wxStrlcpy(value, m_labels[n].utf8_str(), len);
|
|
| 2925 | 2924 | }
|
| 2926 | 2925 | |
| 2927 | 2926 | void wxSTCListBox::SetDelegate(IListBoxDelegate* lbDelegate)
|
| ... | ... | @@ -3226,7 +3225,7 @@ public: |
| 3226 | 3225 | // characters from the end of the label until it's short enough.
|
| 3227 | 3226 | wxString ellipsizedLabel = label;
|
| 3228 | 3227 | |
| 3229 | - wxCharBuffer buffer = ellipsizedLabel.utf8_str();
|
|
| 3228 | + wxScopedCharBuffer buffer = ellipsizedLabel.utf8_str();
|
|
| 3230 | 3229 | int curWidth = surface.WidthText(tempFont, buffer.data(), buffer.length());
|
| 3231 | 3230 | |
| 3232 | 3231 | for ( int i = label.length(); curWidth > rect.GetWidth() && i; --i )
|
| ... | ... | @@ -590,7 +590,6 @@ methodOverrideMap = { |
| 590 | 590 | 'AutoCGetMaxWidth' : ('AutoCompGetMaxWidth', 0, 0),
|
| 591 | 591 | 'AutoCSetMaxHeight' : ('AutoCompSetMaxHeight', 0, 0),
|
| 592 | 592 | 'AutoCGetMaxHeight' : ('AutoCompGetMaxHeight', 0, 0),
|
| 593 | - 'AutoCGetMaxHeight' : ('AutoCompGetMaxHeight', 0, 0),
|
|
| 594 | 593 | 'AutoCSetCaseInsensitiveBehaviour' : ('AutoCompSetCaseInsensitiveBehaviour', 0, 0),
|
| 595 | 594 | 'AutoCGetCaseInsensitiveBehaviour' : ('AutoCompGetCaseInsensitiveBehaviour', 0, 0),
|
| 596 | 595 | 'AutoCSetMulti' : ('AutoCompSetMulti', 0, 0),
|
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help