Commit Graph

64222 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
e66ade1b84 Factor out reusable part of wxLZMAInputStream into wxLZMAData
No changes yet, this is a pure refactoring in preparation for adding
wxLZMAOutputStream.
2018-04-06 15:39:55 +02:00
Vadim Zeitlin
af7e2901fe Add wxLZMAInputStream for decompressing data in XZ format
No compression support yet.
2018-04-06 15:39:55 +02:00
Vadim Zeitlin
311b2aee5f Check for liblzma headers in configure too and add wxUSE_LIBLZMA
Prepare for using liblzma in wxWidgets code by adding the necessary
option and updating the configure check for it (which had been already
present due to libtiff possible dependency on liblzma).

No real changes yet.
2018-04-06 15:39:39 +02:00
Vadim Zeitlin
457ba4ace5 Merge branch 'filters-in-archive-sample'
See https://github.com/wxWidgets/wxWidgets/pull/770
2018-04-05 18:21:43 +02:00
Jan Niklas Hasse
6238f577db Fix cross-compiling with CMake due to wrong ws2_32 case
Use "ws2_32" in lower-case to ensure the library is found when
cross-compiling and using a case-sensitive filesystem.

Closes https://github.com/wxWidgets/wxWidgets/pull/772
2018-04-04 16:53:15 +02:00
Teodor Petrov
4cdd3001c2 Keep wxSTC call tips inside the current display
Make it harder for the calltip to be invisible

* This required changes to the Window::SetPositionRelative.
* Use the Qt version as a base.
* The idea is to confine the window to the boundaries of the display the
  scintilla control is at the moment of the call.

Closes #18115.
2018-04-01 16:43:24 +02:00
Vadim Zeitlin
882c425f42 Merge branch 'msw-style-fixes'
Minor simplifications related to handling of wxTLW styles in wxMSW.

No real changes.
2018-03-31 01:48:46 +02:00
Vadim Zeitlin
8d074e65a7 Merge branch 'treebook-refactor'
Reuse more wxBookCtrlBase code in derived classes and other
simplifications.

Closes https://github.com/wxWidgets/wxWidgets/pull/769
2018-03-31 01:45:30 +02:00
Vadim Zeitlin
bee28c2730 Use wxVector<> for wxBookCtrlBase::m_pages array
Get rid of another macro-based array in favour of wxVector<>.

No real changes.
2018-03-31 01:45:10 +02:00
Vadim Zeitlin
3d37b8c72a Reuse wxBookCtrlBase::DeleteAllPages() in wxNotebook
Don't duplicate the base class code unnecessarily.

No real changes.
2018-03-31 01:45:09 +02:00
Vadim Zeitlin
96f9a12898 Stop resizing widgets sample pages when first showing them
The size of wxBookCtrl pages is determined by wxBookCtrl and can't be
changed, yet the sample tried to do it, making them larger than the
actually available space and cutting them off as the result.

Just stop doing this and simply layout the page using the available
space -- if there is not enough of it, that's too bad, but the user can
always resize the main window in this case.

See #4379.
2018-03-31 01:45:08 +02:00
Vadim Zeitlin
02a92e23f3 Reuse wxBookCtrlBase::DoSetSelection() in wxTreebook too
Avoid duplicating base class DoSetSelection() implementation in
wxTreebook, just extend it slightly by using DoGetNonNullPage() to allow
using a (sub-)page if the page associated to the selected item is null
and reuse it.

Also get rid of wxTreebook::m_actualSelection, it seems completely
unnecessary to bother keeping and updating it when we can just find it
whenever we need (which actually seems to only have been the case in the
now removed DoSetSelection() implementation anyhow).

As a side effect of this, wxTreebook pages should now be sizer correctly
when switching to them as DoSetSelection() in the base class does call
SetSize() on the page before showing it, unlike the previously used
version in wxTreebook, which omitted this call for some reason.

There should be no other user-visible changes.

Closes #4379.
2018-03-31 01:45:06 +02:00
Vadim Zeitlin
af6a61e3a0 Update wxBookCtrlBase::m_selection outside UpdateSelectedPage()
Change m_selection in wxBookCtrlBase::DoSetSelection() itself instead of
requiring all the derived class overriding do it in their overridden
UpdateSelectedPage().

No real changes, this is just a small simplification.
2018-03-31 01:45:05 +02:00
Vadim Zeitlin
a3d0748a76 Fix typo in wxTreebook assert messages
Fix recurring typo in "Invalid".

No real changes.
2018-03-31 01:45:04 +02:00
Vadim Zeitlin
966dc44c72 Slightly simplify wxBookCtrlBase::DoSetSelection()
No real changes, just simplify the check for whether the page change is
allowed: we can assume it is by default, which means we don't have to
test for SetSelection_SendEvent twice.
2018-03-31 01:45:03 +02:00
Vadim Zeitlin
058c085b21 Use wxVector<> in wxTreebookPage implementation
No real changes, just replace the use of a macro-based array with
wxVector<>.
2018-03-31 01:45:01 +02:00
Vadim Zeitlin
bb492b99bd Don't include wx/treectrl.h from wx/treebook.h any more
Remove an unnecessary header dependency. This is not completely
backwards-compatible as it would break any code relying on getting e.g.
wxTextCtrl declaration after including wx/treebook.h, but, hopefully,
there shouldn't be that much such code out there and fixing it shouldn't
be difficult.

If either of these assumptions turns out to be false, this commit can
always be reverted later.
2018-03-31 01:45:00 +02:00
Vadim Zeitlin
70cb9739f6 Merge branch 'cmake-fixes' of https://github.com/MaartenBent/wxWidgets
CMake fixes including support for building wxGTK3 on Windows.

See https://github.com/wxWidgets/wxWidgets/pull/768
2018-03-31 01:42:49 +02:00
Vadim Zeitlin
d13542fe7c Merge branch 'wxgtkwin32' of https://github.com/kosenko/wxWidgets
Fix wxGTK/Win32 CMake build.

See https://github.com/wxWidgets/wxWidgets/pull/750

Closes #18093.
2018-03-31 01:41:15 +02:00
Vadim Zeitlin
6da3c3c34d Add support for using filter streams in the archive sample
Allow using wxZlib{Input,Output}Stream too, meaning that the sample can
now also work with .gz files, handling them as a degenerate (because
containing only a single file) special case of archives.

The changes here -- which should be viewed ignoring whitespace to be
actually readable -- don't modify the existing code and just add the
possibility to use a wxFilterClassFactory if there is no
wxArchiveClassFactory corresponding to the specified file extension.
2018-03-31 01:35:55 +02:00
Vadim Zeitlin
8de66bc753 Add error checks when copying data in the archive sample
Errors when writing the output data in CopyStreamData() were not
detected.
2018-03-31 01:34:35 +02:00
Vadim Zeitlin
36fe1e0f66 Initialize ArchiveApp members in ctor in the sample
No real changes, but initialize members of ArchiveApp class in its ctor
to avoid leaving them uninitialized.
2018-03-30 22:53:07 +02:00
Vadim Zeitlin
b9c10f215d Use wxScopedPtr<> instead of wxSharedPtr<> in archive sample
There is no need to use wxSharedPtr<> when ownership is not shared, use
simpler and overhead-free wxScopedPtr<> instead.
2018-03-30 22:38:03 +02:00
Vadim Zeitlin
a0cc236678 Fix typo in a message in the archive sample
No real changes.
2018-03-30 22:37:23 +02:00
Vadim Zeitlin
95ba7a3ef2 Remove redundant test for wxICONIZE in MSW wxMDIChildFrame
wxMINIMIZE and wxICONIZE are one and the same, so it's useless to test
for both of them.
2018-03-28 22:41:01 +02:00
Vadim Zeitlin
29a12aa846 Slightly simplify wxTopLevelWindowMSW::Create()
Don't use "ret" variable, we can avoid testing it if we just return
immediately in case of failure.
2018-03-28 17:30:38 +02:00
Vadim Zeitlin
41c4f4153c Use scope guard to ensure that free() is called in wxTLW code
No real changes, just make the code safer by ensuring that free() is
always called instead of doing it manually.
2018-03-28 17:28:01 +02:00
Danny Scott
677989bd8f Correct TDM and MinGW compiler descriptions in the release notes
Closes https://github.com/wxWidgets/wxWidgets/pull/765
2018-03-25 14:22:35 +02:00
Vadim Zeitlin
5dd156185f Merge branch 'master' of https://github.com/dhowland/wxWidgets
Improve stock items consistency and aesthetics.

Closes https://github.com/wxWidgets/wxWidgets/pull/763
2018-03-25 14:16:42 +02:00
Vadim Zeitlin
6b859ce330 Use Last[Read/Write]Count() in socket stream operations
Using LastRead() was MT-unsafe when the same socket was used for both
writing and reading from different threads.

It's not clear if this change is sufficient to make wxSocket fully
MT-safe in this scenario, but it does help and there should be no
negative effects from doing this.

Closes #17787.

Closes https://github.com/wxWidgets/wxWidgets/pull/761
2018-03-25 14:07:22 +02:00
Trylz
79170994fc Fix handling of second auxiliary mouse button events in wxMSW
The test for AUX2 mouse button was wrong and checked whether the button
was pressed, instead of checking whether the event was generated by it.

Check the event source correctly by comparing wParam with XBUTTON2 and
not MK_XBUTTON2.

Closes https://github.com/wxWidgets/wxWidgets/pull/753
2018-03-25 13:58:36 +02:00
Vadim Zeitlin
bf30fa7490 Include required headers explicitly in the widgets sample
Don't rely on wx/treebook.h pulling in wx/treectrl.h and wx/textctrl.h,
forward declare or include the headers declaring the classes from these
headers explicitly where needed.
2018-03-24 19:14:52 +01:00
Maarten Bent
c103ab686c CMake: Disable dialup sample in macOS 2018-03-23 22:00:29 +01:00