Commit Graph

70115 Commits

Author SHA1 Message Date
VZ
75b4f5439a Fix setting WX_TEST_WEBREQUEST_URL in AppVeyor builds
Don't use quotes around the value, they're not special for cmd.exe
and remain part of the actual variable value.

Co-authored-by: Maarten <MaartenBent@users.noreply.github.com>
2021-01-25 18:22:40 +01:00
Vadim Zeitlin
56a5512b37 Merge branch 'selstore-insert-fix'
Fix state of multiple items inserted into wxSelectionStore and improve
its tests.

See https://github.com/wxWidgets/wxWidgets/pull/2182
2021-01-25 13:02:34 +01:00
Vadim Zeitlin
867a02e646 Merge branch 'webview-edge-unload'
Simplify and fix wxWebViewEdge initialization.

See https://github.com/wxWidgets/wxWidgets/pull/2188
2021-01-25 13:01:45 +01:00
Vadim Zeitlin
b65799448b Merge branch 'gtk-value'
Use wxGtkValue RAII wrapper in wxGTK code.

See https://github.com/wxWidgets/wxWidgets/pull/2187
2021-01-25 13:01:03 +01:00
Vadim Zeitlin
9130f8bfc6 Don't change orthogonal alignment in wxSizerFlags::CenterXXX()
It was unexpected that using wxSizerFlags().Right().CentreVertical()
didn't right-align the item because CentreVertical() reset the alignment
in the horizontal direction rather than just setting it in the vertical
one, so change this, document the new behaviour explicitly and add a new
unit test checking for it.

Closes #18989.
2021-01-25 12:58:04 +01:00
Vadim Zeitlin
caf5a62fd9 Use different sections for different flags in wxGridSizer test
No real changes, just organize the tests a bit better.
2021-01-25 00:53:24 +01:00
Vadim Zeitlin
fa4339a935 Initialize wxGtkValue in a way not requiring C++11
As we still support C++98, don't use G_VALUE_INIT as the initializer:
it's a braced-init-list, which is only allowed in C++11.

Co-Authored-By: Paul Cornett <paulcor@users.noreply.github.com>
2021-01-25 00:49:27 +01:00
Vadim Zeitlin
08d8d12872 Get rid of CppUnit boilerplate in wxGridSizer unit test
No real changes, just simplify and use CHECK() instead of
CPPUNIT_ASSERT_EQUAL() (which is the same as REQUIRE()).
2021-01-25 00:48:30 +01:00
Vadim Zeitlin
b48c46285c Avoid creating empty bitmap in MSW wxNotebook::OnPaint()
It can apparently happen that the window has 0 size and in this creating
the bitmap is useless and just triggers an assert.

Closes #18879.
2021-01-25 00:32:12 +01:00
Vadim Zeitlin
bde7cfb1a7 Show WX_TEST_WEBREQUEST_URL being used in the test
Make it clear which URL do we actually use.
2021-01-25 00:28:11 +01:00
Vadim Zeitlin
32cdda65bb Use pip for httpbin in Mac Travis CI builds
Docker isn't available under Mac, unfortunately.

Notice that it's still better to use Docker if it is available, rather
than using pip everywhere, as pip has trouble installing httpbin in the
Ubuntu 14.04 build, for example.
2021-01-25 00:25:04 +01:00
Vadim Zeitlin
bc825de1fe Simplify and make more robust wxWebViewEdge initialization
Get rid of ms_isInitialized as it must be kept synchronized with
ms_loaderDll.IsLoaded() anyhow, and it's simpler to not have it at all
rather than ensuring this.

Also ensure that calling Initialize() again, after doing it first
unsuccessfully, doesn't assert because ms_loaderDll is already loaded,
by only leaving it with a valid handle if the initialization succeeded.

Closes #19041.
2021-01-25 00:15:24 +01:00
Vadim Zeitlin
4de8857c85 Add wxDynamicLibrary::Attach()
This is symmetric with Detach() and can be useful and doesn't cost
anything to have.
2021-01-25 00:15:24 +01:00
Vadim Zeitlin
3568a160a9 Use wxGtkValue RAII wrapper in wxGTK code
wxGtkValue class was added back in 3f84cb17ca (Add wxActivityIndicator
control., 2015-03-06), but somehow never used. Start using it now
(better late than never...) as it makes the code simpler, shorter and
more robust.

No real changes.
2021-01-24 23:55:43 +01:00
Julian Smart
678b641950 Fix initial focus problem for hidden windows under Mac
Assume that hidden windows do accept focus because, even if this is
still wrong, in general, it is less harmful than wrongly returning false
from CanFocus() for them.

Closes #18987.
2021-01-24 23:45:24 +01:00
PB
e094734a89 Fix numbered list in wxMenuEvent docs
Just remove the empty line which prevented doxygen from generating a numbered list.
2021-01-24 21:58:59 +01:00
Andreas Falkenhahn
b2675d6a60 Fix sending event when cancelling editing in wxDVC under Mac
Move existing code for sending wxEVT_DATAVIEW_ITEM_EDITING_DONE to a new
sendEditingDoneEvent:isCancelled function and also call it, with true
argument, from cancelOperation: to generate the expected event.

Closes #17835.
2021-01-24 21:16:23 +01:00
Vadim Zeitlin
c714e75555 Generate wxEVT_CHAR_HOOK events before accelerators
This is more consistent with the other ports and allows to use
wxEVT_CHAR_HOOK handler to preempt processing of the accelerators (but
notice that under macOS this only works for accelerators that are part
of wxAcceleratorTable and not those associated with the menu items, as
the latter ones are not handled by this code at all).

Also simplify the code structure a little by getting rid of an
unnecessary and more confusing than helpful "handled" variable.
2021-01-24 21:09:05 +01:00
Vadim Zeitlin
f8d4bba9e7 Fix handling of accelerators in wxOSX
Check accelerator tables when handling wxEVT_CHAR_HOOK, not
wxEVT_KEY_DOWN, as we don't get the latter at all for some events, e.g.
Cmd-Alt-1 doesn't generate wxEVT_KEY_DOWN (which looks like another bug)
but does generate wxEVT_CHAR_HOOK.

Closes #13937.
2021-01-24 20:57:20 +01:00
Vadim Zeitlin
5f30f79bc8 Remove unnecessary checks of wxEvent::GetSkipped()
HandleWindowEvent() already returns false if the event handler skipped
the event, there is no need to test for it explicitly.

No real changes.
2021-01-24 20:56:38 +01:00
Stefan Csomor
0f4c65dd4f respecting UTI string rules when constructing native format in wxDataFormat::SetId
adding part from 4ae329472c
2021-01-24 19:51:33 +01:00
Stefan Csomor
3ccfa976aa guard against nullptr exception in wxLogGui::Flush
happened eg during wxUnitialize in dnd sample on macOS (open new frame, add shape, quit app)
2021-01-24 19:40:01 +01:00
Julian Smart
8e26b8d54e Fix wxSYS_COLOUR_BTNFACE value under macOS < 10.14
Use fallback value which isn't just RGB(0,0,0) when building under 10.15
but running under 10.13.

Closes #18977.
2021-01-24 19:09:31 +01:00
Vadim Zeitlin
9307fa6f89 Run httpbin locally for the tests in the CI builds
Run httpbin (either directly or inside a container) and set
WX_TEST_WEBREQUEST_URL to point to localhost.

Note that it is important _not_ to have a trailing slash in the root
URL, otherwise WebRequest::Auth::Digest test would fail.
2021-01-24 19:04:41 +01:00
Paul Cornett
4d7ca07211 Fix RTL layout of menus with GTK
Set layout direction for all menu items and sub-menus,
setting just the top level menu doesn't do much
2021-01-24 09:20:54 -08:00
Paul Cornett
4fdcdc07d2 Set horizontal scrollbar layout direction from SetLayoutDirection()
Rather than when it is created, which is too early
2021-01-24 09:09:49 -08:00
Paul Cornett
043183356b Set text layout direction earlier during window creation
Code later in the same function was using the direction before it was set
2021-01-24 08:59:12 -08:00
Stefan Csomor
c5394cea63 Fix handling of standard edit commands in context menu under Mac
Feed back standard commands like copy, paste into wxMenItem if possible.

This way commands that don't exist in the global menubar can still be
fed back eg when originating from a context menu.

See #18738.
2021-01-24 15:54:02 +01:00
Vadim Zeitlin
d9d44c8585 Increase wxWebRequest tests timeout
10s seems to often be not long enough for the Travis/AppVeyor machines.
2021-01-24 02:01:58 +01:00
Vadim Zeitlin
949b66c0f5 Use a different httpbin mirror by default
This one seems slower, but might be more reliable.
2021-01-23 16:46:02 +01:00
Vadim Zeitlin
86f9778ea9 Add a unit test exercising the bug fix in the parent commit
This test used to fail, but passes now.
2021-01-23 16:40:30 +01:00
rk
fd839c4bd6 Fix selection when inserting multiple items into wxSelectionStore
When inserting more than one item into wxSelectionStore in the
default-selected state, the state of all the items bug the first one was
wrongly set to "selected" initially.

Just fix the typo in the AddAt() call, which was passed a wrong
variable, to fix this.

Closes #19040.
2021-01-23 16:40:30 +01:00
Vadim Zeitlin
6b3ff511ee Get rid of all CppUnit boilerplate in wxSelectionStore test
This simplifies the code and allows running the test cases individually
from the command line.
2021-01-23 16:40:30 +01:00
Vadim Zeitlin
a1cca242a4 Use CHECK() instead of CPPUNIT_ASSERT in wxSelectionStore test
No real changes, just simplify the code. Notably we don't need explicit
"u" suffix on the literal constants any longer as CATCH is smart enough
to compare signed and unsigned integers correctly without it.
2021-01-23 16:40:30 +01:00
Vadim Zeitlin
8e5836908c Use wxSelectionStore object instead of a pointer in the test
Just simplify the code, there is no need to allocate and free a pointer
when we can just use an object.

No real changes.
2021-01-22 22:32:20 +01:00
Kaya Zeren
0157ea11a1 Turkish translation update
Turkish translation update
2021-01-22 02:19:06 +03:00
Paul Cornett
c5aee91847 Fix highlighting wxTimePickerCtrl fields on GTK
GtkEntry automatically selects all the text in many situations,
so do the field highlighting later to override GTK's behavior.
2021-01-21 11:38:22 -08:00
Paul Cornett
638f0f89fc Fix mouse event coordinates for single-line wxTextCtrl with GTK3 2021-01-21 11:27:00 -08:00
Vadim Zeitlin
5473dfbfa4 Merge branch 'modernize-translation-docs'
Remove obsolete information, improve formatting.

See https://github.com/wxWidgets/wxWidgets/pull/2178
2021-01-21 15:56:25 +01:00
Vadim Zeitlin
7169056e91 Use Markdown formatting in the translation HOWTO
Also update Poedit name (case) and URL and remove thoroughly obsolete
references to 4DOS.
2021-01-21 15:56:18 +01:00
Vadim Zeitlin
eae08b14c6 Amend the update schedule frequency from the last commit
Even if wxstd.pot is updated infrequently now, we shouldn't document
this as something normal or desirable.
2021-01-21 15:50:02 +01:00
Vadim Zeitlin
25b20ed477 Merge branch 'xgettext-also-mm' of https://github.com/lanurmi/wxWidgets
Extract translatable string from Objective C++ files (.mm) too.

See https://github.com/wxWidgets/wxWidgets/pull/2177
2021-01-21 15:45:32 +01:00
Lauri Nurmi
f7514362ba More accurately describe wxstd.pot update schedule
Git log shows that wxstd.pot was not updated at all in e.g. 2020,
2019, 2018, 2016.
2021-01-21 13:45:00 +02:00
Lauri Nurmi
b78c61af84 Translation docs update: don't recommend 20-year-old gettext; use msginit
Warning about gettext versions earlier than 0.10.35 is pointless,
as even 0.10.35 is from 2001, and so old it isn't even available
on GNU mirrors anymore. We shall not recommend a specific version in
the first place.

The proper way to start a new translation is to use msginit to initialize
a .po file -- just copying the .pot leaves many fields to their default
values, which the translator would need to fill in manually (the
Plural-Forms: field in particular).
2021-01-21 13:42:22 +02:00
Lauri Nurmi
bbd7cb2d3a Fix translation docs: -c is the important gettext switch, not -v
-c does the crucial syntax/format checking, -v is just verbose.
2021-01-21 13:42:22 +02:00
Lauri Nurmi
3305da5e70 Update all message catalogs with new strings
First time in nearly 4 years. Some 80 new strings
have been added meanwhile.

Ran "make -C locale allpo".
2021-01-21 13:39:09 +02:00
Lauri Nurmi
9e4b1571b1 Extract translatable strings from Obj-C++ files (.mm) also
Until now any translatable strings inside .mm files were ignored,
and half a dozen of them didn't appear anywhere else, and thus
remained untranslated.
2021-01-21 13:39:08 +02:00
Vadim Zeitlin
3c7326205f Merge branch 'grid-fix-drawing-invalid-cells' of https://github.com/discnl/wxWidgets
Fix drawing of grid cells appearing inside a multicell.

See https://github.com/wxWidgets/wxWidgets/pull/2176
2021-01-21 00:50:09 +01:00
Vadim Zeitlin
7911fdc253 Merge branch 'webrequest_additions' of git://github.com/TcT2k/wxWidgets
wxWebRequest improvements: add DisablePeerVerify(), improve
documentation.

See https://github.com/wxWidgets/wxWidgets/pull/2175
2021-01-21 00:44:37 +01:00
Vadim Zeitlin
e7ff76d762 Merge branch 'cmake-test' of git://github.com/MaartenBent/wxWidgets
CMake: use a common function for adding samples, tests and demos.

Also add wxUSE_WEBVIEW_EDGE support.

See https://github.com/wxWidgets/wxWidgets/pull/2167
2021-01-21 00:42:09 +01:00