Commit Graph

58377 Commits

Author SHA1 Message Date
Vadim Zeitlin
56375f60c7 Disable TextCtrlTestCase::LongText() for non-MSW platforms.
At least under GTK SetMaxLength(), tested by this test, can't be used with
multiline text controls at all, so running it fails. Keep the test for MSW
only where SetMaxLength() works with controls of all kinds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-13 00:00:37 +00:00
Vadim Zeitlin
ba4d3d31a6 Add error handling to wxSound under wxOSX.
Don't assume that we can open any file as a sound, check for the return value
from AudioServicesCreateSystemSoundID().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 22:56:21 +00:00
Vadim Zeitlin
5276dfa416 Don't use timer inside wxSound in wxOSX/Cocoa.
The timer is only used by Carbon code, there is no need for it in Cocoa, so
don't complicate things by starting it unnecessarily.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 22:56:17 +00:00
Vadim Zeitlin
48b21dee76 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/trunk@76323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 22:56:13 +00:00
Vadim Zeitlin
719f6df326 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/trunk@76322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 22:56:10 +00:00
Paul Cornett
047b18bd65 make validator pointer const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 15:42:32 +00:00
Vadim Zeitlin
bf00e40c4b Compilation fix for MinGW in GDI+ code.
Don't use the XXXModeInvalid constants which are missing from MinGW headers
for some reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 00:11:02 +00:00
Vadim Zeitlin
72aad0d6ea Use the same wxWeakRef implementation for complete and incomplete classes.
This fixes an ODR violation which could arise if wxWeakRef<T> was seen both
when T was an incomplete (e.g. just forward-defined) class and when it was
complete. As different implementations, with different binary layouts, were
used in these two cases, this resulted in fatal run-time problems.

Fix this by always using the slightly less efficient (because storing an extra
pointer) but simpler and safe "dynamic" wxWeakRef implementation.

Also get rid of checks for the ancient compilers such as VC6 and g++ < 3.3,
they are not supported any longer.

Closes #15884.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 00:10:54 +00:00
Paul Cornett
0ed46e37fa 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/trunk@76314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 16:04:36 +00:00
Paul Cornett
c6f8d54324 build fix for wxUSE_VALIDATORS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 15:53:41 +00:00
Vadim Zeitlin
aba08ed038 Fixes to the previous Nepalese translation update.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 11:48:47 +00:00
Paul Cornett
680f50f471 build fix for wxUSE_TOGGLEBTN==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 04:48:57 +00:00
Paul Cornett
3dcb256bea build fix for wxUSE_DRAG_AND_DROP==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 04:48:37 +00:00
Paul Cornett
c1d1a5ad5e build fix for wxUSE_THREADS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-11 04:48:12 +00:00
Paul Cornett
f2e5faeb0a 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/trunk@76308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-10 15:57:28 +00:00
Paul Cornett
79b8852011 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/trunk@76307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-09 04:41:33 +00:00
Vadim Zeitlin
0eca2b6a9a Nepalese translations update from Him Prasad Gautam.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-08 21:38:16 +00:00
Vadim Zeitlin
fc014a6f19 Don't set wxINTERPOLATION_GOOD quality by default in wxGDIPlusContext.
This is inconsistent with wxOSX and also doesn't play well with the existence
of wxINTERPOLATION_DEFAULT which is different from wxINTERPOLATION_GOOD.

See #14134.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-08 21:38:09 +00:00
Stefan Csomor
8ecd1a8b95 fixes #16169
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-08 09:14:11 +00:00
Vadim Zeitlin
275bc1fe6d Remove "default" clause from enums in wxGDIPlusContext code.
This will allow the compiler to give us a warning if more elements are added
to the enum later but not added to the switch.

Also add error checking to Graphics::SetSmoothingMode() call.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 20:34:45 +00:00
Vadim Zeitlin
38de6a5231 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/trunk@76300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 20:34:41 +00:00
Vadim Zeitlin
6bdf5d357d 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/trunk@76299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 20:34:37 +00:00
Paul Cornett
06469c8dec update comment for wxBG_STYLE_TRANSPARENT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 17:16:44 +00:00
Paul Cornett
34c4b6e972 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/trunk@76295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 17:15:45 +00:00
Julian Smart
9b8b5b085d Object position calculation correction
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-07 16:23:05 +00:00
Paul Cornett
75297d8842 avoid warnings about double-to-float conversion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-06 19:33:26 +00:00
Paul Cornett
23aa1404be avoid warning about shadowed variable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-06 19:30:22 +00:00
Paul Cornett
f771a15d9e cast to proper type to avoid warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-06 19:28:50 +00:00
Paul Cornett
d86715a3a3 remove unused macro definition
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-06 19:27:58 +00:00
Paul Cornett
e003c663fd avoid warning about unreachable code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-06 19:27:31 +00:00
Paul Cornett
8b3e3e594b avoid double-to-float conversion warnings in headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-05 17:13:46 +00:00
Vadim Zeitlin
7238d2761f 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/trunk@76287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-05 10:44:54 +00:00
Vadim Zeitlin
eed86ca61a 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/trunk@76286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-05 10:44:51 +00:00
Vadim Zeitlin
337afc2471 Remove unused variables from wxRichTextListStylePage code.
This avoids warnings about them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 18:32:31 +00:00
Paul Cornett
ab9f9bc492 avoid preprocessor directives inside macro invocation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 16:55:28 +00:00
Paul Cornett
70b7d04f0b remove unused member functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 16:46:00 +00:00
Paul Cornett
9b41d18b25 remove unused macro definitions
and limit others to the configurations which use them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 16:44:30 +00:00
Paul Cornett
010e897e48 assertion messages don't need to be translated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 16:00:03 +00:00
Paul Cornett
ba962b00cb remove redundant assertion messages, wxLogError has already been called
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:56:29 +00:00
Vadim Zeitlin
4c76ae6707 Add more precise wxRibbonBar::ShowPanels() overload.
The existing overload taking bool didn't allow to specify whether the panel
should be just expanded or expanded and pinned, add a new one supporting this.

Also fix a bug with not updating the ribbon state in the old method.

Closes #16133.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:28:51 +00:00
Vadim Zeitlin
c87dd9ceb0 Turkish translation update from Hakki Dogusan.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:28:47 +00:00
Vadim Zeitlin
c65fdfb3e3 Document wxRibbonDisplayMode enum.
See #16133.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:28:42 +00:00
Paul Cornett
e83f66259e fix typo in size 2530 --> 3530
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:26:09 +00:00
Paul Cornett
87bb3c9c4f fix some asserts that were clearly meant to be wxFAIL_MSG
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 15:09:15 +00:00
Paul Cornett
8009bf50ae fix more memory leaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 06:45:27 +00:00
Paul Cornett
cfe6604d5d fix missing semicolon typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 06:36:59 +00:00
Paul Cornett
15dd9e117c Improve conversion between wxPaperSize and GtkPaperSize
by using a table to map the screwy Windows DMPAPER_* stuff, which wxWidgets stupidly uses.
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/trunk@76268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-04 06:05:23 +00:00
Julian Smart
fcec1f4e02 Removed unnecessary list renumbering
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-03 13:53:42 +00:00
Robin Dunn
8dda8dcefb working version of the trac hooks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-03 01:40:28 +00:00
Robin Dunn
5068bf7ca7 Yet another test commit. Closes #16155
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-03 01:28:54 +00:00