Commit Graph

39762 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Max Maisel
2cbcf939df wxRibbonButtonBarButton: Implemented manual button size class control
Added new functions SetButtonMinSizeClass() and
SetButtonMaxSizeClass() that set a button's minimum
and maximum allowed size class during ribbon layout collapsing.
Size classes are values from wxRibbonButtonBarButtonState enum.

wxRibbonButtonBar::MakeLayouts() and
wxRibbonButtonBar::TryCollapseLayout() are modified to support
this new behaviour.

The modified wxRibbonButtonBar provate layout routines are
aware of wxRIBBON_BUTTONBAR_BUTTON_SMALL which is not implemented
yet in MSW wxRibbonMSWArtProvider::DrawButtonBarButtonForeground.
2018-03-17 18:38:02 +01:00
Vadim Zeitlin
d3b722944b Allow creating generic wxSearchCtrl without border
Just remove the code manipulating the style from wxSearchCtrl::Create(),
there doesn't seem to be any need to force anything for "more native
appearance" as the control appears just fine by default under both wxMSW
and wxGTK without doing anything here (and is not used under macOS).

As a (desired) side effect, specifying wxBORDER_NONE now works as it's
not overridden by the control itself any more.

Closes #18105.
2018-03-17 18:10:08 +01:00
David Howland
c841e78083 Fill out help strings for menu items 2018-03-16 10:52:28 -04:00
David Howland
1f30c8ccc9 Bring stock Find and Replace in line with standards
Find and Replace would typically require user input to receive the
search string from the user, therefore their labels should end with an
elipsis.  Also, these functions operate on documents, not selections.
Finally, Ctrl-H is the commonly used shortcut for Replace, rather than
Help (which is usually F1)
2018-03-16 10:26:56 -04:00
David Howland
e733c5ce75 Use more aesthetic "Save As..." 2018-03-16 08:29:45 -04:00
David Howland
655f9c7c4e Fix wxID_SAVEAS label to meet design guidelines
This bug was introduced way back in Aug 2011 by
73d1308b85

This fixes the code to match the exsiting documentation in
docs/doxygen/mainpages/const_stockitems.h
2018-03-15 17:46:57 -04:00
Max Maisel
7aed0e547b wxRibbonButtonBarButton: Implemented mutable lables and minimum label width
Added new function SetButtonText() which modifies labels of
existing ribbon button bar buttons.
The new function SetButtonTextMinWidth() is used to specify the
label width in advance so that lables can be changed without
recalculating the layout.
wxRibbonArtProvider is modified to support these operation.
2018-03-15 16:27:30 +01:00
Max Maisel
5d6ba5d335 wxRibbonButtonBarButton: Added SetButtonIcon()
Added new function SetButtonIcon() which modifies
button bitmaps of existing ribbon button bar buttons.
2018-03-14 16:46:49 +01:00
Paul Cornett
aee46e075f Build fix for GLib < 2.16
GIO did not exist before 2.16, broken by 4dfde501df
2018-03-12 20:45:03 -07:00
Vadim Zeitlin
e5a1a29e77 Fix wxGTK build with glib < 2.32 and streamline the code a bit
Define g_signal_handlers_disconnect_by_data() if it's not available,
i.e. when using glib older than 2.32 where it was added, to fix the
build under old systems such as CentOS 6 broken by the changes of
8278f7b618 (see #18084).

Also use it elsewhere instead of g_signal_handlers_disconnect_matched()
as it's more readable.

Closes https://github.com/wxWidgets/wxWidgets/pull/760
2018-03-11 22:22:45 +01:00
VZ
e183b6d382 Fix miscellaneous build warnings
See https://github.com/wxWidgets/wxWidgets/pull/755
2018-03-07 18:25:32 +01:00
Vadim Zeitlin
66fdf49ed8 Work around a Wine bug in wxDateTimePickerCtrl sizing
Don't assume that all Vista and later systems support DTM_GETIDEALSIZE,
this is not the case under Wine even when it's emulating a Vista+
Windows version and trusting DTM_GETIDEALSIZE to always return the right
value resulted in these controls having 0 size and not being shown at
all when running wxWidgets programs under Wine.

See https://bugs.winehq.org/show_bug.cgi?id=44680
2018-03-07 15:12:21 +01:00
Maarten Bent
ef539a68d7 Prevent use of uninitialized variable 2018-03-06 23:31:06 +01:00
Maarten Bent
3b9aeaeb2f More use of wxOVERRIDE 2018-03-06 23:31:01 +01:00
Stefan Csomor
c4a4d95ad1 using wx translations for window menu 2018-02-28 21:09:41 +01:00
Stefan Csomor
0fc53016a9 making NSString conversion functions available in private.h 2018-02-28 21:08:27 +01:00
Vadim Zeitlin
e87544ae70 Fix possible hang after clearing wxTAB_TRAVERSAL style in wxMSW
Clearing this style by calling SetWindowStyleFlag() could reset
WS_EX_CONTROLPARENT extended flags bit, breaking the invariant that the
parent of any window with this bit set has it as well and resulting in
hangs due to infinite loops inside Windows own code iterating over the
controls.

Prevent this from happening by always preserving this style bit if it
was previously set in MSWUpdateStyle(). This is a bit ugly, but there
doesn't seem to be any obviously better way to do it.

Closes #18091.
2018-02-28 16:58:27 +01:00
Stefan Csomor
a7505356a4 supporting Window Menu as Carbon did 2018-02-28 16:10:33 +01:00
Tobias Taschner
dd2d62c703 Suppress size event when IsMaximized is called on OSX
IsMaximized internally calls [NSWindow isZoomed] which triggers a
windowWillResize call. Resize events will be ignored while calling
isZoomed.

Closes #17407.

See https://github.com/wxWidgets/wxWidgets/pull/740
2018-02-21 17:08:45 +01:00
Stefano D. Mtangoo
bf418320b7 Work around crash in wxStyledTextCtrl under Mac
When not using double buffering, double-clicking to select text in the
control results in crashes.

Avoid this by using double-buffering under Mac, even though it shouldn't
be necessary.

This reverts the changes of cb799483b7
under Mac.

See #18085.
2018-02-18 21:22:41 +01:00
Vadim Zeitlin
cad824d089 Let windows with wxWANTS_CHARS have TAB presses under Mac
This notably fixes the use of TAB in wxStyledTextCtrl, where it's
supposed to be handled by the control itself and not as a navigation
key, but is more general than this.

Fixes a regression from 8bca6deda3.

Closes #17999.
2018-02-18 21:22:41 +01:00