Commit Graph

64183 Commits

Author SHA1 Message Date
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
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
Maarten Bent
3b9aeaeb2f More use of wxOVERRIDE 2018-03-06 23:31:01 +01:00
Vadim Zeitlin
fe7cb6f159 Merge branch 'gcc7-conv-warn'
See https://github.com/wxWidgets/wxWidgets/pull/754
2018-03-06 20:02:22 +01:00
Vadim Zeitlin
2c515d730a Regenerate configure after 3.1.2 version update
This was forgotten in 2ec2837f6d.
2018-03-06 20:00:54 +01:00
Vadim Zeitlin
e777f2a253 Document that wxEVT_TREE_ITEM_MENU item is always valid
Mention that wxEVT_CONTEXT_MENU can be used to show popup menus that
should be shown even when clicking outside of the client area.
2018-03-06 19:51:31 +01:00
Vadim Zeitlin
1f7a8a82c3 Round, rather than truncate, in wxSize and wxPoint operations
It seems to make more sense to round the result to int rather than to
truncate it when scaling wxSize or wxPoint coordinates by a floating
point number.
2018-03-06 16:08:01 +01:00
Vadim Zeitlin
bec7c9a161 Don't truncate to int in wxRealPoint::operator*()
wxRealPoint uses double coordinates and it makes no sense to truncate
the result of scaling it to int -- this was almost certainly a
copy-and-paste error due to copying the code of the corresponding
wxPoint method.
2018-03-06 16:06:35 +01:00
Vadim Zeitlin
9774d92e91 Change wxSize::Scale() to take double, not float
There doesn't seem to be any reason to use float here when double is
used everywhere else.

Moreover, the (implicit) conversion of int to float is not always
lossless, and resulted in -Wconversion warnings from g++ 7, which
disappear when using doubles.
2018-03-06 16:01:45 +01:00
Vadim Zeitlin
1540361e75 Avoid warnings about conversion to wxUint16 in wxUniChar code
This conversion is intentional, so suppress the -Wconversion warning
given by g++ 7 (if this warning is enabled) with an explicit cast.
2018-03-06 16:00:47 +01:00
Vadim Zeitlin
2881d9875a Fix recently broken (re-)layout in the listctrl sample
This completes changes of 0873abb836 which
replaced manual layout code with sizers, but broke layout after
recreating the control in the process.

This change notably fixes the control becoming invisible, due to having
the default too small size, in non-report modes.
2018-03-04 22:42:18 +01:00
Kolya Kosenko
eb3971c199 Move GTK+/Win32 libraries list to toolkit.cmake file 2018-03-01 01:16:06 +02: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
Danny Scott
5e61527c04 Fix typos and shell syntax in the release instructions
Closes #18095.
2018-02-28 18:48:52 +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
6b3b05e5f7 fixing classname 2018-02-28 16:24:43 +01:00