Commit Graph

63077 Commits

Author SHA1 Message Date
Artur Wieczorek
f34a6253c7 Fix compilation with wxUSE_ACCEL==0 2017-10-08 10:38:54 +02:00
New Pagodi
3a362c64cf Implement EVT_MOUSE_CAPTURE_LOST handler in wxSTC
When mouse is captured somwhere in the application, it's recommended
to have implemented a EVT_MOUSE_CAPTURE_LOST handler.
Resetting in the handler flag signalling captured state seems
to be a sufficient action because something like this is implemented
in the native Scintilla and it works fine in SciTE.

Closes #17961.
2017-10-08 10:22:59 +02:00
New Pagodi
6d0cb403a9 Prevent sending EVT_MOUSE_CAPTURE_LOST while opening a context menu in wxSTC
At least under wxMSW and wxGTK opening a popup menu when mouse is captured
generates EVT_MOUSE_CAPTURE_LOST. We would like to avoid this and
to release capture in a controlled way.

See #17961.
2017-10-08 10:11:47 +02:00
Takeshi Abe
0fea881f12 Fix recurrent "applicable" typo in wxPropertyGrid documentation
It was misspelt as "applicapple" in several places.

Closes https://github.com/wxWidgets/wxWidgets/pull/564
2017-10-06 15:28:58 +02:00
Artur Wieczorek
1ef1f8fda6 Allow setting position of wxProgressDialog (wxMSW)
Position of wxProgressDialog cannot be changed directly because the dialog is created in another thread and may exist when SetPosition() is called. New position has be stored in the data structure used to share data between the main thread and the task dialog runner and the real update is done during the cyclic refresh in the dialog thread.

Closes #13546.
2017-10-05 16:22:15 +02:00
Vadim Zeitlin
961a1c2b39 Remove unused Java class files without sources from help sample
These files didn't have any sources, don't work in any modern browser
and seem to have been completely unused anyhow, so just drop them.

Closes #17962.
2017-10-04 19:15:44 +02:00
Artur Wieczorek
bff8421ed7 Fix setting icon for wxProgressDialog (wxMSW)
Icon for wxProgressDialog cannot be changed directly because the dialog is created in another thread and may not yet exist when SetIcon() is called. We have to store new icon(s) in the data structure used to share data between the main thread and the task dialog runner and wait for a cyclic update.

Closes #17967.
2017-10-04 16:09:23 +02:00
Artur Wieczorek
718c916c93 Don't overwrite notification flags while setting a title for wxProgressDialog (wxMSW)
In wxProgressDialog::SetTitle(), wxSPDD_TITLE_CHANGED flag signaling a request to update a title should be added to the flags already being set and signaling another data waiting for the update.

Closes #17966.
2017-10-04 16:09:23 +02:00
Vadim Zeitlin
f0de65fb98 Make wxDataViewCheckIconTextRenderer class public
Export this class, which was only used internally by wxTreeListCtrl
before, so that user code can use it for its own columns with custom
wxDataViewCtrl models.
2017-10-02 22:28:28 +02:00
Paul Cornett
9662be097d Fix build error caused by 0b2ec56a 2017-10-01 13:24:07 -07:00
Paul Cornett
0b2ec56ae3 Simplify wxMacConvertNewlines helper functions
One is not used at all, two are only used in one place. Make the remaining
two return a wxString instead of taking a wxString pointer parameter.
2017-10-01 10:44:35 -07:00
Paul Cornett
37e29d3451 Use wx prefix for global names 2017-10-01 10:03:48 -07:00
Paul Cornett
63a8a852f9 Avoid unused variable warning 2017-10-01 09:46:56 -07:00
Paul Cornett
7816ca6538 Fix building tests with wxUSE_XRC==0 2017-10-01 09:46:03 -07:00
Paul Cornett
a87599b127 Fix building tests with wxUSE_UIACTIONSIMULATOR==0 2017-10-01 09:44:53 -07:00
Paul Cornett
fc7f20c419 Fix some memory leaks in the tests 2017-10-01 09:41:49 -07:00
Paul Cornett
8c353236ac Fix ifdef for TGA 2017-10-01 09:38:47 -07:00
Paul Cornett
5cd5c878ee Avoid using wxString::ReadAll() on a file containing binary data
ReadAll() does character set conversion, which will likely fail
2017-10-01 09:17:49 -07:00
Paul Cornett
db29d5efba Fix incorrect pointer indirection in sort callback function 2017-10-01 09:11:45 -07:00
Paul Cornett
29e1f1e9ce Avoid deleting object of different size than what was allocated 2017-10-01 09:02:11 -07:00
Paul Cornett
591da5dcc4 Fix memory leak of wxClientData when wxChoice is deleted 2017-10-01 08:55:57 -07:00
Paul Cornett
6a75c8f484 Fix invalid memory access beyond end of image data 2017-10-01 08:41:14 -07:00
orbitcowboy
9416e00abe No real changes, just enclosed macro arguments in parentheses.
I
2017-09-28 19:21:22 +02:00
Artur Wieczorek
c6938e9f97 Fix setting transparency flag for wxBitmap created from wxIcon
wxBitmap should be made transparency-capable before copying wxIcon bits to it. Doing so when wxIcon bits are already copied seems to work fine for OSX 10.8, but not for newer versions. 

Closes #17953.
2017-09-28 19:08:50 +02:00
PB
229c69d891 Czech translations update from pbfordev
Closes https://github.com/wxWidgets/wxWidgets/pull/559
2017-09-27 14:26:07 +02:00
Stefan Csomor
dfed16a792 Adding intrinsics for ARM 64 bit ios png builds 2017-09-26 20:09:24 +02:00
Stefan Csomor
032b718f88 Merge branch 'master' of https://github.com/wxWidgets/wxWidgets 2017-09-25 21:57:36 +02:00
Stefan Csomor
560676a393 Missing chanaged typedef for OpenGLES / iOS 2017-09-25 21:55:34 +02:00
Vadim Zeitlin
81304fcafd Fix linking console applications with MinGW in monolithic build
Do compile wxEntry(void) overload used in wxIMPLEMENT_WXWIN_MAIN_CONSOLE
expansion by non-MSVC compilers under MSW inside the monolithic library
too by replacing the "#if !wxUSE_GUI" check guarding it with "#if
wxUSE_BASE" one.

It's not really clear how could this have ever worked without this fix
before, although it apparently did, but stopped with gcc 7.
2017-09-25 19:01:12 +02:00
Stefan Csomor
3063ea6ca9 Fixing Creation of wxGLCanvas on iOS 2017-09-25 17:42:11 +02:00
Stefan Csomor
9e88518eb2 Emulating proper Left Down State for Mouse Events on iPhone 2017-09-25 17:40:36 +02:00
Artur Wieczorek
53718ac4af Change alignment style dynamically for wxTextCtrl in widgets sample also under wxOSX 2017-09-25 15:51:43 +02:00
Andreas Falkenhahn
ccc513bca9 Allow changing alignment styles after wxTextCtrl creation (wxOSX)
Update NSTextView/NSTextField alignment mode when wxTextCtrl alignment styles are changed with SetWindowStyleFlag().

Closes #17952.
2017-09-25 15:38:24 +02:00
Fabian Cenedese
812224488f Fix wxTreeListCtrl items comparison when using checkboxes
Override DoCompareValues() to handle values of "wxDataViewCheckIconText"
type which is not handled by wxDataViewModel::Compare() itself.

This ensures that the items with checkboxes are sorted by their (text)
contents instead of by the order of their addresses in memory as was
done for them, as for any unknown values type, previously.
2017-09-25 14:47:35 +02:00
Vadim Zeitlin
10e7725246 Add wxDataViewModel::DoCompareValues() useful virtual hook
This new method, called from the default Compare() implementation, is
simpler to override in the derived classes than Compare() itself.
2017-09-25 14:44:24 +02:00
Paul Cornett
cd1c3fab0c Use static linkage for various local names 2017-09-24 09:29:26 -07:00
Paul Cornett
925a1c0734 Avoid assert when deleting last item from wxListCtrl
See #17959
2017-09-24 08:51:48 -07:00
Artur Wieczorek
086793ceef Fix sending SPIN_UP/DOWN events when value wraps around (wxGTK)
SPIN_UP/DOWN events should represent the arrow being pressed,
not a direction in which the value changed (see documentation).

Closes #17957.
2017-09-23 19:08:29 +02:00
Paul Cornett
fd33fcf191 Use static linkage for various local names 2017-09-22 10:45:56 -07:00
Paul Cornett
18edcfab00 Fix memory leak when wxDataViewCtrl is deleted (wxGTK)
Need to delete wxGtkTreeModelNode structure
2017-09-22 10:29:52 -07:00
Artur Wieczorek
3b0a539045 Ensure that new value sent in EVT_SPIN_UP/DOWN is never out the range (wxMSW)
The new value sent in the event cannot be just set to the current value +/- 1. Wrapping and actual limits has to be taken into account.

See #17957.
2017-09-22 15:39:16 +02:00
Artur Wieczorek
a9843a7492 Send EVT_SPIN_UP/DOWN events also when wxSpinButton value wraps around (wxOSX)
EVT_SPIN events should be sent at every value change, not only if it's changed by +/- 1.

See #17957.
2017-09-22 15:28:12 +02:00
Artur Wieczorek
3d5e84b229 Update transparency flag for wxBitmap created from wxIcon
Just created wxBitmap has "hasAlpha" flag set to false so it needs to be modified if source wxIcon contains transparency values.

Closes #17953.
2017-09-22 09:44:10 +02:00
Vadim Zeitlin
4d388e351c Fix Direct2D graphics context after wxPenInfo changes
At least in wxMSW wxPen::GetStipple() returns a non-null (but invalid)
bitmap even when pen style is not wxPENSTYLE_STIPPLE, so don't test for
this bitmap when creating a wxGraphicsPen from a wxPen but for the style
directly.

This avoids using this invalid bitmap later in D2D code, where it
resulted in assert failures.

Also add a similar style test before calling wxPen::GetDashes() for
consistency, even if it doesn't seem to be strictly necessary.

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

Closes #17958.
2017-09-21 18:04:24 +02:00
Václav Slavík
c515c43fd5 Fix wxDataViewCtrl::ClearColumns() crash on macOS 10.13
When replacing m_OutlineView with a new one in ClearColumns(), we must
explicitly remove the old one from its superview to ensure that no more
drawing operations are pending for it. Without this change, Cocoa
drawing code would occasionally crash on attempting to message the
now-zombie m_OutlineView instance. This happened in older macOS
versions too, but became much more frequent in 10.13 High Sierra.
2017-09-21 14:02:41 +02:00
Václav Slavík
03e93b277e Fix wxCommandLinkButton explicit initial size 2017-09-21 14:02:41 +02:00
Artur Wieczorek
e2bfba21fe Fix sending EVT_SPIN_DOWN/UP events in Cocoa implementation of wxSpinButton
To determine which wxSpinButton arrow was clicked, in the action handler there is compared current NSStepper value (after the actual change) with the value before the change. This former value is fetched in the internal mouse click event handler which is invoked before the action handler. This method of determining a delta works fine as long as the current value remains unchanged between the execution of the internal mouse click event handler and the action handler. But if the current value is explicitly changed (by calls to SetValue(), SetRange()) in some handler(s) invoked between these two (like e.g. bound EVT_LEFT_DOWN handler), calculated delta can be invalid and therefore wrong EVT_SPIN_DOWN/UP events can be sent.
To get correct delta value we should to keep track of all explicit changes made to the current value starting from the mouse click and up to the entry to the action handler.

Closes #17955.
2017-09-21 13:45:13 +02:00
Anil Kumar
22a4feea53 Update current item in generic wxDataViewCtrl::SetSelections()
SetSelections was clearing the previous selection, invalidating the
current item, but didn't set it after selecting the new items.

This was causing issues in keyboard selection, e.g. pressing Shift+click
didn't select all the items between the selected and the clicked ones.

Fix this by making the last item of the new selection current, which is
the expected behaviour considering that SetSelections() should be
equivalent to calling SetSelection() with all items one by one.

Signed-off-by: Anil Kumar <anilkumar8753@gmail.com>

Closes https://github.com/wxWidgets/wxWidgets/pull/557
2017-09-19 22:32:21 +02:00
Vadim Zeitlin
78fdea89b1 Fix wxGetWinVersion() description in a comment
No real changes, just update the comment after the changes of commit
dcf95e1cdc to avoid saying that
wxWinVersion_Unknown is 0.
2017-09-18 17:51:25 +02:00
Vadim Zeitlin
5db73ec9b1 Use wxScopedArray<> instead of wxScopeGuard in wxTGAHandler
Using smart array class is better than using ad hoc scope guards for
freeing memory in any case, but in this particular case it also helps to
avoid g++ 7 -Wnoexcept-type warnings due to type of free() changing to
become "void(*)() noexcept" in C++17.
2017-09-17 18:17:58 +02:00