Commit Graph

64148 Commits

Author SHA1 Message Date
Cătălin Răceanu
bb29b87a45 Add test case for window positioning beyond Short limit 2018-04-30 00:58:39 +03: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
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
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
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
Maarten Bent
e4c0beac25 CMake: Remove duplicate wxUSE_IMAGE option 2018-03-23 21:59:38 +01:00
Maarten Bent
e2ddc3e863 CMake: Fix GTK3 Win32 build
Add 'BEFORE' to target_include_directories so we include the headers
of the buildin third-party libraries before headers of third-party
libraries included in wxTOOLKIT_INCLUDE_DIRS.
2018-03-23 21:58:39 +01:00
Maarten Bent
3ae0ca9d0e CMake: Fix adding access and dll samples 2018-03-23 21:50:39 +01:00
Felipe
0c4c5a2aa9 Update Brazilian Portuguese translations
Now 100% complete.
2018-03-19 00:34:06 +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
Vadim Zeitlin
7e8fb1e294 Use border style consistently in the widgets sample
Use GetAttrs().m_defaultFlags everywhere when creating the widgets, it
was done for some but not all of them before, without any apparent
reason.

This should make setting various border styles work (for the widgets
supporting them).
2018-03-17 17:50:56 +01:00
Vadim Zeitlin
0acb119ccb Remove unnecessary empty dtors from the widgets sample
No real changes, just remove completely unnecessary lines and trailing
semicolons after them.
2018-03-17 17:24:07 +01:00
Vadim Zeitlin
b97ea90f4f Add default value for MakeConfigFileName() 2nd argument
Make it possible to call wxStandardPaths::MakeConfigFileName() without
explicitly specifying the convention to use, to make it conform to the
documentation (previously this only worked when calling the
wxStandardPathsBase version of the method).

Closes #18106.
2018-03-17 17:17:05 +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
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
Paul Cornett
05454e778c Build fix for GTK+ < 2.18
Broken by 986f61f33e
2018-03-12 10:06:23 -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
Vadim Zeitlin
78ad6ef561 Fix and extend persistent objects overview in the manual
Give the example of saving the frame geometry, which is undoubtedly the
most common use case of these classes, and simplify the existing
example with wxNotebook.
2018-03-11 22:04:36 +01:00
Xaviou
a2456453bc Merge branch 'master' of github.com:wxWidgets/wxWidgets 2018-03-09 19:03:01 +01:00
Vadim Zeitlin
6037718fef Don't try building universal macOS binaries for PPC
Support for this architecture is not present in any of the still
supported SDK versions anyhow.
2018-03-08 23:21:44 +01:00
Xaviou
9cb625a223 Merge branch 'master' of github.com:wxWidgets/wxWidgets 2018-03-07 19:08:17 +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
Vadim Zeitlin
f99d3df9c0 Fix harmless gcc -Wconversion-null warning in menu unit test
Don't compare with NULL inside CPPUNIT_ASSERT() to avoid

	warning: passing NULL to non-pointer argument 1 of
	‘Catch::BinaryExpression<T, (Catch::Internal::Operator)0u, const
	RhsT&> Catch::ExpressionLhs<T>::operator==(const RhsT&) [with
	RhsT = long int, T = wxMenuItem* const&]’ [-Wconversion-null]

gcc warning.
2018-03-07 14:59:40 +01:00
Maarten Bent
b3c25e57bc Fix warning for missing field initializers 2018-03-06 23:43:08 +01:00
Maarten Bent
ef539a68d7 Prevent use of uninitialized variable 2018-03-06 23:31:06 +01:00