Commit Graph

58138 Commits

Author SHA1 Message Date
Paul Cornett
5e499842a7 initialize members in ctor, avoid int-to-bool warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-15 16:16:38 +00:00
Paul Cornett
4871ad7667 avoid unused variable warning with wxUSE_VALIDATORS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-15 16:16:22 +00:00
Paul Cornett
af96d25d25 use gtk_window_set_opacity() in SetTransparent() when GTK >= 2.12
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-15 16:07:44 +00:00
Paul Cornett
582d74e8cb fix wxClientDisplayRect() when wxUSE_DISPLAY==0
GDK_WINDOWING_X11 was not getting defined, causing hard coded size to be used


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-15 15:46:47 +00:00
Robin Dunn
ff2d1b6dbe Add the CellHighlight getters too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-14 03:24:49 +00:00
Robin Dunn
059be74db3 Avoid possible infinite recursion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-14 03:24:39 +00:00
Robin Dunn
358a10a16a Add some missing wxGrid methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-14 03:24:27 +00:00
Robin Dunn
a6905b9ad3 Update how the docset is generated.
Use a more human-friendly name,
put the files in doxygen/out/docset instead of in html,
etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-14 03:24:13 +00:00
Vadim Zeitlin
915dc553d1 Use wxWS_EX_VALIDATE_RECURSIVELY in native Cocoa wxPreferencesEditor too.
Transfer data recursively for consistency with the generic implementation and
because this generally just makes more sense.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-13 22:07:09 +00:00
Vadim Zeitlin
081cfdc8f9 Fix crash when playing invalid sounds under wxOSX.
Sound ID 0 is not actually invalid, it is returned by
AudioServicesCreateSystemSoundID() when it fails to open the file and
currently we don't consider this to be an error. However, because we never
called AudioServicesDisposeSystemSoundID() for this sound ID, we continued to
receive the notifications from the callback registered by
AudioServicesAddSystemSoundCompletion() for it even after the corresponding
sound object was destroyed, resulting in crashes when playing it more than
once.

Fix this by keeping a separate flag indicating whether we're playing a sound
and always disposing of the sound if we are, even if ID is 0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 22:54:36 +00:00
Vadim Zeitlin
80e53ec1c2 Call wxDataViewRenderer::Validate() under OS X too.
Ensure that the custom renderers get a chance to validate (and maybe change)
the value entered by user, as previously it was completely impossible with the
native OS X implementation of wxDataViewCtrl.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 22:54:32 +00:00
Vadim Zeitlin
49a19edf63 Avoid selecting invalid tab when removing last page from wxOSX wxNotebook.
Closes #15897 (backport of r75663 from trunk).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 22:54:26 +00:00
Paul Cornett
ef0f7ba770 make validator pointer const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 15:42:32 +00:00
Vadim Zeitlin
86cd49347d Restore correct handling of wxDocument::OnCreate() error return value.
The changes of r74515 didn't quite restore the old behaviour, the document was
still not being cleaned up if its OnCreate() simply returned false and not
threw an exception.

Do add cleanup in this code branch too, just duplicating what we in case of
exception (this duplication can't be easily avoided unfortunately).

This backports changes of r75646 from trunk, see #15883.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 17:49:52 +00:00
Paul Cornett
129ed048d8 build fix for wxUSE_VALIDATORS==0 when NULL is defined to be nullptr
casting nullptr is not allowed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 16:04:36 +00:00
Paul Cornett
7d8501c892 build fix for wxUSE_VALIDATORS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 15:53:41 +00:00
Paul Cornett
df66d2a7b8 build fix for wxUSE_TOGGLEBTN==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 04:48:57 +00:00
Paul Cornett
5ab1db6a30 build fix for wxUSE_DRAG_AND_DROP==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 04:48:37 +00:00
Paul Cornett
1932822ed5 build fix for wxUSE_THREADS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 04:48:12 +00:00
Paul Cornett
6f4edd56af fix invisible multi-line wxTextCtrl selection when custom foreground/background color is used with GTK3
closes #16176


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-10 15:57:28 +00:00
Paul Cornett
4b227b8b8d fix invisible wxTextCtrl selection when custom foreground/background color is used with GTK3
closes #16176


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-09 04:41:33 +00:00
Vadim Zeitlin
9116c0fdfa Document unexpected default wxGraphicsContext interpolation quality.
In 3.0, keep wxINTERPOLATION_GOOD as the default value instead of
wxINTERPOLATION_DEFAULT for compatibility, but at least mention this and warn
about the changes in 3.1.

See #14134.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-08 21:31:32 +00:00
Vadim Zeitlin
c135b6e148 Fix mouse events after calling WarpPointer() under OS X.
See #16169.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-08 21:23:58 +00:00
Vadim Zeitlin
6a3e9a69ca Fix mismatch between GDI+ and wxGraphicsContext interpolation quality.
Use wxGDIPlusContext own method instead of using GDI+ method directly when
setting the interpolation mode in wxGDIPlusContext initialization code to
ensure that m_interpolation field matches the real interpolation mode used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 20:29:54 +00:00
Vadim Zeitlin
2ce4d9ef3e Initialize wxGraphicsContext::m_interpolation field.
This member wwas never initialized, resulting in erratic behaviour of
SetInterpolationQuality() which compared its parameter with m_interpolation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 20:29:49 +00:00
Paul Cornett
4560c70fff update comment for wxBG_STYLE_TRANSPARENT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 17:16:44 +00:00
Paul Cornett
0dc2d0246d fix transparent window example
wxBG_STYLE_TRANSPARENT can only be set before window creation.
closes #16161


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 17:15:45 +00:00
Paul Cornett
e61b4f2a8a avoid double-to-float conversion warnings in headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-05 17:13:46 +00:00
Vadim Zeitlin
7d0e6b3c8a Don't use %i format specifier for size_t values.
In 64 bit build, size_t can be 64 bits while %i expects a 32 bit value.
Fix this by just avoiding the unnecessary use of size_t, the number of entries
in the index is not going to be greater than 2^32.

Closes #16163.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-05 10:44:31 +00:00
Vadim Zeitlin
ada789fa57 Fix warning about %lu being used with an int in 32 bit wxOSX build.
NSUInteger is unsigned long in 64 bit builds, but unsigned int in 32 bits, so
case it to long explicitly to avoid warnings about using it with %lu format
specifier.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-05 10:44:27 +00:00
Paul Cornett
4da2b51526 avoid preprocessor directives inside macro invocation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 16:55:28 +00:00
Paul Cornett
09419dbd52 assertion messages don't need to be translated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 16:00:03 +00:00
Paul Cornett
ea613544d5 remove redundant assertion messages, wxLogError has already been called
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:56:29 +00:00
Vadim Zeitlin
de052ac604 Document wxRibbonDisplayMode enum.
See #16133.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:28:15 +00:00
Paul Cornett
13d31bf1f5 fix typo in size 2530 --> 3530
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:26:09 +00:00
Paul Cornett
96daef8a32 fix some asserts that were clearly meant to be wxFAIL_MSG
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:09:15 +00:00
Paul Cornett
535c8b1b99 fix more memory leaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 06:45:27 +00:00
Paul Cornett
39c6581f56 Improve conversion between wxPaperSize and GtkPaperSize
Eliminates many "Gtk-WARNING **: Unknown paper size", and the occasional
"GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed".
And fixes approximately one zillion memory leaks.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 06:41:53 +00:00
Julian Smart
701a428363 Removed unnecessary list renumbering
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-03 13:53:58 +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
Paul Cornett
c3c9097afa Fix invalid use of g_object_get_property()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-01 17:45:01 +00:00
Julian Smart
0f67675d40 Use style sheet when copying to the clipboard if available
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 16:46:36 +00:00
Paul Cornett
36745ddfb5 use wxDialog::ShowModal() rather than gtk_dialog_run()
so all the things wxDialog::ShowModal() does are not bypassed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 02:16:01 +00:00
Paul Cornett
0dd37e577a Prevent dialog widget from being destroyed during ShowModal()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 19:23:07 +00:00
Paul Cornett
fa10b28e50 use "new" wx-prefixed macros in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 07:07:55 +00:00
Paul Cornett
a1cb57f549 adjust size hints when decor size changes, to prevent changing a set client size during initial show
closes #15794


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 01:52:11 +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
92205c3308 Another PrepareForItem()-related fix in generic wxDataViewCtrl.
This fix is similar to the previous commit but more speculative, as we
currently don't have a bug scenario for it. Still, it seems to be wrong to
call PrepareForItem() just before GetLineStart() which undoes its effect, so
exchange the order of the calls.

See #16132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-29 16:52:59 +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