Commit Graph

63499 Commits

Author SHA1 Message Date
Vadim Zeitlin
35620a15b6 Remove redundant __WINDOWS__ check and definition
Remove this block was as it was inside "#ifdef __WINDOWS__" and so the
condition could never be true anyhow.

No real changes.
2017-08-24 13:42:48 +02:00
Paul Cornett
df1254dfbf Remove unneeded override of Destroy() after d456d2d6 2017-08-23 23:27:25 -07:00
Paul Cornett
d456d2d60e Prevent use of deleted wxDocMDIChildFrame in wxView dtor
Revert 0d8737fd, it became unnecessary after a9e2e6e5 and prevents b7341fe0 from working properly
See #5066
2017-08-23 23:23:08 -07:00
PB
8a5a57ac10 Add one more @c 2017-08-23 22:36:41 +02:00
PB
fe2a31d6f9 Few more changes 2017-08-23 21:43:48 +02:00
PB
622adc978c Improve wxAutomationObject-related documentation 2017-08-23 19:56:01 +02:00
Vadim Zeitlin
46d36d99c7 Don't give misleading message for unhandled exceptions in a thread
The application doesn't necessarily terminate when a thread dies due to an
unhandled exception, even though it will often crash later.
2017-08-22 21:39:27 +02:00
Vadim Zeitlin
bf083479d5 Make message from wxApp::OnUnhandledException() more clear
This message now appears even in the (default) release builds as __WXDEBUG__
is always defined, so it needs to be at least somewhat understandable by
normal users, even if it remains primarily targeted at the developers.

Also remove __WXDEBUG__ checks in this function, this is a left-over from the
pre-3.0 debug mode.
2017-08-22 21:39:27 +02:00
Vadim Zeitlin
b8ff711460 Merge branch 'blocking-sockets-fixes'
Closes #17937.
2017-08-21 13:22:53 +02:00
Vadim Zeitlin
296bd7d64e Simplify TAB order code in wxStdDialogButtonSizer::Realize()
No real changes, just add a helper class to avoid repeating the same
sequence of lines many times in this function.

This aims to slightly improve 42e9eb7ce8.

See #17940.

Closes https://github.com/wxWidgets/wxWidgets/pull/539
2017-08-21 13:21:31 +02:00
Vadim Zeitlin
c45a8d49f1 Replace dynamic casts with MSWShouldSetDefaultFont() virtual method
Get rid of ugly wxDynamicCastThis()s in wxMSW wxControl code and add a
new virtual method overridden in wx{Tree,List}Ctrl instead.

Also stop comparing the font with wxSYS_DEFAULT_GUI_FONT, there doesn't
seem to be any good reason to set this particular font for these
controls neither.

In addition to simplifying and de-ugligying the code, this commit
incidentally fixes -Wnonnull-compare warnings in this code from gcc6
too.
2017-08-21 02:09:19 +02:00
Vadim Zeitlin
04c5a179be Don't compare reference with null in wxBitmap::UngetRawData()
This doesn't seem to make any sense as this function is always called
with non-null "*this" reference from wxPixelData dtor and results in
-Waddress warning from gcc 6.
2017-08-21 01:53:22 +02:00
Vadim Zeitlin
f72575ad08 Remove unnecessary semicolon at top level
This results in a warning from gcc with -pedantic.
2017-08-21 00:19:31 +02:00
Artur Wieczorek
0624108acc Use dedicated function to check whether menu item is a radio button
No real changes, just refactoring.
2017-08-20 21:28:46 +02:00
Artur Wieczorek
e56cb112d3 Fix warning about unused variable in release build
Refactor the code to remove variable which is used only in the assertion.

See #14213.
2017-08-20 21:28:12 +02:00
Artur Wieczorek
42e9eb7ce8 Ensure that navigation order reflects button layout in wxStdDialogButtonSizer
In wxStdDialogButtonSizer, keyboard navigation order through the buttons
should be the same as the order they are positioned in the sizer regardless
of the order the were created or added to the sizer.

Closes #17940.
2017-08-16 23:12:26 +02:00
Vadim Zeitlin
dadb7b9fb0 Don't register async notifications for MSW blocking sockets
Under MSW calling UnblockAndRegisterWithEventLoop() for blocking sockets
is not only useless, but actually harmful when the socket is used from a
worker thread (which is the common case for blocking sockets), as it
means that the main thread will be receiving notifications for the
socket events and modifying the socket object while it's being used from
the other thread, resulting in data races and general brokenness.

This is similar to e18c8fd29a for Unix
sockets.

Closes #17937.
2017-08-15 19:49:04 +02:00
Vadim Zeitlin
2e3e265a8b Remove unnecessary checks for INVALID_SOCKET in MSW code
wxSocketManager::Install_Callback() and Uninstall_Callback() are only
called for successfully created sockets, so there should be no need for
these checks and there are none in the Unix version.
2017-08-15 19:49:02 +02:00
Vadim Zeitlin
8a29f958a1 Detect any attempt to use non-blocking socket from worker threads
This doesn't work, as non-blocking sockets implementation requires
dispatching events generated by them, which is only possible from the
main thread event loop, and it's better to be upfront about it rather
than failing mysteriously later.
2017-08-15 19:48:46 +02:00
Vadim Zeitlin
8d66bfd7ef Use blocking server socket in non-main threads for active FTP
This is similar to the previous commit, but for active FTP connections.
wxSocketServer was also created directly in this case, without using
wxProtocol ctor, so wxSOCKET_BLOCK must be explicitly specified when
creating it from worker thread, just as it was already done in
d421373c2e for the other connections and
in the previous commit for passive FTP ones.

See #17937.
2017-08-15 19:35:01 +02:00
Vadim Zeitlin
40774e1ccd Use blocking sockets from non-main threads for passive FTP too
This extends the changes of d421373c2e
to the case of passive FTP, which created wxSocketClient directly and so
didn't use the correct flags when used from a worker thread.

See #17937.
2017-08-15 19:34:58 +02:00
Vadim Zeitlin
ba8bab2282 Factor out socket flag selection into GetBlockingFlagIfNeeded()
No real changes, just refactor wxProtocol ctor to use a new function
that can be reused elsewhere too.
2017-08-15 19:34:54 +02:00
VZ
c93b88af39 Build samples in parallel with "make -jN"
Building samples one by one has become a significant pessimization
nowadays, when multicore machines are much more common than single core
ones, so get rid of the shell loop which built the samples one by one
and use make targets to let make build as many targets at once as
desired.

Closes https://github.com/wxWidgets/wxWidgets/pull/536
2017-08-15 19:16:27 +02:00
Vadim Zeitlin
01fac4b748 Delete windows before application on session end in wxMSW
When WM_ENDSESSION was received by the application, the wxApp object
itself was shut down by calling OnExit() on it before all the TLWs were
destroyed, which could be completely unexpected as during normal
shutdown the order of events is exactly the reverse.

In practice, this resulted in crashes in any application whose main
window close event handler or dtor touched wxTheApp in any way (e.g. to
save any configuration in the global wxConfig object destroyed by
wxApp::OnExit()).

See #9590 (sorry for missing the point before, ATS).
2017-08-15 00:41:16 +02:00
Vadim Zeitlin
7316ce7626 Add screenshots of wxRearrange{List,Ctrl} to the manual
This is useful if only to illustrate the difference between the two.
2017-08-14 14:59:31 +02:00
Kaya Zeren
c82a0b82a2 Turkish translations update 2017-08-14 01:51:50 +02:00
Vadim Zeitlin
3654a12d6a Fix xrc sample build with wxUSE_GIF==0
Also check for wxUSE_XPM for consistency.
2017-08-14 01:23:08 +02:00
Artur Wieczorek
b6e4bdce3d Reimplement adding items to radio groups in wxMenu (wxOSX)
Rewrote wxOSX radio groups-related code reusing the code which works on
wxMSW and which seems to provide more rich functionality (supports adding
radio as well as no-radio items) and to have known bugs fixed.
The ranges of all radio groups are stored in wxMenu itself instead of
storing the information about the radio group an item belongs to in
the item itself - see 89511b4268.

Closes #14213.
Closes #17568.
2017-08-13 01:48:59 +02:00
Artur Wieczorek
4bc1c6fb7c Extract wxMenuRadioItemsData to a separate file
wxMenuRadioItemsData implementation is not MSW-specific and can be reused
on other platforms.

See #14213.
2017-08-13 00:36:37 +02:00
Artur Wieczorek
28af0ca6e9 Fix updating radio groups when non-radio item is inserted to wxMenu (MSW)
When wxMenu contains radio groups and a new item (radio and non-radio) is
being added to the menu, data describing exisiting groups have to
be updated accordingly. Because adding radio and non-radio items has
a different impact on the groups, adding non-radio items has to be handled
separately. (The main difference between adding radio and non-radio item is
that when a radio item is inserted inside the group this group is extended,
but for non-radio item the group is split into two subgroups.)
2017-08-13 00:31:53 +02:00
Adolfo Jayme Barrientos
0b572a67c1 Update Spanish translation
Closes https://github.com/wxWidgets/wxWidgets/pull/535
2017-08-10 00:28:27 +02:00
Artur Wieczorek
8dc4bd40a8 Don't convert any non-monochrome wxBitmap to ARGB format
While selecting wxBitmap with colour depth > 1 bpp into wxMemoryDC there is
no need to convert its format to ARGB regardless of the current
interpretation of the alpha channel values in the bitmap. If original
bitmap was marked as a RGB one (with alpha channel being ignored), it
should retain this format to avoid confusions.

Closes #16309.
2017-08-09 21:23:34 +02:00
Vadim Zeitlin
77d7d3a014 Fix wxWizard::HasPrevPage() documentation
Replace the wrongly copied "last" with "first".
2017-08-09 20:59:29 +02:00
Vadim Zeitlin
a11e09fb11 Skip setting geometry hints for non resizeable windows in wxGTK
Avoid calling gtk_window_set_geometry_hints() when the window can't be
resized anyhow, this doesn't seem to be necessary and results in
warnings like the following when using Gnome:

gnome-session[xxx]: Window manager warning: Window 0xxxx (Minimal wx)
sets an MWM hint indicating it isn't resizable, but sets min size 198 x
154 and max size 268435454 x 268435454; this doesn't make much sense.

Closes https://github.com/wxWidgets/wxWidgets/pull/529
2017-08-09 20:57:12 +02:00
Vadim Zeitlin
7e80ff4ed8 Merge branch 'i18n-context'
Closes https://github.com/wxWidgets/wxWidgets/pull/530
2017-08-09 20:47:41 +02:00
Vadim Zeitlin
91385acd5d Rename context-specific translation macros and document them
Try to use more clear names for the macros and also try to make the
sample more self-explanatory.
2017-08-09 14:21:47 +02:00
Vadim Zeitlin
99d7b13e3f Force current item to stay visible in wxListCtrl after deletion
The vertical scrollbar position could be updated (at least wit wxGTK) to
not show the last item any longer, after deleting the previously last
item, which was very annoying from the user point of view as the focus
was visually lost.

Avoid this by explicitly calling EnsureVisible() to prevent this from
happening.
2017-08-09 14:12:38 +02:00
atobi
7e0093d61b Fix wrong minimization of wxRibbonPanel
Don't minimize the panel if it's just of sufficient size.

Closes #17934.
2017-08-08 10:59:40 +02:00
Olly Betts
a00674a6ae Correct docs for wxSpinCtrlDouble style parameter
The default in the code was changed as a result of #10621 but the
docs weren't updated to match.

Closes #17914.

See https://github.com/wxWidgets/wxWidgets/pull/534
2017-08-08 10:56:00 +02:00
Artur Wieczorek
ec55f11ff7 Add support for wxTE_CHARWRAP to wxTextCtrl
Apparently various text wrapping modes are not supported natively by
NSTextView (apart from word wrapping which is used by default) and
non-default wrapping has to be implemented in the custom code.
To wrap lines at any character, NSLineBreakByCharWrapping style should be
applied at any text change to the entire text stored in NSTextStorage
associated with NSTextView. This is done in DoUpdateTextStyle() method
which is called from controlTextDidChange() when text is modified by
the user, or SetStringValue() and WriteText() when text is set
programmatically.
2017-08-05 21:57:01 +02:00
Paul Cornett
7626292fa4 Don't reset scroll position to zero when window size changes
Aside from just being the proper thing to do, this fixes scrolling with
GTK3 when not using overlay scrollbars, where size events are somehow being
generated during scrolling.
See #17915
2017-08-04 07:56:23 -07:00
Artur Wieczorek
20b53502d9 Update documentation regarding styles of wxTextCtrl
Add notes that some styles are available also on wxOSX. Mention that
wrapping is available only for multi-line controls.
2017-08-03 21:30:40 +02:00
Artur Wieczorek
111ff4e618 Add presentation of text alignment in wxTextCtrl to widgets sample
Added an option to choose text alignment styles for wxTextCtrl presented
in the sample.
2017-08-03 21:09:40 +02:00
ROBERTO
9229777535 Update Italian translation
Update Italian translation (add new strings/revised previous strings)

Closes https://github.com/wxWidgets/wxWidgets/pull/531
2017-08-03 18:17:00 +02:00
Artur Wieczorek
723650d51d Honour text alignment while formatting window label
Take into account text alignment while formatting NSAttributedString containing the text of the label.

Closes #17933.
2017-08-03 11:57:47 +02:00
Artur Wieczorek
5aa66ffd93 Fix text alignment in wxRadioButton
Label should be always left-aligned to be positioned just next to the button image.

See #17933.
2017-08-03 11:56:30 +02:00
Artur Wieczorek
da0299f30e Fix text alignment in wxCheckBox
Align the text according to the style.

See #17933.
2017-08-03 11:55:36 +02:00
Artur Wieczorek
7c0d4f211d Make wxTextCtrl with no wxTE_MULTILINE style really single-line (wxOSX)
Under wxGTK wrapping for single-line controls is explictly disabled (see
wxTextCtrl::GTKSetWrapMode), under wxMSW wrapping is not supported, so for
the sake of consistency also under wxOSX single-line control shouldn't
support wrapping and vertical scrolling.

Closes #12693.
2017-08-03 00:11:26 +02:00
Artur Wieczorek
e426411e34 Allow setting wrap styles only for multi-line wxTextCtrl (widgets sample)
Wrap styles are not applicable to the single-line control and radio box
to select these styles should be disabled when single-line control is
active.
It looks that it was intended to implement this feature with
TextPage_WrapLines constant and OnUpdateUIWrapLinesCheckbox handler so we
can reuse these elements.
2017-08-02 23:41:40 +02:00
Artur Wieczorek
1731ad5e31 Add support for wxTE_NO_VSCROLL style to wxTextCtrl (wxOSX) 2017-08-02 23:24:02 +02:00