Commit Graph

64255 Commits

Author SHA1 Message Date
Paul Cornett
220200ce07 Add missing break statement 2018-05-11 10:13:35 -07:00
Robin Dunn
ecc3de3f04 Merge pull request #802 from RobinD42/fix-tabmdi-close
Ensure the selection is in range.
2018-05-08 17:46:09 -07:00
Vadim Zeitlin
69e33a6657 Yet another fix for not existing event loop under Mac
The previous commit fixed never exiting the event loop in GUI Mac modal
loops but at the price of breaking it for Mac console applications as
Dispatch() never returns for them if there are no more events.

Finally, just don't call Dispatch() at all here, just as it wasn't done
until 9caa3d5d8e and keep only the changes
sufficient for dispatching the pending events and making CallAfter()
work in console applications.
2018-05-09 02:38:30 +02:00
Vadim Zeitlin
e2609f3c21 Fix recently broken infinite event loop under Mac
Changes of 9caa3d5d8e resulted in never
exiting modal event loops as wxCFEventLoop::Pending() always returns
true. While this is certainly wrong on its own, for now just avoid using
it and check the return value of Dispatch() instead to allow the modal
event loops to terminate again.
2018-05-09 00:45:30 +02:00
Vadim Zeitlin
e3e4a88423 Correct the return value of wxDataViewTreeCtrl::GetNthChild()
Wrong pointer was used to initialize wxDataViewItem (apparently since
always, i.e. this function could never have been used successfully...).

Closes #18132.
2018-05-08 23:59:22 +02:00
Vadim Zeitlin
9caa3d5d8e Fix dispatching pending events in console applications under Mac
Apply parts of the changes of 34c5aaa769
done in the common code to Mac-specific wxCFEventLoop too.

This is not ideal as we really should reuse the same common code here,
but for now it's better than nothing as previously pending events were
just not dispatched at all in console Mac applications, meaning that
CallAfter() from worker threads never executed.
2018-05-08 01:14:03 +02:00
Vadim Zeitlin
1680c28284 Fix alignment for multiline buttons using custom colours in wxMSW
Owner-drawn buttons with multiline labels were always centered.

Fix this by handling their alignment explicitly when drawing them, as
::DrawText() doesn't do it for multiline strings.

Closes #18131.
2018-05-07 13:48:43 +02:00
Paul Cornett
41a920cf72 Improve accuracy of destination coordinates in generic StretchBlit() implementation
It's not possible to map the scaled integer coordinates to the exact
destination location. The inaccuracy can be (mostly) avoided by shifting
the DC origin instead. Also fixes handling of non-zero logical origin.

See #18129
2018-05-05 11:45:54 -07:00
Robin Dunn
c2fcc14bac Ensure the selection is in range.
There are some cases when in the process of closing wxAuiMDIChildFrames that this method will be called while the current selection is out of range.
2018-05-02 19:12:41 -07:00
Vadim Zeitlin
2e8516c5fe Merge branch 'MoveOutsideShortInterval' of https://github.com/catalinr/wxWidgets
Allow using positions in the entire int range for window positions under
MSW, and not just those in (slightly less than) short range, that are
supported by the native API.

Closes #4262.

Closes https://github.com/wxWidgets/wxWidgets/pull/779
2018-05-02 23:19:11 +02:00
Vadim Zeitlin
f10487f060 Fix buffer overflow in wxMSW stack walking code
VarSizedStruct buffer had a too small size in Unicode build as it forgot
to multiply the name length by sizeof(TCHAR), resulting in overwriting
memory on the stack after it when calling SymFromAddrW().

Closes #18127.
2018-05-02 22:47:48 +02:00
dos
6e093f5a84 Add wxrc.exe to the MSVS release archives
Include wxrc.exe in the release.

Also change the way checksums are calculated due to fciv tool
limitations.

Closes #18124.

Closes https://github.com/wxWidgets/wxWidgets/pull/800
2018-05-02 18:29:40 +02:00
PB
0e6b4899e0 Add space around expressions in if () statements 2018-05-02 17:50:02 +02:00
PB
8aae3c0356 Fix typos in code comment 2018-05-02 17:47:42 +02:00
Vadim Zeitlin
7fdd446cc8 Remove a reference to Info_carbon.plist
This file was removed in 5ba67c67e4 so
don't tell people to update it when changing version.
2018-05-02 16:01:36 +02:00
Vadim Zeitlin
ff06e12ceb Remove unused and outdates samples/Info.plist file
This file was added in 4d524cdd0e a long
time ago but doesn't seem to have been ever actually used for anything
and is outdated, e.g. contains LSRequiresCarbon=true, which shouldn't be
used any longer.

Remove the file itself and all references to it.
2018-05-02 16:01:02 +02:00
Tobias Taschner
183ba1cb4c Set NSPrincipalClass to wxNSApplcation for CMake builds too
This setting is important for some functionality provided by
wxNSApplcation and most importantly without the setting all samples
where only shown scaled on high DPI displays.

Notice that it was already present in src/osx/carbon/Info.plist.in which
is used for the samples in autoconf build.

Closes https://github.com/wxWidgets/wxWidgets/pull/743
2018-05-02 15:53:09 +02:00
Maarten Bent
2a5aafb274 Fix missing tool in the overflow menu of wxAuiToolBar
When determining if a tool is hidden, it takes the width (or height) of
the overflow sizer into account -- but when tools are overlapping, this
is 0. By setting and getting the minimum size of the overflow sizer, the
actual size of the overflow button can be used.

Closes #17960.

Closes https://github.com/wxWidgets/wxWidgets/pull/799
2018-05-02 15:41:56 +02:00
Maarten Bent
58a7339cb9 Show the mouse wheel axis in the text sample
This helps debugging these events generation.

Closes https://github.com/wxWidgets/wxWidgets/pull/798
2018-05-02 15:38:23 +02:00
Maarten Bent
59c37cb5eb Show correct save path when using compressed debug report
The compressed report location could be set to a different location from
the one shown in the dialog.

Closes #17176.

Closes https://github.com/wxWidgets/wxWidgets/pull/797
2018-05-02 15:36:11 +02:00
Vadim Zeitlin
390c45d1d9 Merge branch 'tlw-geom'
Improve saving/restoring TLW geometry under MSW.

See https://github.com/wxWidgets/wxWidgets/pull/795
2018-05-02 15:27:04 +02:00
Jouk
0cb7c55e93 add wxUSE_LIBLZMA definition 2018-05-02 08:13:26 +02:00
Vadim Zeitlin
9b554c0974 Avoid narrowing conversion in wxMac struct initialization
Multiplying 2 float values is promoted to double, which is then narrowed
to float when initializing CGPoint with it, resulting in errors in C++11
build.

Fix this by initializing the CGFloat variable, which doesn't uniform
initialization, to the correct value instead, as this also seems more
clear ("height" is the height at which the strike is drawn).

Closes https://github.com/wxWidgets/wxWidgets/pull/793
2018-05-01 15:10:55 +02:00
Scott Talbert
83af2a428e Fix return type of wxNumberEntryDialog::GetValue() in documentation
Closes https://github.com/wxWidgets/wxWidgets/pull/796
2018-05-01 15:02:00 +02:00
Cătălin Răceanu
bb29b87a45 Add test case for window positioning beyond Short limit 2018-04-30 00:58:39 +03:00
Vadim Zeitlin
6ae7aa4443 Fix saving/restoring window position for maximized windows
Save both the normal window geometry and its maximized position instead
of saving just its current position. This fixes restoring geometry of
the maximized windows as previously they were always restored on the
primary monitor, as their original position was lost.

Use the native {Get,Set}WindowPlacement() functions for a MSW-specific
wxTLWGeometry implementation to achieve this.

Closes #16335.
2018-04-29 20:35:44 +02:00
Vadim Zeitlin
d97c055514 Introduce platform-dependent wxTLWGeometry class
Previously, TLW geometry was implicitly defined as just its position,
size and the maximized/iconized state by wxPersistentTLW code. This
already wasn't enough for wxGTK which added the decoration sizes to the
geometry being saved/restored, but this had to be done using conditional
compilation, which was not ideal. And it didn't allow using an entirely
different geometry representation as will be done for wxMSW soon.

Change the code to use wxTLWGeometry class defining the geometry, as
used by the current port, explicitly and move wxPersistentTLW logic into
it, as wxPersistentXXX classes are supposed to be very simple, which
wasn't really the case.

Also provide public SaveGeometry() and RestoreToGeometry() methods in
wxTopLevelWindow, which can be useful even to people not using
wxPersistentTLW for whatever reason.

There should be no changes in behaviour so far.
2018-04-29 19:51:10 +02:00
Vadim Zeitlin
f04a46364c Remove useless forward declaration of wxTopLevelWindowBase
This class is fully declared just below, so there is no need to
forward-declare it.
2018-04-29 19:43:22 +02:00
Paul Cornett
cec5d067e5 Avoid deferred show when TLW decoration size is already known
See https://github.com/wxWidgets/wxWidgets/pull/789
2018-04-28 16:00:03 -07:00
Scott Talbert
20a98406f0 Add missing documentation for wxNumberEntryDialog
Also explain when this dialog should be used instead of using the
usually more convenient wxGetNumberFromUser() function.

See https://github.com/wxWidgets/wxWidgets/pull/790
2018-04-25 18:26:27 +02:00
Paul Cornett
91919f4514 Fix saving/restoring TLW position on HiDPI X11 display with GTK+3
X11 frame extents need to be converted to GTK+ "logical" units
2018-04-25 09:19:18 -07:00
Cătălin Răceanu
578474526f fix window position under MSW when limited by short range 2018-04-18 20:19:45 +03:00
Vadim Zeitlin
aaa9670dd1 Apply replacement of "" with wxString() to wxSTC correctly
The changes of 8d02384792 only modified
the generated file without updating the file it was generated from and
so were lost during the next regeneration.

Back-propagate them to the correct file to prevent this from happening.

See https://github.com/wxWidgets/wxWidgets/pull/782
2018-04-18 18:29:47 +02:00
Vadim Zeitlin
03d942002d Really fix trailing spaces in the generated wxSTC file
Commit 496da2e550 removed the trailing
spaces from the generated file, but they were reintroduced whenever it
was regenerated.

Really fix this by removing the extra spaces from the script generating
the file.

See https://github.com/wxWidgets/wxWidgets/pull/787
2018-04-18 18:08:10 +02:00
Vadim Zeitlin
52e5b561cb Apply Mac double buffering workaround for wxSTC correctly
The changes of bf418320b7 only modified
the generated file instead of modifying the file it's generated from, so
were lost during subsequent regenerations.

Fix this by back-propagating them to the correct place.

See #18085.
2018-04-18 18:06:43 +02:00
Frédéric Bron
6226e3b0d3 Emphasize the need for Realize() in wxToolBar documentation
As it is essential for a correct behaviour of wxToolBar, explain in the
main documentation of the class that Realize() must be called to
construct the tools. Note: it is already explained in the constructor's
documentation and in AddTool's documentation.

Closes https://github.com/wxWidgets/wxWidgets/pull/786
2018-04-18 15:48:05 +02:00
Jan Niklas Hasse
496da2e550 Remove trailing whitespace from several files
No real changes.

See https://github.com/wxWidgets/wxWidgets/pull/787
2018-04-18 15:45:42 +02:00
Jan Niklas Hasse
8d02384792 Use wxString() instead of "" for empty strings
This will allow this code to work even when implicit conversion from
"const char*" is disabled in wxString and is already marginally more
efficient even now.

See https://github.com/wxWidgets/wxWidgets/pull/782
2018-04-17 22:32:25 +02:00
Scott Talbert
e905b94436 Fix video sink fallback in wxMediaCtrl when xvimagesink present but not working
In certain cases (e.g., virtual machines), the XVideo extension may be
present, but there are no working adaptors.  In this case, wxMediaCtrl
will select xvimagesink, but then when it tries to actually play some
media, it will fail.  Fix this by attemping to set the video sink to
GST_STATE_READY in TryVideoSink().  Doing this causes gstreamer to run
some checks against the XVideo extension.  If this fails, then we should
fall back to the next sink type (ximagesink).
2018-04-15 22:32:41 -04:00
Cătălin Răceanu
f751f15b9f Shuffle code a bit to make it easier to skip deferring window position 2018-04-12 05:22:55 +03:00
Vadim Zeitlin
8e33c693e5 Normalize email case of the commits done by PB
Canonicalize all the existing versions of the email used by PB to use
PBfordev as the local part.
2018-04-10 14:41:14 +02:00
Vadim Zeitlin
ee9c026724 Canonicalize PBForDev email address in Git mailmap
Use the same name/email combination instead of several similar but
different ones.
2018-04-09 12:43:59 +02:00
PB
f9aeb2669b Fix memory leak in taskbarbutton sample
wxTaskBarButton::RemoveThumbBarButton() removes the button but does not
delete it. In the sample removed buttons must be deleted manually
because they are also removed from m_thumbBarButtons which automatically
deletes the stored buttons in its destructor.

Closes https://github.com/wxWidgets/wxWidgets/pull/778
2018-04-09 12:41:03 +02:00
PB
748c0150c2 Clarify wxSL_SELRANGE description
The user cannot select a range, the selection range can be changed only programatically.
2018-04-07 21:51:08 +02:00
Vadim Zeitlin
e38866d3a6 Merge branch 'lzma'
Add support for using externally available liblzma via new
wxLZMA{Input,Output}Stream classes.

Closes https://github.com/wxWidgets/wxWidgets/pull/771
2018-04-06 15:41:36 +02:00
Vadim Zeitlin
deee5c19eb Document how to build wxWidgets with liblzma support
Explain what needs to be done under MSW in order to use LZMA compression
classes.
2018-04-06 15:39:55 +02:00
Vadim Zeitlin
251569496b Document wxGetLibLZMAVersionInfo() function
Add initially forgotten documentation.
2018-04-06 15:39:55 +02:00
Vadim Zeitlin
1cdb384d7b Add wxLZMAClassFactory for run-time LZMA stream creation
This should allow handling .xz files in wxFileSystem, for example.
2018-04-06 15:39:55 +02:00
Vadim Zeitlin
7c34ca65a0 Add unit test for wxLZMA{Input,Output}Stream classes
Create another generic stream test using BaseStreamTestCase framework.
2018-04-06 15:39:55 +02:00
Vadim Zeitlin
50b102ffd2 Add wxLZMAOutputStream for compressing data using LZMA
As liblzma API is similar to zlib API, this class is also close to
wxZlibOutputStream, except that it uses reusable functions instead of
repeating their code.
2018-04-06 15:39:55 +02:00