This is more convenient than having to open the "About" dialog to see
the details of the locale being used.
It also makes it unnecessary to store wxLocale reference in the frame
class, simplifying the sample code.
No real changes, just make it possible to use these constants without
including the entire wx/intl.h.
Note that the existing headers including wx/intl.h need to keep
including it, unfortunately, as not doing it any longer would break
compilation of any code including them which relies on _() or
wxGetTranslation() being defined after including e.g. wx/dc.h. This was,
of course, never guaranteed, but in practice it worked for a very long
time, so don't break it now.
This commit is best viewed with --color-moved git option.
Getting this dialog all the time is annoying when testing, so add
another command line option to set the locale unconditionally.
This commit is best viewed ignoring whitespace-only changes.
It makes more sense to skip loading the translations too, if the user
decided not to use the current locale.
This commit is best viewed ignoring whitespace-only changes.
Creating the controls directly on wxFrame is not recommended and looks
ugly under MSW due to the wrong background being used, so add an
intermediate panel.
This provides a more convenient way of testing wxLANGUAGE_DEFAULT than
selecting it from the dialog shown on startup.
This commit is best viewed ignoring whitespace-only changes.
Make GetInfo() return information for numbers by default in the Unix
version too instead of asserting, as this is more consistent with the
MSW and Mac versions and also seems more useful.
This will allow using this class in the library code too.
No real changes yet, this is a pure refactoring.
This commit is best viewed using git --color-moved option.
Simply remove the not existent any longer shared-ld-sh from clean
targets in all makefile.
This should have been done in e663d9af2b (Stop using shared-ld wrapper
script under Mac, 2021-07-06).
The wxrc program does not depend on the GUI libraries, but only on
the base and XML libraries, so make it possible to build it in non-GUI
builds too.
Closes https://github.com/wxWidgets/wxWidgets/pull/2419
This wasn't done since the changes of c1c4c5516c (fixed unwanted owner
data accesses in virtual list ctrl, 2001-08-07), but there doesn't seem
to be any reason to avoid accessing the item in SendNotify() (any more?)
and if we ever did generate events for all the items in a virtual list
control, this would be already a problem, even if we didn't access the
line info from here.
So just revert the check for !IsVirtual() and always fill the item in
the generated event to make the behaviour of the generic version
consistent with the MSW one and slightly more useful.
See https://github.com/wxWidgets/wxWidgets/pull/2456Closes#19235.
Always set the label, even when not using wxTB_TEXT style, as otherwise
the items shown in the native "overflow" menu use empty strings as
labels and so can't be distinguished at all.
This undoes part of the changes of 1f7cd4807f (Don't show labels for
toolbars showing icons only in wxOSX, 2016-02-23), but they don't seem
necessary any longer, i.e. calling SetToolShortHelp() doesn't show the
toolbar label when using non-native toolbars, so #16669 remains fixed.
Closes#19226.
Use 2 separate functions instead to make the code more clear, as passing
false for indicate the refresh shouldn't be done was quite confusing.
Also get rid of a separate RefreshAll() which was called only from
RecalculatePositions().
No real changes.
This is similar to b03eaceea6 (Disable WebRequest::SSL::Ignore unit test
under AppVeyor, 2021-08-04) and just warns about the wxWebRequest
cancelling test failure when running it under AppVeyor instead of
failing the entire test suite, as this does happen sporadically (but
regularly) there for as yet unknown reason.
This already worked with the generic version, but silently failed with
wxMSW, so make it work with wxMSW too as it doesn't cost much and makes
wxListCtrl behave in the same way under all platforms.
Also document that SetImageList() can be used before the window is
created.
This test sporadically fails in builds with different compilers (both
MSVC and gcc) there for unknown reasons. Until we can find, and fix, the
underlying problem, disable this test to avoid spurious CI failures.
We need to account for the trailing NUL explicitly here, so add 1 to the
length returned by the first call to wx_regerror() to avoid chopping off
the last character of the error message.
MSVC 7 project files don't exist any longer, so don't try updating them
in upmake.
This should have been done in 8b854d2f92 (Remove MSVC 7 project files
and support for generating them, 2021-04-26).
Stop defining pid_t in wx setup.h to avoid conflicts with the other
libraries (such as Boost.Process) also defining it under MSW and also
just because this was completely unnecessary.
See https://github.com/wxWidgets/wxWidgets/pull/2452
With both GTK 2 and 3 if a wxDVC cell has a background colour attribute
set then wxDataViewCustomRenderer::RenderText() sets the cell's
background property. With wxDataViewCheckIconText this results in items
drawn prior to the text to be painted over.
Reproducible using the dataview sample which on the MyListModel page
uses a background cell colour for the first column of odd-indexed rows.
Fix by drawing the text first, followed by the checkbox and possible
icon as before. There appear to be no other custom renderers in wx which
draw multiple items and may have needed fixing as well.
This commit is best viewed with git --color-moved option.
Closes https://github.com/wxWidgets/wxWidgets/pull/2449
The latter two are always defined in sys/types.h on all Unix systems and
we already define them for MSVC (which doesn't use configure anyhow).
The former type is always defined everywhere.
This type should always be defined in sys/types.h on any non-ancient
Unix system, so don't bother checking for it, which is not only wasteful
but can even be harmful because it can conflict with pid_t definitions
in the other libraries under Windows, where we (wrongly) define it as
int (which is actually a bug in autoconf, which was recently fixed, see
https://savannah.gnu.org/support/index.php?110296) when using CMake.
So just don't define it at all: it should be already defined under Unix
and we don't use it under MSW anyhow.
See https://github.com/microsoft/vcpkg/issues/19110
See #18150.
The distinction between redrawing the background and the rest of the
window only exists in MSW and we can't refresh the window without
refreshing its background in the other ports, but we can at least
document this.
Closes#19234.
The case of missing strtod_l() is already handled by 9507bc430e
(Determine availability of the required xlocale API by compiling,
2017-04-14).
Similarly test for all the strto*_l() functions used by wx instead of
assuming that they are available if strtod_l() is.
It appears that the 'musl' C standard library, used on e.g. Alpine
Linux, does have strtod_l(), but not the others. Because of which this
check did not properly disable the feature, and compilation would fail.
Closes https://github.com/wxWidgets/wxWidgets/pull/2451
Fix
'friend' keyword needs 'class'
error introduced by 035c29e6a2 (Make wxRescaleCoord() safer by requiring
explicitly using From/To, 2021-07-13) which broke the build with gcc
4.4.7 used under CentOS 6.
Closes https://github.com/wxWidgets/wxWidgets/pull/2450
This reverts commit 95f1b262a4 ("Store clipping box coordinates in
device units in wxWindowDCImpl, wxGTKDCImpl", 2021-07-26) because
device coordinates can be used to determine final clipping box
coordinates more accurately only if current logical coordinates
are not stored directly in the corresponding variables of the base
class wxDCImpl.
If derived class sets clipping region in a legitimate way by call to
DoSetClippingRegion() instead of directly storing logical coordinates
of the box in the internal variables we can store coordinates in
device units to determine final logical coordinates more reliably even
in case when coordinate transformations were applied to DC
in the meantime.
Because retrieving clipping box coordinates in DoGetClippingRect() is
delegated to wxDCImpl::DoGetClippingRect() we need to store coordinates
in device units because such units are used internally in wxDCImpl
(2bcc9382a7 ("Store clipping box coordinates in device units for generic
wxDC", 2021-07-26).
Stored device units are converted to the current logical units
in wxDCImpl::DoGetClippingRect().
Clipping box coordinates should be stored internally in device units
to be independent on changes of logical coordinates made between calls
to wxDCImpl::DoSetClippingRegion().
These stored coordinates should be converted on demand to the current
logical units on call to wxDCImpl::DoGetClippingRect().