Commit Graph

2035 Commits

Author SHA1 Message Date
Vadim Zeitlin
c93368ea3c Implement bounding box computations for wxGDDC.
Update the bounding box in all the methods drawing something. This wasn't
done before in many of them, resulting in the bounding box remaining empty,
but it is updated now and a new test checking that it is was added.

Closes #12904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-26 01:41:30 +00:00
Vadim Zeitlin
fcacaaf237 Write delay between frames correctly when saving GIF files.
Deal with delays greater than ~2.5s correctly, their most significant byte was
previously lost resulting in 0 delay being written to the file.

Closes #16392.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-25 17:34:12 +00:00
Vadim Zeitlin
8b38ba9726 Fix background of wxRadioBox buttons and wxSlider labels in wxMSW.
Handle WM_CTLCOLOR correctly for them, this wasn't done before because the
code assumed that sub-windows (i.e. HWNDs which belong to the same logical wx
control) were always children of the main window, but they could also be its
siblings (like in at least the two above mentioned cases).

Account for this case in wxControl::DoMSWControlColor() too now.

Closes #12271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-25 17:34:07 +00:00
Tim Kosse
419f0f194e Implement wxGenericListCtrl::EndEditLabel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 11:31:31 +00:00
Vadim Zeitlin
0445ddf58d Skip mouse button release events in wxGenericListCtrl.
This is similar to r76093 for wxGenericTreeCtrl and fixes a similar problem:
clicking in a wxListCtrl inside wxNotebook confused GtkNotebook mouse tracking
logic because it didn't get some events.

Closes #16365.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 12:22:27 +00:00
Vadim Zeitlin
56657b8ea3 Extract setup.h copying into a separate project for MSVC11+.
This fixes problems with parallel builds in Visual Studio 2012 or 2013 IDE as
multiple projects may try to copy setup.h file at once, resulting in errors.

Use _custom_build project as a common dependency to ensure that the copy step
is done only once.

This is a backport of r76419 from trunk, see #16177.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-04 11:31:00 +00:00
Vadim Zeitlin
73052bd106 Check for conversion failure correctly in wx[F]File::Write().
Check for the length of the buffer to determine whether the conversion failed
instead of checking whether it's NULL because this is currently never the case
because of the code in wxString::AsCharBuf() which returns "" and not NULL in
case of conversion failure.

This at least eliminates silent data loss when saving data that can't be
converted to the current locale encoding.

Closes #16348.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 01:00:16 +00:00
Vadim Zeitlin
72448a032a Don't use C++ streams in wxString::FromCDouble() implementation.
This doesn't work if the global C++ locale had been changed and we can't call
imbue(locale::classic()) to ensure that the stream we use here uses the C
locale because imbue() is hopelessly broken in some implementations.

So just get rid of this code and keep only the hack replacing the decimal
separator with the dot explicitly. This is ugly but should always work in
practice and is also consistent with ToCDouble().

Closes #16343.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 00:27:13 +00:00
Vadim Zeitlin
fd254fe843 Fix appearance of custom drawn wxToggleButton in wxMSW.
Ensure that the owner-drawn toggle buttons are drawn in the pressed state when
they are pressed, even if they are also selected or under mouse.

Closes #11665.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-30 00:03:44 +00:00
Vadim Zeitlin
c6c70ae7ed Mention the addition of x64 configs in MSVC 8/9 projects in the change log.
Should have been part of the previous commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 23:56:29 +00:00
Dimitri Schoolwerth
de6fa55214 Fixes for building wxMSW under Cygwin.
Replace a few __WXMSW__ tests with __WINDOWS__ as the former is not
defined any longer (since r73290) when compiling with wxUSE_GUI set to 0.

Tested changes with both wxGTK and wxMSW builds under Cygwin.

Closes #14382.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-24 02:47:13 +00:00
Vadim Zeitlin
3f91df5c5f Set the 3.0.1 release date.
Update the release date in the change log and the manual.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-15 00:30:16 +00:00
Vadim Zeitlin
2b0c073d35 Allow using wxALIGN_CENTER in XRC for wxStaticText.
Only wxALIGN_CENTRE was allowed previously in the XRC, while both worked in
the code and also even in XRC but for wxSizer alignment.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-12 17:13:50 +00:00
Vadim Zeitlin
4357c54bd5 Fix getting position of wxPopupWindow in wxMSW.
Don't offset the returned values by the parent window origin unnecessarily: as
popup windows are created as children of the desktop window in wxMSW, their
coordinates are already expressed in screen coordinate system (which is
exactly the same as display window coordinate system) and we must not try to
translate them to it once again, this is completely wrong and was probably a
left over from earlier wxPopupWindow implementation in which it wasn't created
as a child of desktop.

In 3.0 branch we still need to continue overriding virtual DoGetPosition() for
ABI reasons, but don't do anything in it any more.

Closes #4440.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-09 20:30:55 +00:00
Vadim Zeitlin
4d63d4da42 Fix wxMSW wxCheckListBox appearance when using larger than normal fonts.
Update the height of the items when changing the font to ensure that there is
enough space to show the item text when using fonts larger than normal.

Closes #3577.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-09 00:53:50 +00:00
Vadim Zeitlin
6f79fa7a66 Fix bug with removing items from menus with radio buttons in wxMSW.
Update the indices of the radio groups after removing an item from the menu.

See #14213.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-02 01:13:43 +00:00
Vadim Zeitlin
4f3b27e89a Don't leak wxDataViewCtrl column objects in wxOSX/Cocoa.
NSOutlineView addTableColumn method takes ownership of the column passed to
it, so we must release it ourselves to avoid leaking it.

Closes #16223.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-01 16:22:14 +00:00
Vadim Zeitlin
8f04c24d81 Add support for "hint" property in wxTextCtrl XRC handler.
It is convenient to allow specifying the hints directly in the resources.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-30 16:34:37 +00:00
Vadim Zeitlin
e18d66b9b5 Fix cancelling choice of custom colour in wxPropertyGrid.
When using wxPGEditor_Choice colour property, cancelling the choice of the
custom colour reset the previously selected custom colour.

Fix this by correcting the test for the custom colour which didn't work
before.

Closes #15542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-30 16:34:31 +00:00
Paul Cornett
1a965c03fe Fix X 'BadPixmap' crash in Blit() with mask when GTK+ <= 2.16, closes #16303
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-30 16:29:13 +00:00
Vadim Zeitlin
fa2838c120 Fix wrong resulting string length in UTF-16 to wchar_t conversion.
Don't optimize the returned length for surrogate-less case, this does save a
pass of the string but at the price of returning a wrong result, which is not
worth it, just compute the really required length exactly.

Closes #16298.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-28 19:33:47 +00:00
Paul Cornett
84d8ef207f Fix setting client data when adding items to a sorted wxListBox, broken in r74317
closes #16290


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-26 07:30:42 +00:00
Vadim Zeitlin
a52b9b5715 Avoid showing the colour selection dialog twice in wxPropertyGrid.
Selecting "Custom" in a colour property cell resulted in the colour selection
dialog being shown twice if it was cancelled the first time.

Fix this by using wxPG_PROPERTY_SPECIFIC to indicate that the value is just
being queried and the user shouldn't be asked to enter it, as it is already in
the other places.

Closes #15543.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-22 14:15:05 +00:00
Vadim Zeitlin
6738f908f9 Don't destroy wxFont from its GetFaceName() in wxMSW.
wxFont::GetFaceName() could destroy the HFONT used by the font accidentally,
avoid it by not invalidating the font when caching its face name.

Closes #16273.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-22 14:08:45 +00:00
Paul Cornett
c4d83e7e10 Fix wxSystemSettings::GetColour() returning transparent colors with GTK3, closes #16255
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 17:34:36 +00:00
Vadim Zeitlin
135dcbe4c3 Fix querying the value of wxEnumProperty in wxPropertyGridEditor.
Doing this changed the internal state of the control and resulted in the
choice not being updated.

Fix this by using wxPG_PROPERTY_SPECIFIC.

Closes #15449.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 12:28:25 +00:00
Vadim Zeitlin
f581255875 Fix changing column order in wxGrid when some columns are hidden.
Using negative column widths used for hidden columns when updating the column
positions after dragging one of them to a new position totally broke their
display. Fix this by ignoring the hidden columns.

Closes #16110.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-04 22:11:41 +00:00
Paul Cornett
b634480046 send changed event when selecting a special directory from wxDirPickerCtrl combobox
closes #16064


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-01 16:57:50 +00:00
Vadim Zeitlin
2b147475fd Fix precision in wxGraphicsContext::{Stroke,Draw}Lines() under MSW.
Use floating point coordinates instead of ints which were used for some
reason, resulting in a loss of precision.

Closes #16187.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:39:01 +00:00
Vadim Zeitlin
4e61289210 Bring wxMSW wxBitmap::SetBitmapXXX(wxBitmap()) in line with wxGTK.
Remove or reset the corresponding bitmap if the provided one is invalid
instead of asserting, this is what wxGTK does and this behaviour seems to be
more useful.

Also document this behaviour as it's now implemented in both wxMSW and wxGTK.

Closes #13569.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:38:55 +00:00
Vadim Zeitlin
c654c7c20d Fix return value of wxRichMessageDialog with only an "OK" button.
Apply the same workaround as was applied in r67771 to wxMessageDialog to
wxRichMessageDialog and map IDCANCEL returned from it to IDOK if "Cancel" is
the only button in the dialog -- as in this case it's really just a renamed
(for convenience of allowing the user to use "Esc" to close it) "OK".

Closes #16153.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-02 22:38:36 +00:00
Vadim Zeitlin
b805e8bdde Avoid overflows when calculating metafile coordinates in wxMSW.
Use MulDiv() instead of naive multiplication followed by division as this
could overflow, and did when large paper sizes were used in print preview.

Closes #16138.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-29 16:53:05 +00:00
Vadim Zeitlin
35bd8dbde8 Fix clicking on activatable toggle column in generic wxDataViewCtrl.
Call PrepareForItem() after calling GetLineStart() as the latter calls
PrepareForItem() for other items internally, undoing the effects of the first
call.

Closes #16132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-29 16:52:54 +00:00
Vadim Zeitlin
d274b4a5cf Fix use of expander in non left most position in wxDataViewCtrl.
Correct the expander rectangle definition to work when the expander column
left boundary is not 0, i.e. if the expander column is not the left most one.

Closes #16131.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-29 16:52:48 +00:00
Vadim Zeitlin
69e20dfc0f Close monitoring thread handles as soon as possible in wxMSW.
Don't leave the handles of all threads used for monitoring the child processes
open until the main process termination, rather close them as soon as the
monitored process terminates.

This ensures that we don't accumulate potentially unbounded number of open
handles if we keep launching new child processes. An even better idea would be
to actually use a single thread for monitoring all of them, but this fix is
much simpler and should fix the most acute problem for now.

Closes #16123.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-26 23:41:51 +00:00
Vadim Zeitlin
78c7a11877 Fix toolbar repainting after deleting a tool in wxMSW.
The toolbar was in an inconsistent state when recalculating the sizes of the
separators used as placeholders for the controls and stretch spacers as the
tool was already deleted from the native toolbar but still present in wx
internal toolbar data and this resulted in discrepancies between the indices
in the native and wx toolbars.

Fix this by specially marking the already deleted but not yet removed tool and
ignoring it during the recalculations.

This makes the old, and only partially successful, attempt to work around this
bug in DoDeleteTool() unnecessary and so the code is actually simplified by
this change.

Closes #16095.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:51:27 +00:00
Vadim Zeitlin
37024c991c Fix wxFileSystemWatcher::RemoveAll() to actually work.
We need to call DoRemove() on all watcher objects to really remove them, just
removing our record of them was not enough and e.g. resulted in errors if we
tried to re-add a previously watched path again.

Closes #15531.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:10:36 +00:00
Vadim Zeitlin
ddf01fe77f Fix handling deletion of watched directory in MSW wxFileSystemWatcher.
Don't log an incomprehensible error when the watched directory itself is
deleted, but generate wxFSW_EVENT_DELETE for it. This is consistent with the
behaviour under Unix and generally more useful.

Closes #13294.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-23 00:10:29 +00:00
Vadim Zeitlin
063bb30ec4 Disable the use of new style wxDirDialog under Vista.
IFileDialog-based dialog has a bug making it return a wrong path sometimes
under Vista, disable its use there to avoid it.

Closes #16005.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-16 13:05:34 +00:00
Vadim Zeitlin
44611572b5 Fix resource leak in wxMSW wxStaticBitmap when using RGBA icons.
Release the old handle if it wasn't freed by STM_SETIMAGE itself.

Closes #16068.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-13 16:19:55 +00:00
Vadim Zeitlin
1436ac65df Add support for loading icons in PNG format to wxImage.
ICO files can contain data in PNG, as well as BMP, format in recent (i.e. from
this millennium) versions of Windows, so check for this case in wxICOHandler
and load such data using wxPNGHandler.

See #15918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 22:54:42 +00:00
Vadim Zeitlin
de20880064 Fix accelerators in appended submenu items in wxGTK.
They were not previously taken into account because we didn't call
gtk_widget_add_accelerator() on the right GtkAccelGroup.

Closes #16050.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 15:20:56 +00:00
Vadim Zeitlin
96430b3f3d Make Move{Before,After}InTabOrder() work at any time in wxGTK.
These functions only worked if called at the beginning, before showing the
parent window containing the children whose TAB order was being adjusted,
because it didn't refresh the GTK+ TAB order on the correct window: we need to
do it for the parent of the window being moved, not this window itself.

Closes #16032.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-09 14:03:33 +00:00
Vadim Zeitlin
f4bdf2b324 Fix handling of controls in vertical toolbars in wxMSW.
Not adding the controls to vertical toolbar is not enough, we also need to
hide them to prevent them from being shown as independent floating windows.
And we also need to add separators instead of the controls themselves to keep
the indices the same as in the horizontal case.

Closes #11821.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-08 14:33:29 +00:00
Vadim Zeitlin
4bddf85f6c Fix handling of Esc while an auto-complete drop down is open in wxMSW.
Just close the drop down instead of closing the dialog the text control using
this auto-complete drop down is in, as this was completely unexpected and
counter-intuitive.

Closes #13945.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-08 13:39:39 +00:00
Vadim Zeitlin
cd004895c4 Skip mouse button release events in wxGenericTreeCtrl.
Not doing this prevented the default handling from taking place resulting in
internal confusion in GtkNotebook when wxTreeCtrl was placed inside it: the
code there set the button being held by user in its mouse press event handler
and reset it in its mouse release event handler which was never called because
we didn't skip the event, resulting in ignoring the next mouse press in the
notebook.

Closes #16055.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 13:16:15 +00:00
Vadim Zeitlin
3048caa25d Don't accept data in unsupported format in wxMSW dnd code.
We wrongly pretended to accept the data in formats which we didn't actually
accept and showed misleading cursors to the user.

Fix this by partially reverting some of the changes of r72668 (see #14697).

Closes #16042.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-04 14:07:16 +00:00
Vadim Zeitlin
c61ae4d190 Fix off by 1 error in buffer size in wxOSX wxDropTarget code.
The size of the buffer used for the data currently needs to include an extra
byte for the trailing NUL. This is wrong, as it means that GetDataSize() and
GetDataHere() behaviour is not consistent, but at least avoid overrunning the
buffer for now.

Also use wxCharBuffer instead of raw char array to make the code safer (both
because it releases the memory automatically and because it also adds an extra
byte for the trailing NUL automatically as well, making such bugs impossible).

See #15914.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:50:17 +00:00
Vadim Zeitlin
d30a02642d Implement support for wxGA_VERTICAL style in wxOSX.
Rotate the native control to make it look correct in vertical orientation.

Closes #15682.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:50:11 +00:00
Vadim Zeitlin
1e879aa8b6 Don't crash in wxOSX wxDataViewChoiceRenderer if selection was cancelled.
Check for the index validity and ignore the value of -1 as it is passed if the
selection in the popup was cancelled.

Closes #16017.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:49:52 +00:00