Vadim Zeitlin
0bc1dbf218
Use user mode for pip upgrade
...
This is default for some platforms, but not everywhere, so use it
explicitly.
This should fix the error in Travis CI S/390 build.
2021-04-04 14:16:30 +02:00
Vadim Zeitlin
ee5a8096bd
Install pip if it's not available at all
...
This is not supposed to happen, but somehow it does on Travis CI, so try
to remedy this by installing pip via apt if it's missing.
2021-04-04 01:53:29 +02:00
Vadim Zeitlin
21c97d155a
Show pip version used for installing httpbin in the logs
2021-04-04 01:45:01 +02:00
Vadim Zeitlin
5498668514
Don't use broken pip version 20.0
...
Pip continues to impress with version 20 being completely broken and not
running at all.
Try the next one, which is supposed to fix this bug.
2021-04-04 01:43:50 +02:00
Vadim Zeitlin
c7961fa666
Don't upgrade pip to a version which is too new
...
Amazingly, updating a package has no problems with installing a newer
version incompatible with the current Python version, such as installing
pip 21 when using Python 3.5.
2021-04-04 01:43:50 +02:00
Vadim Zeitlin
d5d28e639e
Attempt to make pip install actually work by upgrading it first
...
Old pip versions don't work when used with python3, so upgrade pip
before trying to use it.
2021-04-04 01:43:12 +02:00
Vadim Zeitlin
da0f6bd2a6
Use Python 3 for running httpbin in non-Trusty Linux CI builds
...
Even Ubuntu 16.04 has Python 3 and pip3, so just use them instead of
trying to work around problems with Python 2.
2021-04-04 01:25:04 +02:00
Vadim Zeitlin
2b89215eec
Extract function for launching httpbin into its own file
...
Allow reusing it between GitHub and Travis CI.
Also show httpbin log in Travis CI logs too, not just on GitHub.
2021-04-04 01:00:35 +02:00
Vadim Zeitlin
996469115b
Fix httpbin installation with Python 2 for GitHub CI too
...
This is the same as b78508615a
(Explicitly install decorator 4.4.2 as
httpbin dependency, 2021-04-03) for Travis CI.
2021-04-03 23:42:54 +02:00
Vadim Zeitlin
9f1dc5ffff
Merge branch 'macos_webview_clipboard' of https://github.com/TcT2k/wxWidgets
...
Improve/Fix web view clipboard handling under macOS.
See https://github.com/wxWidgets/wxWidgets/pull/2294
2021-04-03 23:23:52 +02:00
Vadim Zeitlin
d85d22c067
Merge branch 'msw-datepick-size'
...
Fix wxDatePickerCtrl best size in wxMSW when using wxDP_ALLOWNONE.
See https://github.com/wxWidgets/wxWidgets/pull/2297
2021-04-03 22:17:52 +01:00
Vadim Zeitlin
7603e2b7ce
Another attempt to fix httpbin in Travis CI Trusty build
...
Somehow installing decorator==4.4.2 worked a few times, but then stopped
and now fails with
Could not find a version that satisfies the requirement
decorator==4.4.2 (from versions: )
No matching distribution found for decorator==4.4.2
Try using explicit URL.
2021-04-03 23:17:39 +02:00
Vadim Zeitlin
0af8d6b95a
Fix size of 0-width pen for wxPrinterDC in wxGTK
...
Don't apply scale to the fixed line width used for 0-width pens.
Closes #17056 .
2021-04-03 23:17:39 +02:00
Stefan Csomor
41bf57fee3
guard against SDK < 10.12
2021-04-03 22:40:08 +02:00
Stefan Csomor
5452d7235e
adding missing framwork to CMake
2021-04-03 22:32:34 +02:00
Paul Cornett
334cf1cc91
Take HiDPI scale into account for wxGCDC 0-width pen
...
See #19077 , #19115
2021-04-03 13:03:56 -07:00
Stefan Csomor
5628a4a334
adding Big Sur update fix
...
see #19111
(include linking against QuartzCore which contains the kCAContentsFormatRGBA8Uint reference)
2021-04-03 21:12:54 +02:00
Vadim Zeitlin
78b272c1df
Merge branch 'fix-httpbin-travis'
...
Fix Travis CI failures due to httpbin dependency update.
Closes https://github.com/wxWidgets/wxWidgets/pull/2301
2021-04-03 20:01:35 +02:00
Vadim Zeitlin
b78508615a
Explicitly install decorator 4.4.2 as httpbin dependency
...
The latest version doesn't work with Python 2 any more and installing it
breaks Travis CI builds still using Python 2.
2021-04-03 19:41:55 +02:00
Vadim Zeitlin
6aac8fcf1f
Don't use lsb_release under non-Linux platforms in Travis script
...
Avoid the error about command not being found.
2021-04-03 19:36:44 +02:00
Artur Wieczorek
ba588fd072
Take into account scale actor while resizing the image in generic wxImageList
...
Too small image needs to be resized to the required physical size first
and next converted to wxBitmap with actual scale factor.
2021-04-03 18:56:29 +02:00
Artur Wieczorek
b6d305e4f2
Assure that all images in the generic wxImageList have the same scale factor
...
Mixing images with various scale factors could be misleading and error
prone.
2021-04-03 18:54:32 +02:00
Daniel Kulp
eb52e86553
Take into account scale factor of images added to wxImageList
...
Closes #19114 .
2021-04-03 18:54:32 +02:00
Stefan Csomor
767de514c1
fixing update area being to big
...
see #19111
2021-04-03 18:30:57 +02:00
PB
152a2079b4
Fix example code in wxArtProvider docs
...
Add a missing ampersand to the third parameter of overridden
CreateBitmap(), to make it clear it is a reference.
Also add semicolons after methods declarations.
Closes https://github.com/wxWidgets/wxWidgets/pull/2299
Closes #19125 .
2021-03-31 03:04:49 +02:00
PB
b9f22fc633
Replace wxEvtHandler::Connect() with Bind() in the docs
...
In the docs, replace mentions of wxEvtHandler::Connect() with
wxEvtHandler::Bind(), mostly to match the actual code but also
because Bind() is the recommended way to dynamically bind events.
Closes https://github.com/wxWidgets/wxWidgets/pull/2298
2021-03-31 03:04:49 +02:00
Gérard DURAND
41d36f7011
Update French translations
...
Closes #19123 .
2021-03-28 03:30:17 +02:00
Vadim Zeitlin
a244059934
Avoid using DTM_GETIDEALSIZE with DTS_SHOWNONE
...
This message is completely broken when DTS_SHOWNONE is used, it returns
wrong result (less than the size without DTS_SHOWNONE) initially and
completely wrong results after a DPI change.
Create a temporary date time picker control without DTS_SHOWNONE and
call DTM_GETIDEALSIZE for it instead. This is wasteful, but at least
returns correct results.
This commit is best viewed ignoring whitespace-only changes.
2021-03-28 03:22:17 +02:00
Ian McInerney
da8c851949
Don't document wxSysColourChangedEvent as being MSW-only
...
The docs mentioned this event as being Windows only, but it is also
generated on macOS and GTK now.
Closes https://github.com/wxWidgets/wxWidgets/pull/2296
2021-03-28 03:06:28 +02:00
Vadim Zeitlin
aa50c6d829
Further improve best size of wxDatePickerCtrl with wxDP_ALLOWNONE
...
Compute the best size more precisely to be exactly compatible with the
control appearance when not using wxDP_ALLOWNONE. This unfortunately
requires hardcoding an arbitrary constant in DoGetBestSize().
Patch used for testing this code for future reference:
diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp
index 470e765423..a1d5fb9938 100644
--- a/samples/minimal/minimal.cpp
+++ b/samples/minimal/minimal.cpp
@@ -26,6 +26,8 @@
#include "wx/wx.h"
#endif
+#include "wx/datectrl.h"
+
// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------
@@ -175,6 +177,28 @@ bool MyApp::OnInit()
CreateStatusBar(2);
SetStatusText("Welcome to wxWidgets!");
#endif // wxUSE_STATUSBAR
+
+ auto sz = new wxBoxSizer(wxVERTICAL);
+ auto addDPC = [this, sz](int style)
+ {
+ sz->Add(new wxDatePickerCtrl(this, wxID_ANY, wxDefaultDateTime,
+ wxDefaultPosition, wxDefaultSize, style),
+ wxSizerFlags().Right());
+ };
+
+ addDPC(wxDP_DROPDOWN | wxDP_ALLOWNONE | wxDP_SHOWCENTURY);
+ addDPC(wxDP_DROPDOWN | wxDP_SHOWCENTURY);
+ addDPC(wxDP_DROPDOWN | wxDP_ALLOWNONE);
+ addDPC(wxDP_DROPDOWN);
+
+ sz->AddSpacer(10);
+
+ addDPC(wxDP_SPIN | wxDP_ALLOWNONE | wxDP_SHOWCENTURY);
+ addDPC(wxDP_SPIN | wxDP_SHOWCENTURY);
+ addDPC(wxDP_SPIN | wxDP_ALLOWNONE);
+ addDPC(wxDP_SPIN);
+
+ SetSizerAndFit(sz);
}
2021-03-27 21:55:13 +01:00
Vadim Zeitlin
8ceca69064
Always handle wxDP_ALLOWNONE ourselves in best size computation
...
DTM_GETIDEALSIZE doesn't seem to account for it, so we need to do it
ourselves even when using it.
Closes #19120 .
2021-03-27 21:52:04 +01:00
Tobias Taschner
e63fd03611
macOS: Improve wxWebView::Paste()
...
The default (javascript) implementation presents the user with a popup
menu containing a single 'Paste' menu item.
Send this action to directly paste as expected.
2021-03-26 10:28:48 +01:00
Tobias Taschner
b4de7358b5
macOS: Implement keyboard shortcuts in webview
...
Enable usage of standard editing keys Cmd+A/C/V/X
2021-03-26 10:11:37 +01:00
Dummy
e180baa6df
Correct German translation of 'A5 sheet'
...
Fix typo in the format name.
Closes #19121 .
2021-03-25 16:19:28 +01:00
Vadim Zeitlin
4f6cf6da5b
Don't call GetTextExtent() if we don't use its result
...
It's unnecessary to call GetTextExtent() just to discard/overwrite its
result immediately with the value returned from DTM_GETIDEALSIZE, so
don't do it.
This reverts another part of a98d8448fa
(Fix size of
wxDateTimePickerCtrl after DPI change, 2019-01-13) which wasn't done in
7de85d7470
(Restore correct best width of wxDatePickerCtrl in MSW,
2020-05-24).included
This commit is best viewed ignoring whitespace-only changes.
2021-03-25 14:49:54 +01:00
Vadim Zeitlin
67e9829b55
Remove unneeded wxClientDC wxDateTimePickerCtrl::DoGetBestSize()
...
Just call GetTextExtent() on the window itself, it does the same thing
anyhow.
No real changes, just a tiny simplification.
2021-03-25 14:46:37 +01:00
Vadim Zeitlin
776c3e5b73
Don't make wxConfig::Do{Read,Write}LongLong() pure virtual
...
These functions, added in the recent fce8780297
(Add 64-bit integers
support to wxConfig, 2021-03-09) break compilation of existing code
defining classes inheriting from wxConfig, and we can avoid it by using
strings for storing long long values by default -- as this is what
wxFileConfig is doing, and wxRegConfig provides its own overridden
version anyhow.
2021-03-25 14:06:12 +01:00
Vadim Zeitlin
85b944d164
Merge branch 'webrequest-keep-alive'
...
Ensure that wxWebRequest objects stay alive as long as the request is in
progress.
See https://github.com/wxWidgets/wxWidgets/pull/2292
2021-03-25 14:04:24 +01:00
Vadim Zeitlin
0959cdb4e0
Check for memory allocation failure in all wxImage::ResampleXXX()
...
This was previously done in ResampleNearest() but not in all the other
variants, so add the checks there too to avoid crashing when trying to
use too big image sizes.
Closes #19119 .
2021-03-25 14:03:06 +01:00
Paul Cornett
024d1543f1
Fix conditional-uninitialized warning in a different way
...
Rather than dummy initializations, reorganize the code so
there is no way the variables can appear to be uninitialized
2021-03-24 11:35:38 -07:00
Paul Cornett
0a28e3267c
Remove unused macro definition
2021-03-24 11:25:15 -07:00
Paul Cornett
0995797158
Remove run-time dependencies on X11 backend with GTK3
...
As with Wayland, the X11 backend may not be available at run-time,
so types defined in it can't be used
2021-03-24 11:25:01 -07:00
Vadim Zeitlin
afc3aa773a
Don't try scaling wxHtmlImageCell if it has 0 size
...
This just results in assertion failures from wxImage and nothing useful.
2021-03-24 19:14:47 +01:00
Vadim Zeitlin
43d359f96d
Merge branch 'xrc-load-url'
...
Fix loading XRC from URLs.
See https://github.com/wxWidgets/wxWidgets/pull/2288
2021-03-24 18:24:12 +01:00
Vadim Zeitlin
360268ee25
Extend life time of wxWebRequest while it is in process
...
We already did it just before processing the state change event, but
this was too late, as the object could have been already deleted by then
and this actually happened with the example from wxWebRequest
documentation.
Do it earlier now, as soon as the request becomes active, which normally
happens when Start() is called, and keep the reference until the event
is processed after the request reaches one of the final states
(completed, failed or cancelled).
Add a unit test checking that deleting the wxWebRequest object doesn't
prevent the request from running to the completion any more.
2021-03-24 17:45:01 +01:00
Vadim Zeitlin
d7235ebb05
Show states using names, not ordinals, in trace message
...
This is much more readable.
2021-03-24 17:45:01 +01:00
Vadim Zeitlin
0548a06905
Check the values from wxWebRequestEvent in the unit test too
...
In addition to checking that wxWebRequest itself is filled with the
expected values, verify that the same values are returned via
wxWebRequestEvent.
2021-03-24 16:33:05 +01:00
Vadim Zeitlin
c0f8c0e0f2
Be stricter about changing to the same state in wxWebRequest
...
This shouldn't happen, and doesn't, but if it ever does we'd better
return immediately rather than doing something that will almost surely
be wrong.
2021-03-24 16:04:02 +01:00
Vadim Zeitlin
ce91a5d0ff
Fix a typo in wxWebRequest use example
...
s/IsOK/IsOk/ and also make the example slightly more verbose.
2021-03-24 15:29:43 +01:00
Vadim Zeitlin
7d9b01afd9
Disable SSL certificate validation for pip in Trusty CI build
...
Trusty Python is too old to support SNI, so the new certificate used by
files.pythonhosted.org doesn't validate. Just disable checking it there.
2021-03-23 23:23:29 +01:00