Commit Graph

58476 Commits

Author SHA1 Message Date
Julian Smart
4e269b8628 Reverting previous fix for floating object update in 3.0 branch pending further investigation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-08 13:55:54 +00:00
Vadim Zeitlin
e2d5556984 Polish translations update from Mariusz Drozdowski.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-04 20:55:38 +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
5a85e9e98a Document that wxCANCEL_DEFAULT doesn't work in wxOSX/Cocoa.
See #16268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-01 16:44:22 +00:00
Vadim Zeitlin
7844be587e Don't check for model in wxDataViewCtrl::InsertColumn() in wxOSX.
This isn't done in neither generic nor the GTK versions and prevents from
inserting the columns into the control before associating a model with it.

Closes #16257.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-01 16:30:33 +00:00
Vadim Zeitlin
ef762b44aa Relax checking window visibility in wxGLCanvas::SetCurrent().
It is enough for the window to be shown for SetCurrent() to work, it doesn't
have to be actually visible on screen, and checking for this using
IsShownOnScreen() resulted in false positives.

Closes #16193.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-01 16:27:40 +00:00
Vadim Zeitlin
0ce096c512 Don't leak sort descriptors array in wxDataViewCtrl in wxOSX.
wxCocoaOutlineDataSource owns its sortDescriptors field, so it must release it
in its dealloc() (and also initialize it in its init(), no idea how did it
work without this being done before).

Closes #16231.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-01 16:22:22 +00:00
Vadim Zeitlin
22f0aa4c3e Fix memory leak when using custom renderers in wxOSX wxDataViewCtrl.
wxDataViewRendererNativeData retains a reference to the cell passed to it, so
the cell must be released after passing it to wxDataViewRendererNativeData to
avoid leaking it.

Closes #16226.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-01 16:22:18 +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
08d1e7eec1 Don't recreate the native control in wxOSX wxDataViewCtrl dtor.
Don't call ClearColumns() which recreates the control in order to remove its
columns in wxOSX/Cocoa, just clean up the internal data, the control, and its
columns, will soon be deleted anyhow.

Closes #16210.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-06-01 16:22:07 +00:00
Vadim Zeitlin
c4b54ea532 Remove spurious MSVC check around wxDF_HTML code in wxMSW.
For some reason, support for wxDF_HTML in clipboard code was disabled for
non-MSVC compilers. Enable it now as it's not compiler-specific at all.

See #16297.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-31 14:30:21 +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
Paul Cornett
13b55e7796 fix wxStaticText improperly wrapping text when initial size is fully specified, closes #16278
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-24 18:39:56 +00:00
Vadim Zeitlin
6ebd5eed16 Return wxWinVersion_[78] correctly from wxMSW wxGetWinVersion().
This is especially important because the workaround of r76152 for IFileDialog
bug under Windows Vista also applied under later Windows versions as they were
not detected correctly.

Closes #16286.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-22 20:33:48 +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
Václav Slavík
419805785a Fix warning in wxSimplebook::UpdateSelectedPage().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-21 07:40:50 +00:00
Robin Dunn
8b0f7cb979 Add Get/SetDisabledBitmap methods for msw
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-20 03:16:51 +00:00
Stefan Csomor
19a0dcc4ca backport, fixing deletion of window during mouse down handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-19 18:40:40 +00:00
Václav Slavík
794bce48c8 Add missing Language: header to locale/msw/it.po.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-19 17:26:19 +00:00
Václav Slavík
c69fc1f366 Fix wxOSX warnings about unused variables.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-19 17:23:24 +00:00
Václav Slavík
d418a98f28 Don't use the deprecated 'register' storage specifier.
It is not only useless with any modern C++ compiler, but also deprecated
in C++11.  Removing it fixes Clang warnings on the subject.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-19 17:23:21 +00:00
Dimitri Schoolwerth
aaa22ee060 Add 3 missing declarations for wxPoint2DInt non-member operator functions.
Three duplicate declarations were removed in r70493 instead of replacing them with the missing declarations.

Closes #10946.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 21:31:25 +00:00
Dimitri Schoolwerth
cdea0768f4 Cast arguments passed to wxPoint2DInt constructor.
Cast them to wxInt32 (instead of int) as that is the type of the wxPoint2DInt members m_x and m_y.

See #10946.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 21:29:49 +00:00
Dimitri Schoolwerth
bdd5422d92 Fix wxPoint2DInt::operator*= and wxPoint2DInt::operator/= .
These operator functions are respectively adding and subtracting their arguments. Instead let the functions multiply and divide their arguments (like their wxPoint2DDouble counterparts were doing already).

See #10946.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 21:26:42 +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
720b050f41 Fix recursive self-reference in wxRichTextAttr documentation.
Refer to wxTextAttr, not wxRichTextAttr itself.

Closes #16271.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 12:28:31 +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
41ee49975c Use wxMemorySize type in Unix implementation of wxGetFreeMemory().
This should avoid overflows on 32 bit systems with more than 2GB of RAM.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-14 12:40:05 +00:00
Vadim Zeitlin
3d3098482a Check result of fgets() and sscanf() in wxGetFreeMemory().
This fixes g++ -Wunused-result warnings and also actually makes the code more
robust.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-14 12:40:02 +00:00
Vadim Zeitlin
0c174e236d Remove unused variables from wxRichTextListStylePage code.
This avoids warnings about them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-14 12:39:58 +00:00
Vadim Zeitlin
4409844ec0 Fix print preview in 64 bit MinGW wxMSW builds.
Don't hardcode wrong PRINTDLG structure size for 64 bit builds.

In fact, don't hardcode it at all as it just doesn't seem to be necessary to
do it, the comment about Cygwin getting it wrong seems to be out of date.

Closes #16256.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:16:21 +00:00
Vadim Zeitlin
58a7079ebd Fix cast from "void*" to integer type in wxThread::Exit() for non-MSVC.
This fixes another problem in 64 bit Cygwin build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:16:18 +00:00
Vadim Zeitlin
8240083d9f Use DWORD instead of unsigned long in wxFileSystemWatcher wxMSW code.
These two types are not the same in 64 bit Cygwin builds, so fix the build by
just using DWORD everywhere.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:16:15 +00:00
Vadim Zeitlin
f6482e5a87 Fix tests for __WXMSW__ in non-GUI-only code.
__WXMSW__ is not defined when compiling wxBase, so the tests which were meant
to prevent using Unix event loop classes under Cygwin (under which both
__UNIX__ and __WINDOWS__, but not __WXMSW__, are defined) failed, breaking
compilation of all wxEventLoop-related code in wxBase in Cygwin builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:16:11 +00:00
Vadim Zeitlin
0f6a438bb1 Don't use _{get,ch}drive() functions in Cygwin builds.
They are not available there when not using MinGW headers, e.g. in 64 bit
builds.

Also simplify the code by using wxHAS_DRIVE_FUNCTIONS instead of complicated
(and sometimes negated) checks for MinGW32 version.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76515 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:16:08 +00:00
Vadim Zeitlin
3ebc8f4363 Don't use LCID and WXLCID interchangeably in wxMSW code.
Similarly to the problem with WXDWORD and DWORD, LCID is actually an unsigned
int and not unsigned long in 64 bit Cygwin builds, so it's a different type.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:16:05 +00:00
Vadim Zeitlin
1902f64b6b Add casts from long to LONG to fix 64 bit Cygwin wxMSW build.
In 64 bits, LONG is actually defined as int in Cygwin gcc headers, so is
different from long -- even if both types use identical representation.

Just add the casts to fix this for now, as this is the smallest ABI-preserving
change. Ideally, something better and less ugly would need to be done in the
future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:16:02 +00:00
Vadim Zeitlin
e3c2618169 Don't use DWORD and WXDWORD interchangeably in wxMSW code.
WXDWORD is defined as unsigned long, while DWORD is defined as unsigned int in
64 bit builds using Cygwin gcc, so they are not the same type (although they
do have the same size) and using the latter instead of the former in the
function definition results in errors in this build configuration.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:15:58 +00:00
Vadim Zeitlin
05549638e9 Define __WIN64__ for 64 bit wxMSW builds with gcc too.
Previously __WIN64__ was only defined for 64 bit builds with MSVC, which
resulted in many problems when using 64 bit Cygwin compiler.

Also don't use MSVC-specific __int64 but our wxInt64 for WX{L,W}PARAM and
WXLRESULT definitions in 64 bit builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:15:55 +00:00
Vadim Zeitlin
eb46b44662 Use __WIN64__ instead of MSVC-specific _WIN64 in wxIsPlatform64Bit().
Make the code work correctly for 64 bit builds with other compilers, e.g. gcc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:15:52 +00:00
Vadim Zeitlin
f8d937ff2d Don't define wxSIZE_T_IS_UINT for Cygwin unconditionally.
This breaks 64 bit Cygwin builds and is unnecessary for 32 bit ones where
configure already defines wxSIZE_T_IS_UINT correctly.

Closes #16130.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-12 13:15:47 +00:00
Paul Cornett
cb7cff40d5 fix build on systems which don't have vsscanf, such as Solaris 8
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-09 15:14:54 +00:00
Paul Cornett
8a643ba3ea fix building on IRIX with GCC
It's impossible to know what problem this was supposed to fix (it's been there
since the Dawn of Time: r2), but it prevents stddef.h from defining ptrdiff_t,
among others. We need ptrdiff_t.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-08 17:05:16 +00:00
Vadim Zeitlin
9d05388454 Minor documentation corrections.
Escape the space after "i.e." (or avoid using it altogether), add missing @ref.

Closes #16235.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 18:16:23 +00:00
Paul Cornett
97ad6435c3 Always check for wide char IO functions, they are used regardless of wxUSE_UNICODE setting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-06 16:34:47 +00:00