This is a more hackish but more compatible solution to the problem of
data sent using wxIPC_UTF8TEXT format being simply lost when using DDE
for IPC classes. We must use CF_TEXT for the DDE to pass our data, but
we can try to decode it as UTF-8 in the client and assume it was sent in
this format if it worked. This obviously suffers from false positives as
any ASCII string will still be assumed to be UTF-8, but there shouldn't
be any real harm coming from this.
This change also makes sending data in wxIPC_UTF{16,32}TEXT formats work
as well by converting it to UTF-8.
Update the sample to call Advise() with both wxIPC_UTF{8,16}TEXT formats
and remove the now unnecessary wxDDEConnection::m_dataType member.
Closes#17900.
This reverts commit c657fd3d61 because
changing the format of DDE advise requests/replies is not a good idea:
other applications (those using previous versions of wxWidgets or even
not using wxWidgets at all) may rely on getting data in real CF_TEXT
format rather than in one of text formats preceded by the extra byte
containing the actual format and the previous commit would have silently
broken this.
Another fix for #17900 will be implemented instead.
wxIPC API doesn't map well onto DDE, as we don't have wxIPCFormat
parameter in StartAdvise() but do allow specifying the format when
calling Advise() itself, whereas DDE requires specifying the format when
establishing the advise loop and the data always must use this format
later.
Because of this, we have to pass the actual format with the data itself
instead of relying on DDE formats support. This has the advantage of
allowing wxIPC_UTF8TEXT to work, while previously it didn't and
couldn't, as DDE only supports the standard (or custom, but registered)
clipboard formats and it wasn't one of them. Of course, this also has a
disadvantage of having to make another copy of the data, but this seems
unavoidable.
This change allow Advise() overload taking wxString to work, including
for non-ASCII strings, as shown by the update to the IPC sample. It also
makes wxDDEConnection::m_dataType unnecessary, as we must always use the
format passed to DDE callback anyhow when handling XTYP_ADVREQ.
Closes#17900.
DDE code translates wxIPC_PRIVATE to wxIPC_TEXT internally since a
change done in 9d86099269, but same commit
also added a warning to the ipc sample stating that wxIPC_PRIVATE
doesn't work, which isn't really the case.
Remove the warning to avoid the confusion.
See #7470.
The latest changes to wxTranslations::AddCatalog() behaviour were not
backwards-compatible and also had other problem, so revert them for now,
even if this means that #18227 has to be reopened.
This is a combination of the following commits:
----
Revert "Fix regression in wxTranslations::AddCatalog()"
This reverts commit 14e905858d.
See #18297.
----
Revert "Fix crash in translations code when no translations are found"
This reverts commit 80904d1bc7.
See #18299.
----
Revert "Rename new wxTranslations method to GetAcceptableTranslations()"
This reverts commit 20b02d6169.
----
Revert "Load catalogs for all preferred languages, if they exist"
This reverts commit 2d784da2ee.
----
Revert "Allow getting all usable translations languages"
This reverts commit 5d08e404c7.
----
See #18227, #18300.
Closes#18302.
This partially reverts 7e1b64a2eb as it
broke wxRearrangeList because assigning to m_order[n] used an
out-of-range index.
Another possible fix would be to replace reserve() call added in that
commit with resize(), but there doesn't seem to be any advantage in
assigning elements one by one, rather than all at once, as it had been
done before, so just revert this change instead.
See #17836.
Compute the best size of the notebook, taking into account all the
different layout possibilities, and add a test checking that this works
as expected.
Closes https://github.com/wxWidgets/wxWidgets/pull/1085
Attempting to create a bitmap with 0 width or height results in an
assertion failure, which is fatal, as it happens in wxEVT_PAINT handler
and so quickly results in reentering it and asserting again and
recursive assert failures terminate the application.
Just avoid doing it, there is nothing to paint anyhow if the associated
rectangle is empty.
See https://github.com/wxWidgets/wxWidgets/pull/1085
This macro parameter is passed to wxArrayStringProperty::OnButtonClick() parameter of wxChar* type. char* string interpreted in this function as a wxChar* string results in obtaining invalid Unicode characters.
This fixes a regression introduced in b70ed2d8c8.
Closes#18307.
This fixes PVS Studio static analyzer warnings:
V808 'errMsg' object of 'wxString' type was created but was not utilized. docview.cpp 1182
V808 'search' object of 'wxString' type was created but was not utilized. dirctrlg.cpp 697
V808 'filename' object of 'wxString' type was created but was not utilized. dirctrlg.cpp 697
(see full report at http://www.fly-server.ru/pvs-studio/wxWidgets-core/)
Closes https://github.com/wxWidgets/wxWidgets/pull/1096
The new method takes minimal size just computed by RecalcSizes() as its
argument making it unnecessary to store it as a member variable in the derived
classes such as wx{Box,FlexGrid}Sizer.
The old method can still be overridden for compatibility and by the derived
class that don't need minimal size when updating children.
wxDC::DrawEllipse() used to use the text background for filling the
ellipses drawn with transparent pen, for some reason. According to
f9b28cd4325f42936d3122bfe7c847354bbbfee9 which changed this (this commit
was part of df13791078 merge done with
svn), this was done for compatibility with wxGTK, but wxGTK definitely
doesn't do it now and apparently never did, so there must have been some
mistake.
Simply remove the extra code using the text background for consistency
with this method behaviour in the other ports and also other methods
behaviour in the same port.
Closes https://github.com/wxWidgets/wxWidgets/pull/1087
Under wxQT, wxMemoryDC was previously rendering to a temporary image
which was only being blitted back to the original wxBitmap when either
the DC wx destroyed or a new bitmap was selected (via SelectObject).
With these change wxMemoryDCImpl now draws directly to the bitmap
managed by wxBitmap, this makes the behaviour more consistent with the
MSW and GTK implementations.
Closes https://github.com/wxWidgets/wxWidgets/pull/1083
Fix another regression in wxTranslations in 3.1.2 and check that the
vector of acceptable translations is not empty before using its first
element.
Closes https://github.com/wxWidgets/wxWidgets/pull/1082Closes#18299.
Do load the catalog corresponding to the language of "msgid" strings in
the source code, only skip the languages strictly less preferred than
it.
This avoids incompatibilities with pre-3.1.2 behaviour and avoids
breaking existing applications relying on the old behaviour.
Closes https://github.com/wxWidgets/wxWidgets/pull/1081Closes#18297.
Delete() doesn't (and can't, under Unix) wait for the detached threads,
although it does do it under MSW (but arguably shouldn't), so it can't
retrieve the thread exit code there.
Document that its "rc" argument is only useful with joinable threads.
Closes#18240.
As wxDataViewColumnList was never public, it should be fine to not
define it any more and use a vector instead.
This makes the code more clear and also marginally more efficient.
Previously, the last column couldn't be effectively resized at all, as
its size was always automatically set to the remaining width of the
window after subtracting the widths of all the previous columns. Now
this is only done if this remaining width is greater than the width
given to the column by the user or by the program.
Effectively, this means that the user can now drag-resize the column to
increase its size (at the price of showing the horizontal scrollbar).
See #18295.
For some reason one of the overloads of the c'tor left the m_qtPainter
field set to NULL rather than asking the wxDC for it's painter.
The rest of the class assumes the painter is not NULL.
Closes https://github.com/wxWidgets/wxWidgets/pull/1075
This reverts commit 24054c95d8 as it
actually should be possible to increase the size of the last column,
even if this shows the horizontal scroll bar.
The code added in 4156e1a5c9 didn't quite
work correctly because it used the old size of the window, before it was
resized, and not the new size. This was almost unnoticeable when
drag-resizing the window, but very noticeable when maximizing the
containing TLW, as could be seen on the 3rd page of the dataview sample,
for example, where the last column kept its size instead of expanding.
See #13904, #18295.
This method used to return a dangling pointer to a temporary buffer,
which resulted in a crash when using it, e.g. in the unit test.
Fix this by keeping a QImage as a member in wxBitmapRefData, so that the
pointer to its data remain valid until UngetRawData() is called.
Also check that GetRawData() returns a non-null pointer in the test.
Closes https://github.com/wxWidgets/wxWidgets/pull/1067
This is more reliable than checking whether we can link with the library
manually and may work even if it's installed in a non-standard location.
It also allows the user to specify PKG_CONFIG_PATH='pkg-config --static'
when running configure to link with all transitional dependencies when
linking statically.
Closes https://github.com/wxWidgets/wxWidgets/pull/1073
See #18293.
Fix the test added in dfec7aa0c0 which
deleted the button pointer used by EventCounter by simply moving
EventCounter initialization after the button re-creation.
See #16385.
Do not abort when libLZMA or libSecret can not be found, just show a warning.
Do not search for libSecret on macOS.
Disable libraries internally (not in cache) when not searching for them.