Commit Graph

33030 Commits

Author SHA1 Message Date
Stefan Csomor
48971280a5 make things work as advertised
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-24 20:27:19 +00:00
Stefan Csomor
3ad6684b63 fixing memory leak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-24 19:55:42 +00:00
Paul Cornett
5744fad0f9 fix GetBordersForSizer(), closes #15872
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-24 18:29:45 +00:00
Julian Smart
15d0a86eb2 Added an optimisation when the control is frozen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 21:01:46 +00:00
Paul Cornett
04ad5f5aea remove some debugging code inadvertently checked in as part of r75690
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 18:37:29 +00:00
Paul Cornett
9f09241cd0 Fix cursor inheritance and busy cursor/global cursor, closes #15801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 18:27:13 +00:00
Paul Cornett
7df4846118 use the more appropriate letter 'h' for height
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 05:54:29 +00:00
Paul Cornett
eb1f6dd806 fix a couple GTK assertions about setting negative sizes, closes #15891
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 05:47:43 +00:00
Paul Cornett
6286f9b1ef fix wxPopupTransientWindow mouse events with GTK3, also fixes wxOwnerDrawnComboBox, wxDatePickerCtrl. closes #15874
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 04:46:17 +00:00
Robin Dunn
e5b5f18c3d Add missing joystick methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-23 00:18:06 +00:00
Paul Cornett
8bfcb398df restrict fix from r75668 to GTK3 only, as it might cause flickering
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-22 04:14:46 +00:00
Paul Cornett
6d7522952a Fix best size calculation with GTK3
GTK3 reports preferred size of hidden widgets as zero.
see #15896


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 19:37:13 +00:00
Vadim Zeitlin
eba3e39426 Move deprecated wxFont ctor implementation out of line.
Blind fix to avoid strange warnings given by OS X build slave about the ctor
being deprecated when it's defined, not used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 19:32:04 +00:00
Vadim Zeitlin
69fe5785b6 Send events when toggling wxPropertyGrid nodes from keyboard.
Closes #15899.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 18:39:14 +00:00
Vadim Zeitlin
c96fc29a52 Draw the selected bitmap correctly in wxMSW buttons.
Clear the previously drawn bitmap before drawing the new one.

Closes #12550.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 18:39:09 +00:00
Vadim Zeitlin
82a774cf98 Avoid selecting invalid tab when removing last page from wxOSX wxNotebook.
Closes #15897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-21 18:39:03 +00:00
Vadim Zeitlin
e3c7cd18d6 Remove unnecessary redundant assignments.
Don't assign values consecutively to the same variable without using it in
between the assignments, this is useless.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:41 +00:00
Vadim Zeitlin
8cca19809b Remove redundant checks from conditional statements.
It is not necessary to test for the condition which is already known to be
true or false because the code is inside the if statement checking it.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:35 +00:00
Vadim Zeitlin
3637808c39 Correct wrong error handler in wxDialUpManagerMSW code.
Forgot to set the success flag to false if thread creation failed.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:29 +00:00
Vadim Zeitlin
4db74850dc Don't pass input parameter by non-const reference unnecessarily.
This is confusing.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75659 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:23 +00:00
Vadim Zeitlin
eef9b03d24 Don't pass ID to wxWindow::LoadNativeDialog() by reference.
This is completely unnecessary and confusing.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:19 +00:00
Vadim Zeitlin
d2f125aa35 Pass non-primitive types by const reference instead of value.
No real changes, just avoid the unnecessary copying and also make the
signatures more consistent by adding the apparently forgotten "&" in a couple
of places.

See #15893.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:45:08 +00:00
Vadim Zeitlin
62e17153c2 Fix exit on last TLW logic after the change of r75633.
The changes in this revision meant to prevent the closure of transient dialogs
from quitting the application (see #15880) prevented any application using AUI,
including the aui sample, from exiting as the AUI utility frames deleted
during the main frame destruction were returning false from their
IsLastBeforeExit() now.

Fix this by relaxing the check and ignoring the parent if it is already being
deleted anyhow -- in this case there is no danger of closing it accidentally.

Closes #15894.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:44:55 +00:00
Vadim Zeitlin
a81511317b Deal correctly with non-ASCII hostnames in wxGetFullHostName() in wxMSW.
Somewhat surprisingly, Windows can return a non-ASCII string from
gethostname(). It's not really clear what happens if the host name is not
representable in the current locale encoding at all, but at least make the
function work in case it is.

Closes #15875.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:44:50 +00:00
Vadim Zeitlin
ddd761f2d9 Ensure wxChoice reported width never becomes negative in wxMSW.
Don't set the pending size to (-1, valid-height) as it is always supposed to
be either fully valid or fully invalid (meaning there is no pending size
change).

Closes #15723.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-20 14:44:44 +00:00
Vadim Zeitlin
0997127e37 Work around g++ warning about comparing compatibility_iterator with NULL.
Use double negation to placate both it and MSVC, see r75445.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 19:03:28 +00:00
Vadim Zeitlin
239d77c8e4 Use wxUSE_WXDIB in preprocessor tests.
NEVER_USE_DIB is meant to be used only in conjunction with
{SOMETIMES,ALWAYS}_USE_DIB constants, use wxUSE_WXDIB elsewhere.

This is more logical and also fixes inadvertent use of NEVER_USE_DIB before it
is defined added by the changes of r75648.

See #13328.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 14:14:23 +00:00
Vadim Zeitlin
c4e312efb9 Exclude wxMSW-specific code from compilation under other platforms.
Compilation fix after r75648, see #13328.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 14:14:18 +00:00
Vadim Zeitlin
7ded29f297 Improve appearance of tools using bitmaps with alpha in wxMSW wxToolBar.
Use alpha in the combined toolbar bitmap if any of its tools has a bitmap
using alpha. This greatly improves the appearance of the automatically
generated disabled images for the tools with bitmaps using alpha.

See #15876.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:16:02 +00:00
Vadim Zeitlin
0824752236 Fix appearance of tools with alpha bitmaps in wxMSW wxToolBar.
Recent changes broke the handling of tools with alpha bitmaps as drawing them
on the global toolbar bitmap changes its underlying HBITMAP now, but the code
in wxToolBar didn't expect this.

Fix it by updating the HBITMAP used after every DrawBitmap() call, just in
case it changed (it doesn't cost anything to reset it if it did not).

Closes #15876.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:57 +00:00
Vadim Zeitlin
322fc32b82 Fix alpha channel values when using wxGCDC with wxMemoryDC in wxMSW.
Ensure that 32bpp bitmaps selected in wxMemoryDC use DIB for their internal
representation as GDI+ functions don't seem to work correctly with DDBs with
alpha channel.

Closes #13328.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:52 +00:00
Vadim Zeitlin
95b5a81c0e Use AssocQueryString() instead of manual accessing registry in wxMSW.
AssocQueryString() is more reliable and should work under all Windows
versions, including Windows 8 for which our previous implementation, reading
the values directly from the registry, had some problems.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:48 +00:00
Vadim Zeitlin
8aed772f6c 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).

Closes #15883.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:43 +00:00
Vadim Zeitlin
fe67b68d7a Focus generic spin control when its spin button is pressed.
This is consistent with the behaviour of the native control under MSW and GTK
and generally makes sense as otherwise focus could remain on a completely
unrelated control.

Closes #15885.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 13:15:38 +00:00
Vadim Zeitlin
2a14facb0f Fix setting fonts and colours for wxToggleButton with bitmaps in wxGTK.
Apply the fixes of r54138 to wxToggleButton too, the problem of #3939 was not
specific to just plain wxButtons.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 12:58:53 +00:00
Vadim Zeitlin
bdef0d8ff7 Fix possible crash in TAR header parsing code.
Check that the iterator is valid before using its value, otherwise the
validity check was useless.

Closes #15888.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-19 11:44:54 +00:00
Vadim Zeitlin
fb730c32b4 Override Do{Freeze,Thaw}() instead of {Freeze,Thaw}() in wxPropGrid code.
{Freeze,Thaw}() themselves are not virtual any more, so overriding them
doesn't really work and it is unnecessary to reimplement the reference
counting already done by the base class anyhow, so override the DoXXX()
versions instead.

Closes #15877.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 18:56:13 +00:00
Paul Cornett
726d6f006e avoid crash with GTK3 when deleting an item, closes #15786
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-17 16:50:13 +00:00
Vadim Zeitlin
55759171de Avoid automatically closing parent frame if a child dialog was closed.
This counterintuitive behaviour could happen when a dialog of a frame
returning false from its ShouldPreventAppExit() was closed: if there were no
other TLWs in the application, then the parent frame could be closed as well,
even if this clearly shouldn't happen.

See #15880.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-16 21:44:47 +00:00
Vadim Zeitlin
8ab2bad7c1 Support file associations using "show" verb under MSW too.
If we failed to find the "open" command, try the "show" one as some programs
(notable Microsoft viewers for Office file formats) only define the latter but
not the former.

Closes #15821.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-12 14:13:24 +00:00
Vadim Zeitlin
d66e7af9aa Don't use deprecated wxBOLD, wxNORMAL and similar constants.
Replace them with wxFONTWEIGHT_BOLD, wxFONTSTYLE_NORMAL or wxFONTWEIGHT_NORMAL
and equivalents in the code of the library itself and in the samples.

Also simplify font construction using wxFontInfo where possible to avoid
specifying these constants at all if they are not needed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 14:25:30 +00:00
Vadim Zeitlin
e484333926 wxBitmap with cleared alpha channel doesn't keep its alpha flag any more.
Explicitly reset wxBitmap alpha flag after clearing its alpha channel to
ensure that we don't treat it as having alpha after going to all the trouble
of ensuring that it doesn't/

See #14403.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 14:24:35 +00:00
Vadim Zeitlin
60a3e0cc54 Rename wxLANGUAGE_CAMBODIAN to wxLANGUAGE_KHMER.
Keep the old name for compatibility.

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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 02:52:17 +00:00
Jouk Jansen
c43600bbbe Fix compilation on OpenVMS id the logical CONFIG is defined
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-08 15:56:43 +00:00
Vadim Zeitlin
98601f5646 Fix check for the item being checked when appending it under wxMSW.
The changes of r75448 were wrong, we can't ask Windows for the item state
before attaching it to the menu, so just check the internal flag here.

See ##15748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:54:51 +00:00
Vadim Zeitlin
44f26d6f82 Fix handling of bitmaps with alpha channel in wxMSW wxImageList.
Don't use mask and alpha together, this results in visual artefacts and masks
are unnecessary with RGBA bitmaps anyhow.

The only potentially problematic remaining case is mixing bitmaps with alpha
and mask inside the same image list (as we need to indicate whether we use the
mask or not when creating it), but this should probably be rare and in the
meanwhile we can at least RGBA bitmaps with image lists, which includes doing
this implicitly when they are used as button bitmaps.

Also refactor wxBitmap code to extract part of CopyFromIconOrCursor() to allow
reusing it in the newly added MSWUpdateAlpha().

See #11476.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75567 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:13:20 +00:00
Vadim Zeitlin
739ccedee7 Fix alpha after drawing a bitmap with alpha on a purely RGB bitmap in wxMSW.
Previously, the area of the bitmap outside of the rectangle covered by the
bitmap being drawn became completely transparent, "losing" the original bitmap
contents. This was due to some pixels of the bitmap having non-0 alpha value
after AlphaBlend() call, as it updates both the colours and alpha of the
destination. As there doesn't seem to be any way to prevent it from doing
this, just reset alpha back to 0 after calling it to avoid the problem.

Closes #14403.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:13:14 +00:00
Vadim Zeitlin
bd30752410 Just deprecate but don't schedule for removal wxNORMAL and friends.
Deprecate the use of the old untyped constants but don't schedule them from
removal in a future wx version by removing "#if WXWIN_COMPATIBILITY_3_0" tests
around their definition and use. Provoking deprecation warnings in the code
using these constants is worth it as they are unclear and it's easy to make
mistakes when using them, but breaking this code compilation outright can't be
justified -- even in the future.

Also use more informational wxDEPRECATED_MSG() instead of a simple
wxDEPRECATED() as it might not be obvious at all how should the code be
updated exactly.

Finally, avoid the use of deprecated constants inside the library itself.

As a side effect, this closes #15814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-06 12:42:37 +00:00
Vadim Zeitlin
c2a117f4d1 Fix mouse wheel event coordinates in wxFrame in wxMSW.
The screen to client conversion for this event coordinates took the toolbar
height into account twice, resulting in a wrong value if the event was handled
in a frame that did have a toolbar.

Closes #15812.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 21:11:12 +00:00
Vadim Zeitlin
353f1c5491 Deprecate wxPropertyGrid::DoubleToString().
Simply use wxNumberFormatter instead, this reduces code duplication and avoids
bugs due to formatting inconsistencies in DoubleToString().

Closes #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 21:10:58 +00:00
Vadim Zeitlin
419480cf22 Fix several problems with number formatting in wxNumberFormatter.
We shouldn't add thousands separators nor remove trailing zeros for the
numbers in scientific format.

Also avoid "-0" as output.

See #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 21:10:52 +00:00
Vadim Zeitlin
001fb266b6 Simplify and fix column determination code in wxGridStringTable.
The number of columns in the table is now (since r60717) stored in m_numCols,
so there is no need to get it from wxGrid any more. This is not only simpler
and faster but also more correct as the first row might not have the full
number of values yet.

Closes #15809.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 13:55:49 +00:00
Vadim Zeitlin
26c040dfc6 Fix another wxDOT deprecation warning, this time in wxGTK build.
Use wxPENSTYLE_DOT instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 22:50:10 +00:00
Vadim Zeitlin
a49d3f4161 Fix tons of warnings in wxMSW after deprecating wxPen/wxBrush int styles &c.
Replacement of FUTURE_WXWIN_COMPATIBILITY_3_0 with WXWIN_COMPATIBILITY_3_0 in
r75532 resulted in tons of warnings as all code using wxSOLID and similar
constants now uses the deprecated methods taking int instead of the preferred
ones taking wx{Pen,Brush}Style (and similarly for wxFont{Style,Weight,Family}).

Fix all of them but this also would seem to mean that this change might not be
such a good idea at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 22:20:36 +00:00
Vadim Zeitlin
6870e04cef Revert "Hack wxMSW wxNotebook to show the text controls correctly initially."
This hack resulted in showing a black rectangle corresponding to the initial
size of the first notebook page when creating the notebook, as could be seen
in the notebook sample by pressing Alt+2,Alt+1 to recreate the notebook after
the startup.

If the bug that this hack was supposed to fix hasn't been fixed yet (and it
might have been by r73126, but it's hard to be sure as we don't have any test
case for that bug), we could reintroduce this call to Update() but only if
we're not inside a deferred resize (i.e. m_hDWP != 0) as it just can't work
correctly in this case.

This reverts r69793.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 21:58:59 +00:00
Vadim Zeitlin
010f3b466f Remove unnecessary ::SetWindowLong() call in wxMSW wxNotebook code.
There is no point in manually resetting WS_VISIBLE style before calling
wxWindow::Show(false) which does it too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 21:58:56 +00:00
Vadim Zeitlin
8920e96933 Reset sorting column index in generic wxDataViewCtrl when clearing columns.
Otherwise we could continue to use the now invalid index for sorting.

Closes #15803.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 21:58:41 +00:00
Paul Cornett
967a94c91a remove WXWIN_COMPATIBILITY_2_6, add WXWIN_COMPATIBILITY_3_0
closes #15792

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 20:07:33 +00:00
Vadim Zeitlin
7b7f3b0132 Revert "Don't intercept accelerators in wxTextValidator in wxGTK."
Testing for absence of Alt modifier is wrong as it could be specified for the
events generated by AltGr-letter key combinations (AltGr is Alt+Ctrl), so this
commit broke the validation of any such symbols entered from non-US keyboard.

This is worse than the problem it was trying to fix, so revert this for now.
The real fix will need to ensure that the mnemonics are checked first, i.e.
before generating EVT_CHAR, in wxGTK, just as it already happens in wxMSW.

This reverts r75453.

See #15777.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:34:05 +00:00
Vadim Zeitlin
c407f6e2bd Don't keep using the old wxBitmap data after modifying it directly in wxGTK.
Drawing on a wxBitmap via wxMemoryDC modified its pixmap representation in
wxGTK and even if its pixbuf representation was later changed using direct
access to the bitmap pixels, the out of date pixmap continued to be used,
creating the illusion of direct access being completely ignored.

Fix this by purging the old pixmap representation when locking the bitmap for
raw access.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-03 01:06:45 +00:00
Vadim Zeitlin
b498554460 No real changes, just fix some typos in the comments.
Fix spelling in a couple of comments.

Closes #15790.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:43 +00:00
Vadim Zeitlin
0a76afbe9c Use wxScopedArray instead of raw new[]/delete[] and fix memory leak.
Don't leak memory in case of error when reading from the stream in BMP loading
code.

Closes #15789.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:37 +00:00
Vadim Zeitlin
5cd81ca598 Allow initializing wxScopedArray more conveniently.
Typical wxScopedArray initialization uses "new T[n]" expression, allow to omit
most of it and specify just n, the number of elements to allocate.

Use the new shorter form in the places where wxScopedArray(new ...) was used
(which is in almost all of them)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-31 14:03:34 +00:00
Paul Cornett
dd4291f962 fix memory leak, closes #15785
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 19:14:24 +00:00
Stefan Csomor
87eb540094 moving special characters handling for EVT_CHAR into SetupKeyEvent, fixes #15784
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 11:49:40 +00:00
Stefan Csomor
45bb71b485 routing to common code, see #15784
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 10:39:12 +00:00
Stefan Csomor
26f22d609f copy over all modifiers for single char events, fixes shift-tabs for single line controls, see #15784
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 09:04:13 +00:00
Vadim Zeitlin
b72899d142 Don't intercept accelerators in wxTextValidator in wxGTK.
Key events with modifiers shouldn't be filtered by the validator as they are
used as accelerators and not for the text entry at all.

Closes #15777.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:19:17 +00:00
Vadim Zeitlin
cb20b3453e Simplify wxTextValidator EVT_CHAR handler.
Ignore the event by default to reduce the number of event.Skip() calls.

No changes in the code behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75452 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:19:15 +00:00
Vadim Zeitlin
aff918ab1d Handle Unicode keys correctly in wxTextValidator.
Don't allow entering arbitrary Unicode keys in wxTextValidator limited to
digits only, for example.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:19:12 +00:00
Vadim Zeitlin
a425e9f70d Make wxTextValidator validation error messages more informative.
Saying that "something is invalid" really doesn't help much at all, so try to
be at least a bit more informative.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:47 +00:00
Vadim Zeitlin
39edfa27a2 Make wxFILTER_INCLUDE_LIST in wxTextValidator actually usable.
Only check for its violation once the full text is entered as otherwise
nothing could ever be entered when it was used.

Closes #15778.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:43 +00:00
Vadim Zeitlin
2d3a1aab74 Fix handling of menu items checked before being attached in wxMSW.
Calling wxMenuItem::Check() before appending the item to a menu didn't have
any effect, fix this by checking the item state when actually attaching it.

Closes #15748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:38 +00:00
Vadim Zeitlin
32dc4cc8db Avoid crashes when deleting owned top level windows.
Don't delay the TLW destruction if it has a parent and its parent is already
being deleted: we can't delay the inevitable in this case and only succeed in
making the program crash if we try.

Closes #15743.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:33 +00:00
Vadim Zeitlin
9955f6fd86 Prevent wxGrid rows/columns from becoming too small on double click.
The minimal size wasn't respected when auto-sizing rows/columns in
Set{Row,Col}Size() which was called in response to double clicking the
separator line, which resulted in clearly wrong behaviour as the user was
prevented from resizing the row/column to a smaller size by dragging them but
not by double clicking, so fix this to respect the minimal size as well.

Closes #15627.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:28 +00:00
Vadim Zeitlin
c3d1d22f66 Fix harmless MSVC warning.
Avoid "converting value to bool" warning introduced by r75310.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 00:01:25 +00:00
Vadim Zeitlin
c0984e8382 Update the generated file after gen_iface.py change.
Regenerate the file to use the symbolic constants instead of the raw values.

See #15783.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 22:20:30 +00:00
Vadim Zeitlin
3d5f3bcac7 Use symbolic constants names in the generated wxSTC files.
Update the script generating stc.cpp to put the symbolic constants names and
not their raw numeric values into the generated code. This makes it much
easier to read and understand.

Closes #15783.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 22:20:25 +00:00
Vadim Zeitlin
11d0e0f943 Make raw pixel access work even with DDBs under MSW.
This is inefficient, because we need to copy pixels to and from them, but
better than silently doing nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-28 15:11:34 +00:00
Vadim Zeitlin
d75c0a8cc7 Add wxNumberEntryDialog default ctor and Create().
Allow creating wxNumberEntryDialog in 2 steps, as most of the other classes.

Closes #15769.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 22:26:38 +00:00
Stefan Csomor
b0a5f5ac18 - one single method for sending char events from a NSString
- adding insertText override for multiline fields as char events went missing after r74945

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 14:59:50 +00:00
Vadim Zeitlin
b69da09293 Add wxPasswordEntryDialog default ctor and Create().
Allow creating wxPasswordEntryDialog in 2 steps, as most of the other classes.

Closes #15770.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-21 12:23:59 +00:00
Stefan Csomor
947a8734ac reverting r74098, applying John's version, see #15008, #15765, #13841 will be backported if no regressions are discovered
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-20 16:03:13 +00:00
Vadim Zeitlin
0cf0dfae6b Don't crash in wxAuiToolBar::GetToolBarFits().
The code could crash if m_overflowVisible was true but m_overflowSizerItem was
NULL. Ideally this shouldn't happen in the first place, but it did, so at
least fix the crash for now -- and hopefully this code will be refactored to
make it more clear later.

Closes #15747.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:18:57 +00:00
Vadim Zeitlin
fba8b37345 Add wxHtmlWindow::SetDefaultHTMLCursor().
This allows to change the cursors used by any HTML windows, before creating
them.

Closes #15324.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:43 +00:00
Vadim Zeitlin
19df537ca1 Treat empty variants as null ones in wxMSW OLE code.
Simply ignoring VT_EMPTY variants doesn't make any sense and can result in
completely unexpected results, so don't do it.

Closes #15757.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:33 +00:00
Vadim Zeitlin
8f305123db Add default ctor and Create() to wxContextHelpButton.
Allow two step creation of wxContextHelpButton.

Closes #14848.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-18 16:00:21 +00:00
Václav Slavík
e8c5400118 wxTextFile: don't loose data with CRCRLF line endings.
Previously, when reading files with completely nonstandard - but
occurring in the wild thanks to broken Notepad - files with CRCRLF, all
content would be replaced with empty lines.

Fix the code to do what many editors do with such files: treat this as
data line followed by an empty one. This is not ideal, but it is better
than discarding data - and arguably, silently cleaning up the endings
wouldn't be great either (and would add extra complications for what is
an obscure and broken case).

See http://stackoverflow.com/questions/6998506/text-file-with-0d-0d-0a-line-breaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 18:54:42 +00:00
Václav Slavík
15fe4acb3e Support keyboard navigation with Tab in generic wxDataViewCtrl.
Move keyboard focus between columns with Tab and Shift-Tab. Works
similarly to left and right arrows, but wraps around to go to the next
or previous line and doesn't collapse tree nodes.

If focus reaches the last or first cell, the key event is skipped,
allowing normal Tab handling for moving to another control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 16:36:05 +00:00
Jouk Jansen
132a0aaacd Update OpenVMS compile support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 11:12:41 +00:00
Paul Cornett
4451faa095 just put GtkBorder variable on the stack
fixes missing runtime version check


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-15 02:04:41 +00:00
Paul Cornett
286727db5b fix missing/incorrect GTK runtime version checks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-15 01:29:56 +00:00
Julian Smart
6adf2efa20 Ensure a small spanned column doesn't shrink its columns too much by checking for min column sizes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-14 15:32:58 +00:00
Julian Smart
2b77f9b88c Fix for occasionally missing cells in tables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-11 12:05:57 +00:00
Julian Smart
87ba46f05e Added scrollbar hysteresis detection to stop infinite looping when vertical scrollbar presence or absence affects the content height.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-10 15:24:35 +00:00
Stefan Csomor
79ec1e6c30 trying 10.5 / 10.6 fix for #15688
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-09 21:09:34 +00:00
Julian Smart
2d8b8e1725 Fixed overlapping text and floating objects by simplifying the available rectangle calculation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-08 10:30:28 +00:00
Julian Smart
548eb1850c Clicking on a floating (non-container) object no longer sets the caret position.
Double-clicking on a floating (non-container) object selects it instead of selecting a word.
Selection refresh now takes floating objects into account.
The last line of a paragraph now takes floating objects into account.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-07 15:50:38 +00:00
Julian Smart
69b8b92a42 Fix layout of content within a floating object by using Move and not SetPosition; prevent creeping of floating objects on layout.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-05 19:56:24 +00:00
Stefan Csomor
a9c26905e8 support 10.5 SDK build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-05 09:13:00 +00:00
Václav Slavík
04121a371a wxOSX Retina fixes: wxImageList::GetSize().
wxImageList returns size of its bitmap as pixel size, i.e.  twice the
displayed screen on HiDPI screens.  Unfortunately,
wxImageList::GetSize() is used heavily in (generic) GUI drawing code,
e.g.  to properly size wxListCtrl's icon columns.  As wxImageList is
used primarily by controls, it seems reasonable to adjust for scaling
here, rather than requiring all users of the class to do it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-04 14:33:10 +00:00
Václav Slavík
b5e7f21065 wxOSX Retina fixes: size wxStaticBitmap and wxBitmapButton properly.
The size is expressed in logical coordinates and needs to use bitmap's
scaled size, otherwise it would appear twice as large in both
dimensions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-04 14:33:07 +00:00
Václav Slavík
4156e1a5c9 Auto grow the last wxDataViewCtrl column on all platforms.
The GTK+ implementation always did this and it doesn't make much sense
to let the space be wasted, so do as GTK+ does: expand the last column
to cover the remaining unused space in the OS X and generic
implementations too.  Don't do anything if the space is insufficient.
Respect the last column's minimal width.

See #13904.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-04 13:23:34 +00:00
Václav Slavík
88774498d7 Fix fixed-width progress columns in generic wxDataViewCtrl.
Both native wxDVC implementations grow the progress column, the generic
one didn't.  This change fixes it and _seems_ not to break other things.
As a consequence, progress columns no longer have a 40px minimal width,
but that should be OK.

Fixes #15745.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-04 12:36:24 +00:00
Julian Smart
bdfd48b69e Applied patch #15744: wxRichTextCtrl: HitTest can't find top-level floats (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-03 18:41:09 +00:00
Vadim Zeitlin
0eae308634 Fix crash when Destroy()-ing a TLW with a non-TLW parent.
Generalize the code in wxTopLevelWindowBase dtor checking for the children of
the TLW being destroyed pending for deletion themselves to work when the child
TLW is an indirect child, i.e. was created with a child window of this TLW as
parent and not this TLW itself.

Closes #15743.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-03 14:53:56 +00:00
Václav Slavík
065deffd86 Implement wxTextEntry::SetHint() natively for GTK+3.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 17:46:27 +00:00
Václav Slavík
59efb1cf1c Don't use native cue banners in wxTextEntry::SetHint() on XP.
The code apparently expected EM_SETCUEBANNER to return false on
pre-Vista systems (where the cue banners don't work).  This isn't the
case in practice, so check for Vista explicitly and use the generic
implementation on XP.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 17:46:23 +00:00
Vadim Zeitlin
fe731cbdee Use correct cell alignment in generic wxDataViewCtrl mouse handling code.
Don't fall back to wxALIGN_CENTRE, even if the renderer doesn't specify its
own alignment we still have to take the column alignment in consideration, so
use GetEffectiveAlignment() (which had to be made public for this).

This notably fixes (again) hit testing for wxDataViewToggleRenderer in the
generic version.

Closes #15731.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 16:30:25 +00:00
Vadim Zeitlin
65daec7eaa Check if colour really changed in wxGenericListCtrl::SetBackgroundColour().
Call the base class version to update the colour stored in the base class and
also to avoid changing the colour of the main window unnecessarily if the
colour didn't really change.

This is also consistent with the code in SetForegroundColour() just below.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 12:58:23 +00:00
Vadim Zeitlin
4968945556 Don't change header window foreground colour in wxGenericListCtrl.
As calling wxGenericListCtrl::SetBackgroundColour() doesn't change the header
window background, don't change its foreground in SetForegroundColour()
neither.

Closes #15741.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 12:58:17 +00:00
Julian Smart
b815c1b44d Fixed #15717: wxRichTextStyleOrganiserDialog returns wxID_OK when closed with Escape key (ikamakj)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 10:38:04 +00:00
Julian Smart
ac60e751a4 Apply fix for #15734: wxRichTextCtrl: A floating wxRichTextTable's cells aren't drawn (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 09:06:00 +00:00
Stefan Csomor
1975bb6865 support for localized help menus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-01 20:10:58 +00:00
Julian Smart
9596db7c4b Partial fix for #15714: Caret jumping problem in wxRichTextCtrl text selection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 16:50:49 +00:00
Julian Smart
dbd7b25f42 Fix for #15716: wxRichTextCompositeObject::Dump() should also dump the object itself?
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 16:29:44 +00:00
Julian Smart
e8cb6aa322 Fix for #15718: wxSymbolPickerDialog crashes on ampersand character
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 16:24:07 +00:00
Julian Smart
31e52f61d0 Fix for #15715: NULL check required in wxRichTextBuffer::SetStyleSheetAndNotify()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 16:23:11 +00:00
Vadim Zeitlin
97f58c1603 Fix wxCommandProcessor::IsDirty() for unsaved unmodified case.
IsDirty() still returned true even after undoing all the commands which was
wrong, as there was nothing to save in this case.

Closes #15722.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 13:47:00 +00:00
Vadim Zeitlin
c749d9e638 Fix unwanted focus events when deleting a wxTreeCtrl item in wxMSW.
Disable setting focus in response to TVN_SELCHANGING when deleting an item in
a single selection control too -- this was already done in multi selection
case but not in this one, for some reason.

Also refactor the code to avoid duplicating TreeView_DeleteItem() calls.

Closes #15721.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-28 12:43:17 +00:00
Václav Slavík
892ee04344 Fix OS X startup to not hang if the application doesn't get focus.
If the application launches while the parent process doesn't have an active
window, [NSApp run] won't terminate immediately, as was assumed here. Instead,
it blocks until some input arrives, e.g. clicking the Dock icon.

Work around this by adding a dummy event to the queue.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-27 15:34:19 +00:00
Vadim Zeitlin
be61f84af5 Yet another fix after wxMenu::Remove() refactoring.
wxMenu::Remove() was still broken in wxMSW after r75250, even with the fix in
r75290, as wxMSW code relied on the item still being present in
wxMenu::m_items.

Delay removing it from there until after DoRemove() call to fix this.

See #3424.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-26 14:50:55 +00:00
Stefan Csomor
23f92cc755 fixing shadowed var
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-26 14:18:43 +00:00
Stefan Csomor
7957dc7b2f correct behavior in case it is still used with ShowModal
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-26 12:53:13 +00:00
Vadim Zeitlin
e3f89fae8d Fix menu item destruction broken by r75250.
The menu items were not removed from the menu any longer when they were
deleted or destroyed after the changes in this revision.

Fix this by calling the public Remove(), which does the right thing, instead
of the private DoRemove(), which only does part of the job of removing the
item, in DoDelete() and DoDestroy().

See #3424.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-25 13:57:20 +00:00
Stefan Csomor
16cc627332 making sure no pending deletes get executed while a modal loop is running, avoiding double deletes because the dialogs are mostly allocated on the stack.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-25 13:51:12 +00:00
Vadim Zeitlin
f155a9f376 Fix multiple calls to wxSocket::Initialize() in wxMSW.
Subsequent calls didn't initialize the hidden window correctly because
wxSocket::Shutdown() unregistered the window class used for it, but
wxSocket::Initialize() still kept a pointer to the previously registered class
name.

Don't remember it any longer, unlike in the other cases where we use
wxCreateHiddenWindow(), this function is only ever going to be called once
until the class is unregistered anyhow, so it doesn't have to be static.

Closes #15701.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-25 13:40:11 +00:00
Paul Cornett
2203c7e436 avoid deprecated gtk_style_context_get_font(), closes #15697
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-24 18:07:20 +00:00
Václav Slavík
51b92b2084 Recognize Windows 8 and 8.1 in wxGetOsDescription().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-23 15:10:02 +00:00
Václav Slavík
f2aeb35d0c Differentiate between WXK_UP etc. and WXK_NUMPAD_ variants in NSMenuItem code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-23 15:09:55 +00:00
Václav Slavík
6814e0ea4b Don't add NSFunctionKeyMask to NSMenuItem modifiers.
This code probably misunderstood NSEvent documentation, where this mask is
mentioned, but setKeyEquivalentModifierMask: documentation doesn't list it as
allowed. More importantly, it causes "fn" to appear in the menu item and the
accelerator doesn't work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-23 15:09:51 +00:00
Václav Slavík
bae200a453 Fix selection behavior on right-click in wxGTK wxDataViewCtrl.
Select the item under the cursor even when right-clicking it, because
it's expected behavior (Nautilus does it too).

Fixes #13531.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-23 10:56:09 +00:00
Václav Slavík
210a35e384 Allow NULL model in wxGTK's wxDataViewCtrl.
This is consistent with other ports.

Fixes #14616.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-23 10:56:03 +00:00
Vadim Zeitlin
f269f868d7 Add XRC handler for wxAuiToolBar.
Also add the demonstration of AUI handlers (this one and the existing one for
wxAuiNotebook) to the xrc sample.

See #15686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-23 00:34:55 +00:00
Vadim Zeitlin
7439c0951b Initialize wxAuiNotebookXmlHandler::m_isInside in ctor.
Closes #15694.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-23 00:33:39 +00:00
Julian Smart
7990c85a92 Improved equality test to ignore invalid attributes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-21 20:54:16 +00:00
Julian Smart
8e3bbb68f0 Corrected bugs with text effects comparison and style removal
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-21 15:25:37 +00:00
Václav Slavík
429085a3e7 Override ClearColumns() in wxDataViewListCtrl.
Without this, the associated store's columns would be out of sync,
causing asserts next time a column is appended.

Fixes #14952.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-21 13:13:11 +00:00
Vadim Zeitlin
de54520c95 Don't process events handled in user code in generic scrolling code.
Undo the change introduced, probably accidentally, by r11369 (12 years ago)
and skip the default handling of all events except wxEVT_SIZE and wxEVT_PAINT,
which are special for the reasons explained in the comments in the code, if
the user code has already handled the event.

This allows to customize scrolling by selectively handling some scrolling
events only and generally makes sense.

Closes #15684.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-20 16:04:12 +00:00
Vadim Zeitlin
89ef594505 Fix wxRegion::Offset() copy on write behaviour in wxMSW.
Offset the correct, new and unshared, region handle instead of the old and
possibly shared one.

Closes #15690.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-20 12:01:31 +00:00
Vadim Zeitlin
214aebee08 Fix assert message when removing non-existent items from wxMenu.
The assert complained about a bug in wxMenu code itself, but actually could be
triggered by simply trying to remove a non-existent item from the menu.

Fix this by checking for the item existence, and also removing it from the
internal menu data structure, in wxMenuBase::Remove() and only dealing with
the item itself in DoRemove().

Closes #3424.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-20 12:01:20 +00:00
Vadim Zeitlin
fea2689d5c Fix swapping items client data in wxEditableListBox.
Use wxUIntPtr, not long, and SetItemPtrData() instead of SetItemData(), to
ensure that we preserve the values of client data pointers in 64 bit build,
otherwise they were truncated to 32 bits.

Closes #15687.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-19 14:15:27 +00:00
Vadim Zeitlin
7a71061eb7 Fix replacing "Window" menu in wxMDIParentFrame in wxMSW.
When setting a new "Window" menu (as opposed to just modifying the existing
one which did work correctly), we shouldn't show it immediately in the menu
bar if there are no MDI children, this results in wrong UI and assert
failures.

Closes #15663.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-18 14:19:49 +00:00
Vadim Zeitlin
fec6f3bea1 Fix problem with inserting menus in wxMDIParentFrame menu bar.
Account for the "Window" menu (and any other foreign windows lurking in our
menu bar) correctly in wxMenuBar::Insert() instead of the old code which
apparently tried to do something similar but didn't make much sense and didn't
work when trying to insert the menu at the position actually occupied by the
"Window" menu in the menu bar.

Closes #15662, #1732.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-18 14:19:40 +00:00
Julian Smart
622f1081b8 Use % instead of percent in Size dialog; controls more legible on wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-18 11:14:09 +00:00
Julian Smart
e1822d09db Fixed refresh bug in border preview control when resizing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-18 07:49:07 +00:00
Julian Smart
89392699d7 Applied #15681: wxRichTextCtrl: Crash when deleting a wxRichTextTable row or column (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-17 21:50:31 +00:00
Václav Slavík
ff7f9c2def Put Services submenu into the Apple menu on OS X.
Native applications have a Services submenu in the apple menu.  wx
applications didn't until now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-17 18:03:05 +00:00
Václav Slavík
bb290e285f Fix i18n-unfriendly About menu code in wxOSX.
The code didn't follow the golden rule of localization and broke
user-visible string into separately translated substrings.  Replace with
the same _("About %s") string already used in wxAboutDialog.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-17 18:02:59 +00:00
Václav Slavík
d41e3a3739 Don't duplicate code for Apple menu creation.
Have just one copy of the code, instead of two. Eliminate differences
between the two versions. As a result, applications now properly have
preferences and about items even if window-less.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-17 18:02:56 +00:00
Julian Smart
c6de30bf70 Removed GetId/GetId and changed span storage to be compatible with 3.0. Fixed border control style.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-17 12:43:58 +00:00
Vadim Zeitlin
9c4f2cd1ca Don't eat TAB presses for wxComboBox with wxTE_PROCESS_ENTER in wxMSW.
Still allow to use TAB for navigation even when a wxComboBox has
wxTE_PROCESS_ENTER style.

Use the same hack for wxTextCtrl, i.e. implement the navigation ourselves as
we can't let IsDialogMessage() handle it but still get VK_ENTER key presses.

Closes #12808.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-16 23:37:54 +00:00
Vadim Zeitlin
d466d76701 Allow changing the colour of wxInfoBarGeneric text.
Override SetForegroundColour() to forward it to the text control.

See #15671.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-16 23:37:43 +00:00
Vadim Zeitlin
94e3516305 Set wxInfoBarGeneric text colour correctly.
For some reason SetOwnForegroundColour() was used, but we really need to set
the colour of the child text control and not our own colour here (which is not
used for anything).

This makes the text visible even when using non default tooltip colours, which
could previously result in black-on-black text.

See #15671.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-16 23:37:38 +00:00
Vadim Zeitlin
b6c6bceb94 Fix wxSocket::WaitForAccept() in worker thread.
This was broken because Select() never returned wxSOCKET_CONNECTION_FLAG which
is supposed to be set when a connection is accepted.

Closes #15669.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-16 23:37:28 +00:00
Stefan Csomor
a74dfdb74d fixing non-unicode compile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-16 07:11:35 +00:00
Václav Slavík
8958ad22cd Don't crash in wxWindowMac::OSXSimulateFocusEvents().
The code didn't properly account for the possibility of wxEVT_KILL_FOCUS
handler deleting the focused window (as happens e.g. in wxListCtrl inline edit
controls). E.g. rapidly clicking wxEditableListBox buttons could trigger a
crash here when sending wxEVT_SET_FOCUS to an already-deleted window.

Use wxWeakRef<> to check if the window is still alive.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-15 18:25:29 +00:00
Paul Cornett
70bb02115f Simplify mode matching test, and add actual mode (not function parameter) to modes list, in GetModes()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-15 17:28:42 +00:00
Vadim Zeitlin
3e8b0d8144 Fix blank wxComboBox appearance broken by the changes of r75134.
We didn't repaint the owner drawn combobox items any more because they were
not found by MSWFindItem().

Fix this by restricting the check to the real windows with the same ID as the
combobox, not the dropdown items which are not windows at all.

See #15674.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-15 15:26:21 +00:00
Vadim Zeitlin
482a131352 Don't eat mouse wheel events if we can't handle them in wxGTK.
The recent changes to mouse wheel scrolling broke it for the generic
wxListCtrl and probably any other situation in which scrollbars don't scroll
the window itself but some subwindow of it. In this case, the scroll wheel
event handler doesn't have any scrollbar to adjust, so it simply does nothing
and shouldn't return true, as it did since r74911.

Just return false in case we are not doing anything to let the mouse wheel
work as before.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-15 13:33:37 +00:00
Paul Cornett
24321b7b18 Introduce variables for the display and screen in the video mode functions.
This cleans up the code somewhat, and prepares for some upcoming changes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-15 06:16:59 +00:00
Václav Slavík
a4e7bf1e89 Cancel editing in generic wxDVC when clicking outside of the editor control.
wxDataViewCtrl should behave as Explorer does on Windows: when an inline
editor control is open, clicking outside of it should close the editor
(preserving changes) in most cases - as a rule of thumb, when the
subsequent action could interfere with the editor somehow.

This was implemented by watching for focus change and so ignored clicks
made on non-focusable controls outside of wxDVC's main window area.  In
particular, clicks on the list's header were ignored, even though they
could result in modifications of the editor's position or size.

Don't finish editing when the user right-clicks on the header,
consistently with Explorer.  Opening the menu likewise still doesn't
finish editing, it is needed for access to editing operations.

Fixes #15152.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-14 12:13:31 +00:00
Václav Slavík
e6b21147db Grow text editor control to contain all text in generic wxDataViewCtrl.
Implement the behavior that Explorer uses: if the column is too narrow
to fit the current text of a cell into it, don't create a too-small text
control for it, because it is annoying and confusing (typically, the
beginning of the text would be hidden, which is disastrous if it happens
to contain numbers). Instead, grow the text control to be larger than
the column for more comfortable editing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-14 12:13:28 +00:00
Paul Cornett
0082512adf build fix for GTK+ 3.10, closes #15667
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-13 18:03:48 +00:00
Vadim Zeitlin
a7ec1d1cdf Fix crash when setting invalid label with "&" at the end.
We detected that the label was invalid and gave a debug warning message about
it but then still proceeded to crash by accessing the data beyond the end of
the string. Don't do this.

Closes #15665.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-13 12:53:10 +00:00
Vadim Zeitlin
9b31387508 Merge the changes from 3.0 branch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-12 18:06:37 +00:00
Paul Cornett
e4d0bc4bb1 don't need Pango workaround code with GTK+3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-10 18:35:47 +00:00
Paul Cornett
16ec076753 use gtk_combo_box_get_wrap_width(), we require GTK+ 2.6 now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-10 18:26:23 +00:00
Paul Cornett
e9d1a6f393 fully initialize GTypeInfo structure
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-10 18:26:05 +00:00
Paul Cornett
54e89f14bb use G_VALUE_INIT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-10 18:13:27 +00:00
Paul Cornett
ea566e2ed0 avoid NULL casts, clang says casting nullptr_t is not allowed
closes #15660


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-10 17:26:37 +00:00
Julian Smart
afff80287b Corrected and tidied XML import/export of standard data members
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-10 15:56:37 +00:00
Vadim Zeitlin
42f3e38799 Fix positioning of radio buttons inside wxOSX radio boxes in some cases.
If the previous radio box size was too small (notably (0,0) as it happened
during AUI relayout), the buttons were positioned without taking the box
margins into account, resulting in visually broken display.

Recompute the full size after setting the new size but before positioning the
buttons in wxRadioBox::DoSetSize() to avoid this.

Closes #14087.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-09 18:46:04 +00:00
Stefan Csomor
dcdee4ec5e fixes #15613
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-08 20:26:32 +00:00
Julian Smart
210fbe0ba9 Fixed border colour parsing typo.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-07 12:49:10 +00:00
Julian Smart
320ad25b71 Improved multiple table cell selection, especially for empty cells.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75137 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-07 11:26:22 +00:00
Julian Smart
54a82234eb Correct the double-clicked word selection when at the end of a paragraph.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-07 11:06:22 +00:00
Julian Smart
22412b5e8f Allow the style name to be edited in the style definition editor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-06 15:08:37 +00:00
Julian Smart
c6c68635d3 Don't merge text objects if they have different identifiers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-06 12:44:21 +00:00
Julian Smart
254eb6841a Made column and row spans members so they don't interfere with app-defined properties.
Added identifier to wxRichTextObject so objects can be addressed by name.
Generalised wxRICHTEXT_CHANGE_OBJECT command so it can now apply to a paragraph as well as an object within a paragraph.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-04 15:13:41 +00:00
Julian Smart
3ee8ea054e Fixed some wxRTC dialog layout issues, and added a couple of extra text effects flags.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-03 22:28:37 +00:00
Paul Cornett
53e8ed4518 fix GCC warning "logical ‘or’ applied to non-boolean constant"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-02 16:36:16 +00:00
Paul Cornett
5b2dfdccd1 get correct best size for wxSpinButton
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-02 16:29:21 +00:00
Julian Smart
d1c8e1290b Avoid invisible text in style list
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-01 18:07:26 +00:00
Julian Smart
604d493cd6 Don't draw border if the width is zero.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-01 16:00:20 +00:00
Julian Smart
632b034940 Added corner radius to box attributes, and a control in the border properties page to edit it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-31 21:44:49 +00:00
Julian Smart
108f2cc7a7 Corrected multiple cell property editing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-31 09:57:06 +00:00
Julian Smart
4618ed5f0b Fixed print preview glitch and vertical cell alignment.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-31 09:40:30 +00:00
Julian Smart
2a7f5127e9 Fixed selection bug.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-31 06:53:55 +00:00
Julian Smart
861c549906 Tidied up some file headers and fixed tooltip status accessors.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-30 16:23:56 +00:00
Julian Smart
0937367a5d wxRTC: added spacing attribute and no-wrap behaviour for table cells.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-30 15:15:40 +00:00
Julian Smart
1a35779dcd Don't delete composite objects when defragmenting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-29 13:18:15 +00:00
Vadim Zeitlin
9337103a37 Use UTF-8 for saving wxTextCtrl contents now.
This ensures that the files created by wxTextCtrl::SaveFile() can be read back
by wxTextCtrl::LoadFile() as previously the files were saved using the current
locale encoding but read back using Latin1 (after first trying, and failing,
to read them as UTF-8).

This is a backwards incompatible change but it ensures that wxTextCtrl can
load its own files and is also consistent with the use of UTF-8 by default in
other places. Finally, and perhaps most importantly, this ensures that the
file contents can always be saved, i.e. there is no risk of conversion errors
any more.

Closes #15611.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-26 20:29:32 +00:00
Vadim Zeitlin
451e456a91 Fix special characters handling in wxSVGFileDC::DrawText().
Special XML characters need to be quoted before being saved in an SVG file
(which is also an XML file).

Closes #15602.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-25 21:23:11 +00:00
Vadim Zeitlin
26c7a01f1d Remove wxPropertyGrid colours not recognized by wxColour.
Don't use colour names which can't be used to successfully initialize
wxColour.

This is not the best solution, we probably should add these names to the
colour database instead, but for now it's better than getting errors when
trying to use these colours for colour properties in wxPropertyGrid.

See #15597.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-25 17:51:16 +00:00
Vadim Zeitlin
16ab50d25b Don't draw the segment lines in wxGtkPrinterDC::DrawArc() unless it's filled.
The segments should only be drawn if we're filling the arc, i.e. drawing a
pie, but not if we're just drawing its outline.

Add a test of this to the printing sample.

Closes #15609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-25 17:38:43 +00:00
Vadim Zeitlin
db7af3c2a7 Fix DrawArc() implementation in wxGtkPrinterDC.
It didn't count the angles correctly when they were equal to 90 degrees.

Also simplify the code by avoiding special cases for 90 degrees anyhow, just
call atan2() directly. And also avoid converting the angles to degrees just to
convert them back to radians immediately afterwards.

See #15609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-25 17:38:37 +00:00
Vadim Zeitlin
958dd805c2 Restore the check for wxTAB_TRAVERSAL in wxMSW wxWindow code.
This check was replaced with a check for WS_EX_CONTROLPARENT in r74732 to
avoid using ::IsDialogMessage() when WS_EX_CONTROLPARENT is not set, but it
also resulted in using it when WS_EX_CONTROLPARENT is set but wxTAB_TRAVERSAL
is not.

Check for both of them now so that we only use IsDialogMessage() when we need
it (wxTAB_TRAVERSAL) and when it is safe to do it (WS_EX_CONTROLPARENT).

Closes #15565.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-25 12:17:38 +00:00
Vadim Zeitlin
bdfbcbfd91 Fix passing wxCStrData to a vararg function.
This doesn't work with simple vararg functions and the real solution would be
to use WX_DEFINE_VARARG_FUNC for wxCrashReport::Output() but for now just add
a cast to make the code compile and work with minimal changes.

Closes #15598.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-25 12:17:33 +00:00
Vadim Zeitlin
8f7c658ef1 Fix wxMSW build when wxUSE_INTL==0.
Don't use wxLocaleInfo in this case as it's not defined.

Closes #15599.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-25 12:17:28 +00:00
Julian Smart
b1fbde6261 Use specified height in a text box, if there is one
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-24 07:00:59 +00:00
Julian Smart
830a43c468 Implemented editing all 4 borders at once in wxRTC borders page
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-22 18:44:29 +00:00
Julian Smart
4068836657 Added wxEVT_RICHTEXT_CONSUMING_CHARACTER event to allow interception of character events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-21 16:01:17 +00:00
Julian Smart
6539f8630e Fix selection drawing for table cells
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-21 13:12:16 +00:00
Julian Smart
ab3c08cb53 Corrected wxRTC IsDefault() implementations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-20 17:42:06 +00:00
Julian Smart
09f3defad8 Avoid crash when deleting range that includes the focus object.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-20 17:19:32 +00:00
Stefan Csomor
e39c9f5914 CoreText is always available on 10.5+, so using all this code unconditionally, committing Vadim's suggestions with two extensions, see #15580
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-19 19:27:29 +00:00
Julian Smart
736a9ccdfa Fixed some data transfer bugs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-18 19:27:06 +00:00
Vadim Zeitlin
dcc9f9c1e4 Avoid sending wxEVT_CHAR events when text is inserted by the program in wxOSX.
This should fix crashes due to infinite recursion in the code that calls
wxTextCtrl::WriteText() from wxEVT_CHAR handler.

Closes #15345.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-18 18:15:29 +00:00
Vadim Zeitlin
8750905b8b No real changes, just restrict wxMacEditHelper interface.
There is no need to provide GetCurrentlyEditedView() when a simpler
IsCurrentlyEditedView() suffices.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-18 18:15:25 +00:00
Vadim Zeitlin
7915eea7a6 Fix ItemDeleted() call in wxTreeListModel.
While it doesn't matter when exactly do we call it with the generic or GTK
native implementations, under OS X we must update the internal model first and
call this method afterwards because it refreshes the control contents
immediately and so was calling back to the model and getting the pointer to
the item about to be deleted, which resulted in a crash when this pointer was
dereferences later.

Closes #15575.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-18 18:15:17 +00:00
Václav Slavík
0e494ab0c3 Use wxHORIZONTAL default for wxWrapSizer in wxSizerXmlHandler.
For consistency with all other wxSizer kinds, use the default of
wxHORIZONTAL instead of 0 (which has no meaning here) for wxWrapSizer
too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-18 14:59:55 +00:00
Stefan Csomor
e20428397d fixing compile after cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-18 07:16:04 +00:00
Stefan Csomor
a3de1d1338 fixes #15591
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-18 05:13:34 +00:00
Vadim Zeitlin
10df406479 Revert changes to the drawing of the tree item buttons in the generic renderer.
This reverts r74887 as this created problems when drawing them at standard
size.

See #15526.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-17 22:28:29 +00:00
Paul Cornett
66fd711bbb silence GCC warning "enumeral and non-enumeral type in conditional expression"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-17 16:00:09 +00:00
Vadim Zeitlin
853ee8bf12 Get rid of compile- and run-time checks for OS X < 10.5.
As 10.5 is the minimal supported version, it doesn't make sense to check for
it (or even earlier versions) during the build or run-time.

Closes #15580.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-17 12:34:12 +00:00
Vadim Zeitlin
4d0893114a Fix wrong UMAGetSystemVersion() return value comparison in wxScreenDC.
The return value of gestaltSystemVersion() represents the version as
"four hexadecimal digits in the low-order word of the return value", to quote
Apple documentation, not as a floating point number.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-17 12:34:06 +00:00
Vadim Zeitlin
b16fa26914 No changes, just remove hard TABs from wxWebViewWebKit code.
This will allow to commit other changes to this file without triggering svn
hook checking for the TABs absence.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-17 12:34:02 +00:00
Vadim Zeitlin
76c55941db Remove our own dlxxx() functions emulation for OS X <= 10.3.
We don't support so old versions of OS X any more anyhow, so simplify the code
by using dlopen() &c directly instead of using our own wx_dlopen() with custom
implementation for OS X.

See #15580.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-17 12:33:58 +00:00
Vadim Zeitlin
fa62389f20 Always use standard mbstowcs() and wcstombs() functions.
Don't provide our own (not fully functional) definitions of them and always
use the system versions as we don't support OS X 10.2 which was the last
platform where these functions didn't exist/work.

See #15580.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-17 12:33:53 +00:00
Julian Smart
725433b1e8 Include for wxSscanf
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-17 09:49:59 +00:00
Julian Smart
1459d70072 Added points to the units for editing border widths
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-16 20:23:42 +00:00
Julian Smart
ce9de939c7 Typo fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-16 18:19:19 +00:00
Julian Smart
409821d9ce Added wxTEXT_ATTR_UNITS_HUNDREDTHS_POINT for more precise border sizes; used GetPixels() more; corrected collapsed borders implementation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-16 16:22:20 +00:00
Stefan Csomor
68e7166630 adjusting the visible items
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-15 20:00:56 +00:00
Vadim Zeitlin
e365d633f0 Simplify the code in wxTextFile::OnRead() slightly.
No real changes, just use a self-explanatory "lastWasCR" variable instead of
storing the last character read which wasn't used for anything except
comparing it with '\r'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-15 13:04:27 +00:00
Vadim Zeitlin
b845aa636a Fix reading of files with Mac EOLs in wxTextFile.
The last CR-terminated line wasn't handled correctly.

Fix this now and add unit tests to ensure that it stays fixed.

Closes #15583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-15 13:04:23 +00:00
Vadim Zeitlin
910f1a96d2 Add wxOleConvertVariant_ReturnSafeArrays flag for better SAFEARRAY handling.
While we can't change the type of wxVariant to which SAFEARRAYs are converted
by default, it's much more convenient to work with the variant objects of the
correct type, i.e. using wxVariantDataSafeArray, when dealing with SAFEARRAYs,
so add a flag which can be set to tell a wxAutomationObject to behave in this
way.

Closes #14700.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:35 +00:00
Vadim Zeitlin
097ad8f1b0 Don't use owner drawn items under Win7 even when using larger bitmaps.
The check for menu bitmaps size added in r58557 was apparently only needed for
XP and earlier versions and doesn't seem to be necessary under Win7, so don't
use it there, if only because it allows to retrieve the menu item text which
is useful for automation/screen reader tools.

Closes #13544.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:13 +00:00
Vadim Zeitlin
70232f52e9 Do define __VISUALC__ when using Intel compiler under Windows.
This undoes r74888, r74913 and r74969 because all of them were still not
enough to make ICC build work correctly. So instead of trying to find all the
places where we need to test for __INTELC__ in addition to __VISUALC__, just
revert to defining __VISUALC__ for ICC under Windows as it uses its CRT anyhow
and in the vast majority of cases we are actually testing for the CRT and not
the compiler anyhow.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:06 +00:00
Vadim Zeitlin
13a119cca8 Fix wxDataFormat comparison operators for wxDF_HTML under wxMSW.
This format is special as it doesn't have a fixed value and is registered
dynamically instead. So we need to call HtmlFormatFixup(), which checks if the
given custom format is actually wxDF_HTML, before comparing formats to ensure
that the real value assigned to this format compares correctly to the fixed
wxDF_HTML value.

Closes #15280.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:07:57 +00:00
Vadim Zeitlin
a33511aeeb Update the year in the built-in wxWidgets version dialog.
Simply s/2011/2013/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:07:54 +00:00
Vadim Zeitlin
9d7f0c5f7e Avoid spurious errors when getting wxChoice or wxListBox client data in wxMSW.
Even after the changes of r70415, we could still report an error when the
item client data was set to -1 (== CB_ERR) as checking for GetLastError() was
not enough, we need to also ensure that the last error is reset before trying
to get the client data.

Also apply the same fix to wxListBox and add the tests verifying that this
does work correctly.

Closes #13883.

Also fix wxListBox::GetClientData().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:07:44 +00:00
Julian Smart
9e099ac6f2 Fixed calculation when cell widths are percentages.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-12 20:47:22 +00:00
Julian Smart
6fd94bb4ef wxRTC tables: improve collapsed border drawing by allowing cell borders at the edge if no overall border.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-11 14:43:58 +00:00
Julian Smart
e5510b8526 Corrected conversion of small dimensions to pixels
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-11 11:13:18 +00:00
Vadim Zeitlin
dc1f61892b Don't use long deprecated and now removed pangox library in wxX11 any more.
Use pangoxft only now.

Also remove the apparently unused src/x11/pangox11.cpp file, only
src/x11/pango_x.cpp seems to be used (and this one only by being included in
src/x11/dcclient.cpp).

Closes #15482.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-10 20:55:15 +00:00
Paul Cornett
40cbd1603a Window decoration fixes for Wayland.
Allow setting no decorations, and an attempt to allow setting no title bar.
closes #15553


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-09 18:07:31 +00:00
Vadim Zeitlin
0180c58801 Call SetErrorMode() for all Windows applications, not just wxMSW ones.
This suppresses default system error message boxes when trying to load an
invalid DLL in wxGTK/Windows.

Closes #15559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-09 10:34:19 +00:00
Dimitri Schoolwerth
6cb8038834 Fixed wxFileDialog assertion failure under wxOSX Cocoa.
Using wxFD_FILE_MUST_EXIST in combination with an extra panel in wxFileDialog wasn't working properly. Simply remove the unused flag under OS X. Caused problems with Cocoa only (not Carbon), and at least under 10.6 and 10.8.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-09 00:34:17 +00:00
Dimitri Schoolwerth
bf4ca1d681 Fixed Carbon compilation.
Regression since r74855 and r74954.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-08 20:33:56 +00:00
Paul Cornett
12fffeb456 update GLib version check
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 16:50:22 +00:00
Paul Cornett
b2ca5ed564 silence unused parameter warning
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 16:14:19 +00:00
Paul Cornett
4d8a4ee70f build fix for wxUSE_UNICODE==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 16:06:08 +00:00
Václav Slavík
74af3fcecc Workaround OS X crash when closing FDs in wxExecute.
wxExecute() closes all file descriptors in the forked child process.
This is a common practice, but it unfortunately breaks in combination
with libdispatch on OS X, which - instead of gracefully handling the
situation - intentionally(!) crashes when something closes its kevent
file descriptor in OS X 10.8.

There's doesn't seem to be a simple way to get this descriptor and
there's no telling when libdispatch is pulled into the executable, so
just leave the file descriptors be when running under Darwin, until a
better fix is found.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 11:43:10 +00:00
Václav Slavík
d92a17f52d Fix wxExecute() default priority if wxProcess is not used.
The code mistakenly assigned the lowest possible priority (0, in wx's
numbering), while the intention probably was to have the same default as
wxProcess, which is 0 in POSIX numbering and 50== wxPRIORITY_DEFAULT in
wx's.

Fixes permission denied errors if lowering priority is not permitted.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 11:43:06 +00:00
Stefan Csomor
36656b6ce2 adding getURL hook
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 11:23:12 +00:00
Stefan Csomor
c902d81d44 completing OnInit rework for getURL and printFiles callback
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 11:12:41 +00:00
Vadim Zeitlin
62fe7a015a Fix unwanted ribbon expansion on focus loss.
The ribbon unexpectedly showed itself on focus loss when it was minimized.

Fix this and also use switch statement on m_ribbon_state to ensure that the
compiler warns us if we forget to add the code for handling any new elements
of wxRibbonDisplayMode enum.

Closes #15381.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 09:59:03 +00:00
Vadim Zeitlin
d3a9b6a331 Make the test for wxBUFFER_VIRTUAL_AREA in wxBufferedDC code more clear.
While "!a & b" is the same as "!(a & b)" when "b" is a single bit, the latter
is much more standard and more clear, so write this test (added in r71704)
like this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 09:59:01 +00:00
Vadim Zeitlin
9273033d5a Partially account for the shifted origin in wxBufferedDC.
This change slightly improves wxBufferedDC and wxBufferedPaintDC behaviour
when the origin of the DC is shifted, but they still don't work quite right in
this case as they don't use the buffer area of correct size in this case,
which results in cropping the final bitmap (as can be seen in the drawing
sample, which was modified to show wxBufferedPaintDC in action).

Closes #15497.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 09:58:56 +00:00
Vadim Zeitlin
d32895c5d8 Generate events with specific wxFSW_WARNING_OVERFLOW type if applicable.
This allows the program to distinguish between some other, unspecified,
warnings and this one which can and does happen whenever too many changes
occur too quickly but which has a clearly defined work around: the state kept
inside the program just needs to be refreshed by rescanning the directory anew.

See #12847.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 09:58:51 +00:00
Vadim Zeitlin
1fd9d44670 Correct sorting order for doubles and wxDateTime in wxDataViewModel.
They were compared inconsistently with the numbers and strings, -1 is supposed
to be returned if the first element is less than the second one, not 1.

Closes #15406.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 09:58:46 +00:00
Vadim Zeitlin
1efdf9cd65 Handle comparisons of boolean and icon-text items in wxDataViewModel.
For some reasons these types were not handled in wxDataViewModel::Compare(),
unlike all the other standard ones.

Closes #15407.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 09:58:41 +00:00
Stefan Csomor
7c7cfb16d3 get OnInit with complete functionality without loosing sequence for MacOpenFile being called after OnInit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-06 21:12:45 +00:00
Vadim Zeitlin
a05ae051d8 Fix capturing non-ASCII output using wxExecute().
Explicitly use wxConvLibc with wxTextInputStream to make sure we correctly
decode non-ASCII data in the subprocess output.

This is a hack, the real solution would be to make wxTextInputStream work
properly with wxConvAuto.

See #14720.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 23:30:52 +00:00
Vadim Zeitlin
8155d71a7d Improve handling of keyboard entry using IME.
Pass the keyboard events to the IME before generating our events for them, the
IME may need them for its own use.

Closes #15384.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 23:30:45 +00:00
Julian Smart
69a36314cd Use the correct attributes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 19:50:36 +00:00
Julian Smart
9dc7358017 wxRTC: fixed bug with columns with unspecified widths, and column spans, being sized too small
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 16:31:30 +00:00
Paul Cornett
a599b4b5d7 Fix default size of un-resizable windows, broken in r74685
see #14870
closes #15549


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 16:20:06 +00:00
Julian Smart
42b2ebfdbb Provide a fallback text colour for text in wxRTC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 16:15:12 +00:00
Julian Smart
a4f491405d Changed the capitalisation of 'span' of Set/GetRow/Colspan to be less jarring
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 15:35:05 +00:00
Vadim Zeitlin
e3d4bdd52b Don't skip handled mouse wheel events in wxVScrolledWindow.
Make the code consistent with wxScrolledWindow and fix the problem with wheel
events always being skipped by wxVScrolledWindow which could result in
processing them multiple times, e.g. for the window itself and its parent as
it happened with wxPGChoiceEditor cells in wxPropertyGrid.

Closes #15547.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 15:05:41 +00:00
Vadim Zeitlin
1d31e79e5d Replace c_str() with t_str() in wxWinCE code.
This should work correctly even in UTF-8 build, should someone want to use it
under Windows CE.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 15:05:38 +00:00
Vadim Zeitlin
5dcfc82cca Don't call SetDllDirectory() when loading dynamic libraries in wxMSW.
SetDllDirectory() modifies the per-process DLL loading behaviour which is
already unexpected as it can affect other threads, running code completely
unrelated to wxWidgets, but, even worse, we can't undo its effect as calling
SetDllDirectory(NULL) as we used to discarded any changes to the DLL directory
done by the program itself, while restoring the result of GetDllDirectory()
would never restore the "compatible" algorithm for DLL search used by default.

So the simplest, and the only 100% correct solution, is to not call this
function at all from here and call it from some higher level code only, either
in the user application or wxPython itself.

Closes #15534.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 15:05:32 +00:00
Julian Smart
f58377dde1 Implemented collapsed borders for wxRTC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 15:01:20 +00:00
Vadim Zeitlin
52afc093fd Fix crash when accessing wxThreadInfo during global initialization time.
We can't rely on our own globals being already constructed if we're called
during another global initialization, so use the usual trick with wrapping
them in accessor functions to ensure that they are.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 00:05:36 +00:00
Julian Smart
5d72892ebc Added conversion from points
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-04 12:34:41 +00:00
Julian Smart
070af26558 Corrected border drawing to avoid clipping
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-04 07:57:26 +00:00
Julian Smart
fc8a2ec1f6 wxRTC table layout now uses cell content to calculate column widths if no other widths specified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-04 05:51:36 +00:00
Julian Smart
0d60cffa2e Include wxWANTS_CHARS style unless wxTE_READONLY is specified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-03 12:12:07 +00:00
Václav Slavík
f6ac9c6240 XRC spec: document wxRibbon* XRC handler.
Format documentation was nonexistent (the few words present were
incorrect). Document my best guess about the intended usage.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-03 11:08:48 +00:00
Vadim Zeitlin
e118367990 Avoid dropping events in wxDocParentFrameAnyBase in some circumstances.
The code trying to avoid forwarding duplicate events to wxDocManager was over
eager and in some situations filtered out the events which hadn't been sent to
it yet and were, in fact, not handled at all. This could be seen, for example,
by running the docview sample with "--sdi" command line option, creating one
child frame and then trying to create another one from the parent frame menu:
this failed because the existence of a valid child was considered to be enough
for the event to have been already processed in it which was false in this case.

Unfortunately there is no obvious fix to this problem, notably because of the
very roundabout way the toolbar events are processed in MDI windows: the
toolbar itself is a child of the parent frame but the events from it are still
sent to the currently active child frame by wxMDIParentFrameBase. So we can't
rely on any kind of parent-of-originating-window checks.

Instead, remember the last event handled in the child and avoid processing the
same event in wxDocManager again. This should at least avoid the false
positives (like the one fixed by this commit), although it could still result
in false negatives (i.e. some duplicated events) if an event handler generated
other events while skipping the original one. This is a lesser evil though and
should be relatively rare in practice, so live with this ugliness until
someone comes with another idea of fixing the bug described above.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 23:32:06 +00:00
Vadim Zeitlin
e90d566109 No changes, just fix a typo in a comment in docview event handling code.
This code is non-trivial enough without confusingly calling a view "new".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 23:32:00 +00:00
Vadim Zeitlin
4521f6c88c Add wxActivateEvent::GetActivationReason().
This method is implemented for wxMSW-only currently and allows to check
whether the window is being activated by a mouse click or in some other way
there.

Closes #15516.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 16:25:04 +00:00
Vadim Zeitlin
30a7e91fb0 Fix incorrect event handler functions casts in wxRibbonPanel code.
Use wxMouseEventHandler() instead of (wrongly) casting a method taking
wxMouseEvent to wxEvent-taking wxObjectEventFunction.

Closes #15550.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 16:24:59 +00:00
Vadim Zeitlin
42ed9e53ad Add more checks for Intel compiler.
This should have been part of r74888.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 23:04:51 +00:00
Vadim Zeitlin
9ed99f82da Remove support for Gnome printing from wxGTK.
It was replaced by GTK+ printing several years ago and is almost never used
any longer anyhow, so any problems in this code (and there are some) would
never be found and fixed.

Also update the message catalogs to avoid having the strings not used any
more, as they were only used in Gnome printing code.

Closes #15517.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 17:09:02 +00:00
Paul Cornett
afab8b85c4 Go back to using a fixed value of 3 for lines/columns per action for mouse wheel event.
The native value is too large. Reverts the effect of r74805. Closes #15527


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 16:33:30 +00:00
Julian Smart
4b263e5ef3 Further refine of #15226: wxRichTextCtrl: Implement setting properties with undo for objects e.g. wxRichTextTable (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 16:33:24 +00:00
Vadim Zeitlin
dd44c13014 Remove obsolete CodeWarrior-related batch files.
This compiler is not supported (and doesn't even exist, in fact) any more and
these files should have been removed in r59493.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 16:08:39 +00:00
Vadim Zeitlin
58b962cdb0 Remove obsolete VisualAge-related files.
These were used under OS/2 circa 2000.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 16:08:36 +00:00
Vadim Zeitlin
772513d824 Upgrade bundled zlib to 1.2.8.
No real changes from wxWidgets point of view.

Closes #15314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 16:08:25 +00:00
Julian Smart
21d0340384 Applied #15226 wxRichTextCtrl: Implement setting properties with undo for objects e.g. wxRichTextTable (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 15:47:49 +00:00
Vadim Zeitlin
38ececd4c3 Fix crash when auto-sizing a wxDataViewCtrl column.
The code was confused about the difference between the model and view columns
indices and incorrectly used the former as the latter, which could result in
an out of bound array access.

Closes #15420.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:49:26 +00:00
Vadim Zeitlin
5db33691be Do not define __VISUALC__ for Intel C++ compiler under Windows.
This is confusing and makes it more difficult to test for the "real" MSVC,
test for __INTELC__ explicitly wherever needed instead.

Also document __INTELC__ in our list of compilers.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:49:21 +00:00
Vadim Zeitlin
bddab017c6 Improve drawing of the tree item buttons in the generic renderer.
Draw the "-" and "+" signs always properly centered.

Closes #15526.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:49:15 +00:00
Vadim Zeitlin
4a2d030adf Fix problem with COMDLG_FILTERSPEC declaration with MinGW-w64 4.8.
Forward declaring as a struct a symbol previously defined as a typedef results
in an error when using MinGW-w64 4.8.1, so forward declare the struct itself
instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:48:55 +00:00
Vadim Zeitlin
534f87c6c4 Avoid using wxHtmlTag::HasParam() unnecessarily.
Use GetParamAsXXX() accessors instead as they combine the calls to HasParam()
and GetParam() and make the code shorter and avoid the duplication of the tag
name.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:48:46 +00:00
Vadim Zeitlin
6d2190fcb4 Store HTML "id" parameter value in wxHtmlCell.
Pass on the value of the ID to the cell object when adding a new cell.

Closes #15535.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:48:41 +00:00
Vadim Zeitlin
486a0fa75f Add wxHtmlTag::GetParamAsString() convenience method.
This is more convenient to use than HasParam() + GetParam() and also slightly
more efficient as we search for the tag name only once.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:48:38 +00:00
Václav Slavík
be10c7f969 Compilation fix for !wxUSE_OWNER_DRAWN.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 17:12:24 +00:00
Julian Smart
d0b6c0c527 Applied #15226 with modifications: wxRichTextCtrl: Implement setting properties with undo for objects e.g. wxRichTextTable (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-29 16:08:03 +00:00
Julian Smart
b7348ed0cf Don't redraw borders for cells that are hidden - fixes drawing glitch in sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-29 14:01:16 +00:00
Julian Smart
af4168e2cf Added wxRichTextTableBlock class to help with table UI operations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-29 13:35:58 +00:00
Julian Smart
787de84048 Fixed capitalisation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-29 13:11:01 +00:00
Julian Smart
92a98ecc53 Applied patch #15540: wxRichTextTable: crashes due to an invalid focus object (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-29 12:58:30 +00:00
Julian Smart
ac448bc0a0 wxRTC: save and load the 'shown' status in case there's a situation where layout doesn't restore it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-29 12:06:17 +00:00
Julian Smart
f7f8a13c04 wxRTC: fixed guidelines overwriting adjacent cell borders; corrected capitalisation in command labels; now sends text update event when an object is changed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-27 13:36:46 +00:00
Václav Slavík
c4c885f043 XRC: make wxStaticText's wrap property a dimension.
Parse it as dimension type (including dlg units) and not just integer.
This is backward compatible.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-26 12:55:20 +00:00
Václav Slavík
85d64f6aa1 XRC: make wxSplitterWindow's sashpos and minpanesize dimensions.
Parse them as dimension type (including dlg units) and not just integers. This is backward compatible.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-26 12:55:17 +00:00
Julian Smart
3b9c5fe8b3 Corrected disabling of controls in cell editor.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-26 10:00:50 +00:00
Stefan Csomor
e2c0faf71c always use hw-accel, fixes #15536, applied with thanks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-26 06:31:20 +00:00
Paul Cornett
7b37894790 avoid calling GetDefaultSize() twice
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-24 05:50:09 +00:00
Julian Smart
4f2d6692c7 Make wxRichTextRectArray usable by other parts of wxRTC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-23 09:07:16 +00:00
Julian Smart
057945a5cd Partial fix for #15196: wxRichTextCell caret issues (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-22 20:34:16 +00:00
Julian Smart
7fd80c6f68 Allow absent checkbox when transferring dimension data
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-22 20:22:19 +00:00
Václav Slavík
1c2704fe7b Make public headers compatible with Objective-C++ with ARC.
OSXGetViewOrWindow() virtual methods were defined in headers and were casting
NSView*/NSWindow* to void*, which the compiler complains about with ARC
enabled. Rather than writing conditional code in the header, move the
implementations into .cpp files. They were virtual anyway, so this is no less
efficient, and doesn't leave any problematic code in public headers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-21 10:11:08 +00:00
Václav Slavík
d10fdec4b7 Revert "using #ifdef wxABORT_ON_CONFIG_ERROR not just #if as elsewhere"
This reverts commit r74656, because it breaks initialization order by
calling OnInit() too late.  See
https://groups.google.com/d/topic/wx-dev/H5vgc2VO7K4/discussion

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-21 09:28:47 +00:00
Václav Slavík
59576592b8 Fix wxOSX warnings about int-to-void* casts.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-21 09:28:39 +00:00
Václav Slavík
a255c995a1 Try loading even English translations if provided.
Doing so has negligible cost and can be useful in some situations (e.g.
when using symbolic msgids despite gettext best practices).

Patch by tmsorensen.

Fixes #15522.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-20 17:27:59 +00:00
Paul Cornett
ac687ddffb fix vertical mouse wheel event rotation value, sign was reversed in r74805
fixes #15524

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-20 15:21:25 +00:00
Jouk Jansen
b43069c6a0 Update OpenVMS makefile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-20 06:07:23 +00:00
Julian Smart
cb6b81bc94 The alignment controls are now left-aligned if the floating controls are not shown.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-19 18:23:37 +00:00
Julian Smart
32c2b16dac Corrections to border placement
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-19 13:14:11 +00:00
Julian Smart
d9dd0c95df Second part of #15224 fix: AddRows, AddColumns (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-19 11:09:34 +00:00
Julian Smart
0cae0a4e18 Fix for #15224: wxRichTextTable: Setting a cell's text colour affects subsequent cells (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-19 08:38:48 +00:00
Julian Smart
9142a5ec3f Fix for #15520: wxRichTextCtrl: Drawing the selection doesn't respect its container (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-19 07:48:22 +00:00
Paul Cornett
dfb39a3727 fix wxSystemSettings::GetColour() for wxGTK3
closes #15519

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-19 05:33:55 +00:00
Vadim Zeitlin
6e48287c6a Add missing c_str() call to fix wxGTK ANSI+STL build.
Closes #15518.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 18:02:25 +00:00
Václav Slavík
f2959820a5 Add wxTranslations::GetTranslatedString().
Replace GetString(), which always returns something (possibly the
original string) with GetTranslatedString() that returns either a
pointer to translated string or NULL.

This simplifies the code a bit, all handling of missing translations is
now done in wxGetTranslation().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 16:03:31 +00:00
Václav Slavík
5278469615 Deallocate wxThreadSpecificInfo when wxThread ends.
Cleanup wxThreadSpecificInfo after wxThread::Entry returns to be more
memory efficient.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 16:03:25 +00:00
Václav Slavík
d2740de55e Make _() and friends safe to call from any thread.
The GetUntranslatedString() hack keeps a global copy of all strings, so
that it can return a const reference as wxGetTranslation() return value.
A global wxHashSet instance shared by all threads won't do, even guarded
with a critical section, because it may internally copy values on any
insert and thus invalidate pointers that may still be used on another
thread.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 16:03:20 +00:00
Václav Slavík
92c0fc34c1 Make storing non-trivial data in wxThreadSpecificInfo possible.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 16:03:14 +00:00
Julian Smart
e0effd7e3b Ensure that the overall table border doesn't get overdrawn by cell borders with a different colour
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 08:18:32 +00:00
Vadim Zeitlin
b0ad146aba Fix assorted typos in comments and other non-code.
Closes #15509.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-17 15:25:59 +00:00
Vadim Zeitlin
0d60699143 Use mask when drawing bitmaps in generic wxDataViewCtrl.
This allows to have bitmaps with transparent areas in them.

Closes #15510.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-17 15:25:52 +00:00
Vadim Zeitlin
3e33568e0b Add wxDataViewRendererBase::GetEffectiveAlignment() and use it.
This helper method falls back on the alignment of the column if the renderer
alignment is not specified. This is almost always what should be used instead
of GetAlignment() to determine the alignment that really should be used in the
drawing code.

In particular, using GetEffectiveAlignment() in wxDataViewCustomRenderer fixes
the problem with bitmap columns ignoring column alignment for their bitmaps.

Closes #15498.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-17 15:25:47 +00:00
Paul Cornett
b59ada676f remove executable property from non-executable files, closes #15504
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-16 15:47:27 +00:00
Vadim Zeitlin
7dbb435338 Revert "Make wxMSW stack walking methods work with Unicode identifiers."
This reverts r74817 because it broke compilation with VC8 and it doesn't seem
obvious to fix this.

See #15138, closes #15500.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 11:57:23 +00:00
Vadim Zeitlin
e3735e7a9f Show full screen windows with WS_POPUP style in wxMSW.
This doesn't make any difference for most windows but fixes a problem with
wxGLCanvas windows using stereo support of Nvidia cards and generally it does
make sense to use WS_POPUP with full screen windows as they are definitely not
overlapped, so just use this style unconditionally.

Closes #15434.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:16:39 +00:00
Vadim Zeitlin
bf9ce7b55e Make wxMSW stack walking methods work with Unicode identifiers.
This allows to show the stack properly for e.g. Japanese programs.

Closes #15138.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:16:34 +00:00
Vadim Zeitlin
39c0d6d6b6 Disable handling of wxEVT_MOUSEWHEEL in wxVarScrollHelperEvtHandler in wxGTK.
Just for consistency with wxScrollHelperBase, not really sure what problem
exactly does this solve.

See #15357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:15:26 +00:00
Vadim Zeitlin
4706252347 Make default keyboard handling available in wxVarScrollHelperEvtHandler too.
Factor out the keyboard handling code in wxAnyScrollHelperBase allowing its
reuse in wxVarScrollHelperEvtHandler.

Now wxVarScrollHelperBase handles cursor keys in a sane way by default
too and also allows disabling their handling, just as wxScrolledWindow.

See #15357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:15:17 +00:00
Vadim Zeitlin
dc2513650d Propagate the event handling fixes to wxVarScrollHelperBase.
Merge the fixes to wxScrollHelperBase::ProcessEvent() of r64358, r64370,
r64464, r72939 and possibly a few more in wxVarScrollHelperBase to fix its
behaviour too, as it wasn't generating the correct events any longer.

Unfortunately the fix right now is to physically copy the code from one class
to the other. This should be avoided, of course, and a more in depth
refactoring should be done to move the code common to both classes into
wxAnyScrollHelperBase after 3.0 release. But for now continuing to duplicate
code is better than not having a working wxVarScrollHelperBase.

See #15357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:15:12 +00:00
Vadim Zeitlin
010d821b31 Add wxAnyScrollHelperBase to reduce code duplication in wxVarScrollHelperBase.
This is just a small refactoring to move some trivially common parts of
wxScrollHelperBase and wxVarScrollHelperBase in a new common base class.
This will make it possible to apply other corrections to wxVarScrollHelperBase
without having to physically duplicate the code from wxScrollHelperBase in it.

See #15357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:15:07 +00:00
Vadim Zeitlin
5fff51b517 Fix flickering of wxStaticBox background in wxMSW.
First of all, don't erase background in WM_ERASEBKGND at all if we erase it
anyhow in WM_PAINT, this is totally useless and is what wxBG_STYLE_PAINT is for.

Second, clip out not only the siblings of the static box but also its children
when erasing the background to avoid painting over the controls created as the
box children, which is the preferred way to create them now.

Closes #15150.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:14:56 +00:00
Vadim Zeitlin
4de25822f3 Don't crash when laying out wxGridBagSizer with only hidden elements.
wxGridBagSizer lay out algorithm needs at least a single row and a single
column to work, so simply don't run it at all if there is nothing to lay out.

Closes #15475.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:14:51 +00:00
Vadim Zeitlin
0d17c5b66a Improve composite flags handling in the property grid wxFlagsProperty.
Don't consider that a flag is on just because one of its bits is enabled in
the current flags, for the composite flags (e.g. something like "BOTH = ONE |
TWO") all the bits composing the flag must be on for it to be enabled.

Closes #15499.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:14:41 +00:00
Julian Smart
88ff049184 Workaround for #15404: wxRichTextCtrl: caret does not disappear when focus is lost (Mac) (briceandre)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-14 20:46:43 +00:00
Paul Cornett
8a1554ed3c add support for GDK_SCROLL_SMOOTH mouse wheel event, introduced in GTK+ 3.4
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-14 18:15:42 +00:00
Paul Cornett
53f1a5b1bd use native lines/columns per action for mouse wheel event
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-14 18:06:54 +00:00
Steve Lamerton
fe7cefd493 Handle WebKitWebView create-web-view.
In some cases a new window is signalled using create-web-view rather than new-window-policy-decision-requested and so we need to handle it to emit the correct new window events.

Fixes #15447.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-13 12:55:08 +00:00
Vadim Zeitlin
799a2c1cd7 Handle non-ASCII output from lsb_release in wxGetLinuxDistributionInfo().
Assume that lsb_release always output UTF-8 text as this seems to be the case
right now for the only (common) Linux distribution which uses anything but
ASCII for its code name (Fedora 19 "Schrödinger's Cat").

Closes #15492.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-12 20:49:24 +00:00
Vadim Zeitlin
6ad62591be Don't reset m_fp if wxFFile::Open() fails.
This makes it behaviour consistent with wxFile::Open().

Also don't use Detach() in Close(), again for consistency with wxFile, even if
this has no user-visible effects at all.

See #15494.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-12 20:49:18 +00:00
Václav Slavík
5bac960d40 Fix needlessly convoluted test in wxXmlResourceHandlerImpl::GetImageList().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 15:20:09 +00:00
Vadim Zeitlin
76b0f8384e Fix another crash when conversion fails in Unix PostScript code.
Returning 0 length from GetTextExtent() is hardly ideal but it's better than
crashing.

Closes #15489.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 15:06:04 +00:00
Steve Lamerton
11a23db531 Fix stc doxygen warnings and regen stc files.
We need to manually escape a few parts of the autogenerated documentation. 

See #15346.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 12:03:07 +00:00
Vadim Zeitlin
eb6b14dc71 Fix wrong in wxListCtrl::SetItemColumnImage() in r74716.
The check for "image == -1" was added to a wrong line.

See #15421.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-10 12:12:52 +00:00
Vadim Zeitlin
17d698cca5 Consistently handle DST start time in wxDateTime::Set().
Always move the dates invalid due to DST (i.e. falling into the "missing" hour
on the DST start date) forward, as GNU libc does, even when using a different
CRT implementation, such as MSVC one which moves the invalid dates backwards.

This seems more expected and also fixes an especially bad problem which
happened due to moving the date backwards in Brazilian time zone where DST
starts at midnight as doing this changed the day and totally broke ParseDate()
assumption that setting wxDateTime to 00:00:00 at the given date really did
set it to this date.

Closes #15419.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-08 18:00:58 +00:00
Václav Slavík
d9b22d8fff wxMSW: return correct value from wxMessageDialog::GetReturnCode().
wxMessageDialog's native code didn't call SetReturnCode() as it should.
As a result, it didn't work with ShowWindowModal().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 17:09:23 +00:00
Vadim Zeitlin
ee3dd6dd5f Fix bug with not selecting wxAuiNotebook page when its child was focused.
The code in OnChildFocusNotebook() handler only worked correctly if the page
itself was focused but not if the focus was given to one of its children --
which should still make the page itself current.

Closes #15471.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 12:27:04 +00:00
Steve Lamerton
111d847de5 Fix history storing in wxWebViewWebKit with custom schemes.
When the history has just been cleared there is no existing item so we should add the new history item even in this case.

Fixes #15446.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 09:50:58 +00:00
Vadim Zeitlin
6ba718d7ae Fix horizontal mouse wheel scrolling in wxGTK.
Change the value of the appropriate adjustment instead of always using the
vertical one.

Closes #15469.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 00:20:06 +00:00
Vadim Zeitlin
1948ff5f89 Just remove redundant wxDocument::SetDocumentTemplate() call.
This is already done from InitDocument() called from
wxDocTemplate::CreateDocument().

Closes #15467.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 13:07:11 +00:00
Vadim Zeitlin
d9106ec5b6 Correct erasing of background behind controls in a toolbar in wxMSW.
We need to handle WM_PRINTCLIENT in wxToolBar itself as the default handler
for this message forwards to WM_ERASEBKGND of the parent window and our
handler for that message only erases the client part of the window, in wx
sense, i.e. including a relatively big vertical offset accounting for the
toolbar. This means that when we get WM_PRINTCLIENT from the embedded control
drawing code, we don't erase anything at all as the control rectangle height
is smaller than the offset.

This fix is not perfect as ideally the existing MSWGetBgBrushForChild() should
be taken into account automatically by the default MSWPrintChild()
implementation but at least it fixes the ugly visual artefacts.

Closes #12307.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:37 +00:00
Vadim Zeitlin
1c467e8804 Don't take hidden wxGrid row/columns into account when auto-sizing.
The contents not shown to the user shouldn't affect the fitting width/height
of the columns/rows that are shown.

See #15464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:15 +00:00
Vadim Zeitlin
c7ea5a0c7e Remove superfluous mouse capturing in wxGrid row/column labels windows.
This code recaptured the mouse in the window which had already had it, thus
triggering the (recently added, see r74677) asserts in CaptureMouse(). It also
didn't preserve the invariant of m_winCapture always having the capture. And
it was apparently completely unnecessary too.

So simply remove it to fix the asserts while drag-resizing wxGrid rows/columns.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:13 +00:00
Vadim Zeitlin
8965331963 Simplify wxGridCellAutoWrapStringRenderer::GetBestSize().
The code there was pretty wild, making clearly wrong assumptions (column size
doesn't, and AFAICS never did, include 20 pixel margin) and also was clearly
uncertain about what it was doing by trying to limit the number of iterations
to some arbitrary cutoff when it is pretty clear that the loop increasing the
width and decreasing the height on each iteration will reach the condition of
"width >= height*1.68" sooner or later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:10 +00:00
Vadim Zeitlin
85d2dec9f0 Don't crash in wxGridCellAutoWrapStringRenderer when the column is hidden.
Our methods should arguably not be called at all in this case, but if this
does happen, at least don't crash.

Closes #15464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:05 +00:00
Julian Smart
bd21f7eaf0 wxRTC: extracted XML utilities into a separate class for potential reuse.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-03 16:47:09 +00:00
Paul Cornett
48829702f1 Fix referencing of cairo_t returned from wxDCImpl::GetCairoContext().
It was assumed that all callers were going to unref the cairo_t, but that is not
true, so callers that are going to unref it should ref it themselves.
See #15455


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-03 05:37:30 +00:00
Paul Cornett
cb41a69b15 Don't update position of widgets in a wxPizza from size_allocate handler.
The values in m_{x,y} are not the same as client coordinates if the wxPizza is scrolled.
Closes #15444


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-31 03:25:12 +00:00
Vadim Zeitlin
3c3e94dc01 Fix infinite loop in wxMSW with wxStaticBox inside non-wxTAB_TRAVERSAL parent.
We didn't ensure that the parent of a (native) control with WS_EX_CONTROLPARENT
had this style as well, unlike for our own windows. Fix this now to make
certain that we never call ::IsDialogMessage() on a window whose parent
doesn't have WS_EX_CONTROLPARENT as it simply hangs in this case, entering an
infinite loop searching for the default button.

Also try to reduce the possibility of such bugs in the future by checking for
WS_EX_CONTROLPARENT and not wxTAB_TRAVERSAL before calling ::IsDialogMessage()
even if this doesn't totally prevent them (it wasn't sufficient to fix even
this particular bug).

Closes #15458.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-30 23:32:42 +00:00
Vadim Zeitlin
69384772ac Fix wxMenu::GetTitle() before the menu is appended to the menu bar.
The mnemonics conversion was not done correctly when the menu title contained
them but the menu hadn't been appended to the menu bar yet.

Closes #15461.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-30 23:32:37 +00:00
Václav Slavík
45d66f592c Loosen the assert in IsScrollIncrement().
wxWindowGTK::GTKGetScrollEventType() tries to map GtkAdjustment's delta
to either step or page increment by comparing it with the respective
GtkAdjustment steps. Both of them can be 0, but this code is not
expected to be called in such case.

Yet, in practice, it occasionally is, see e.g.
http://devel.aegisub.org/ticket/979GTKGetScrollEventType (wxWebView is
prone to it as well).

Check for >= 0 instead, to be more robust when faced with unexpected
input from GTK+.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-30 13:14:50 +00:00
Vadim Zeitlin
8cf4b0651f Initialize wxImageFileProperty correctly when file is given in the ctor.
Previously the file had to be specified later and the value passed to the ctor
was ignored.

Closes #15456.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-29 20:44:58 +00:00
Vadim Zeitlin
66c2bf7b1d Don't define __STRICT_ANSI__, we should build both with and without it.
For some reason, wxDialUpManager code defined __STRICT_ANSI__ itself, don't do
it as __STRICT_ANSI__ can be predefined by the compiler resulting in the
redefinition warnings and, in any case, our code should build both with and
without it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-29 12:33:44 +00:00
Julian Smart
fca66f5985 Crash fix for inserting text into a buffer without an associated control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-29 11:41:48 +00:00
Jouk Jansen
8059d88d80 wxGTK1 : another msiing include file in evtloop.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-29 06:39:38 +00:00
Jouk Jansen
7169360153 wxGTK1 : wx/private/eventloopsourcesmanager.h was missing in evtloop.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-28 06:01:12 +00:00
Vadim Zeitlin
ef3ea7e50c Don't recurse into top level children in wxWindow::FindWindow().
Finding a button in a child dialog when looking for it in the current window
is totally unexpected and can result in subtle bugs, see #15442.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 22:49:48 +00:00
Vadim Zeitlin
ee3de647ff Correct making the newly inserted menu item owner drawn in some cases.
The item being inserted is not inserted yet when we call
SetOwnerDrawnMenuItem() so we must call it separately for it after inserting
it.

Closes #15437.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 22:49:28 +00:00
Vadim Zeitlin
6c0d5a69e9 Don't use any icon for items inserted without one in wxMSW wxListCtrl.
Previously we erroneously used the first icon in the image list for them
instead. This was inconsistent with wxGTK and didn't make much sense, even if
it is the default behaviour of the native control, so don't do this any more
and explicitly specify I_IMAGENONE for the icon if it wasn't given.

Closes #15421.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 22:49:23 +00:00
Vadim Zeitlin
029a401d74 Make wxWindow::HasScrollbar() respect wxScrolled::ShowScrollbars().
Override CanScroll() in wxScrolled to return the real state of the scrollbar
instead of just relying on the wx[HV]SCROLL styles.

Closes #15440.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 13:12:38 +00:00
Vadim Zeitlin
3d777efedc No real changes, just make wxWindow::CanScroll() virtual.
This will allow overriding it in wxScrolled<>, see #15440.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 13:12:31 +00:00
Jouk Jansen
8f96683438 Update OpenVMS compile support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 12:02:20 +00:00
Jouk Jansen
67afffcd05 revert nested event loop support for wxGTK1 because it causes applications hangs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 11:46:13 +00:00
Vadim Zeitlin
9e9574fe45 Move code removing "-psn_xxx" command line arguments to common code.
We need to do this when using any port under OS X, not just wxOSX, e.g. the
-psn_xxx arguments passed by the Finder when launching the application, must
also be ignored when using wxGTK.

Closes #15432.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-24 14:33:22 +00:00
Vadim Zeitlin
76e7cfab8f Fix recreating of wxBitmapComboBox using untyped client data.
Use the correct array when restoring the client data, correcting a fatal typo
in the changes of r73880.

Closes #15436.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-24 14:33:09 +00:00
Paul Cornett
a31e87879e remove redundant initialization of base class member variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-24 05:11:28 +00:00
Paul Cornett
092162bc12 wxDialogBase only has one ctor, so just do initialization in ctor instead of Init()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-24 05:04:11 +00:00
Vadim Zeitlin
0d53638f71 Fix wxHtmlHelpData::SetTempDir() to behave correctly without trailing slash.
The path passed to this function is always a directory, so use
wxFileName::AssignDir() instead of the default constructor of wxFileName which
considers the name to be a name of a file unless it ends with a path separator.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-23 16:37:09 +00:00
Paul Cornett
3a4cf8a84d Remove DoSetSizeHints() call from Create()
The reason it was added does not seem to be reproducible anymore,
and it interferes with wxRESIZE_BORDER on Ubuntu.
Closes #14870


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-19 17:25:56 +00:00
Paul Cornett
ef1a87f606 revert r74683, wxTLW has its own {Width,Height}Default()
which are not the ones called by PreCreation()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-19 16:58:43 +00:00
Paul Cornett
e62b769262 Remove some old redundant code
Default size stuff is done by PreCreation()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-19 05:42:21 +00:00
Paul Cornett
71a09c3579 avoid setting initial position if it was not specified, broken in r70734
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 16:00:22 +00:00
Paul Cornett
dca2fe5dae Move code that does not need realized GdkWinow out of realize handler
These calls can be made much earlier, and it seems like a good idea to do so.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 15:01:06 +00:00
Vadim Zeitlin
60435227b1 Only give capture to wxPopupTransientWindow child if it's the only one.
This removes the arbitrariness of using the first child which didn't make any
sense when the popup had several controls inside it, e.g. in wxRichToolTip
case this resulted in the mouse capture being given to wxStaticBitmap showing
the tooltip icon even though it didn't need it at all.

This probably doesn't really change the observable behaviour but seems more
logical.

See #15288.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:28 +00:00
Vadim Zeitlin
5f9e369af0 Use wxFindWindowAtPoint() for hit testing in wxPopupTransientWindow.
This works even with irregularly shaped windows such as wxRichToolTip unlike
the old naive test using wxRect::Contains() which didn't and resulted in us
believing that the mouse was outside the window when it was still in it and
(somehow, the details are not totally clear) recapturing the mouse again and
again in the same window which resulted in assert failures with the new checks
in wxWindowBase::CaptureMouse() or the capture stack corruption before this.

Closes #15288.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:23 +00:00
Vadim Zeitlin
bf2c43c76e Return NULL from wxWindow::GetCapture() when the capture is being lost.
Make GetCapture() return NULL during wxEVT_MOUSE_CAPTURE_{LOST,CHANGED} events
processing in wxMSW to help their handlers to avoid calling ReleaseCapture():
this shouldn't be done as the mouse capture is being lost anyhow and results
in reentrancy problems between NotifyCaptureLost() and ReleaseCapture() if
it's called.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:19 +00:00
Vadim Zeitlin
2d145378f6 Make mouse capture checking asserts stronger and more detailed.
Verify not only that we don't destroy the window having the capture now but
also that this window is not in the mouse capture stack at all, not
necessarily on top. This is important as keeping a dangling pointer in the
capture stack would result in difficult to diagnose bugs later.

Also check that we don't recapture the mouse in the same window as this should
never be necessary.

Finally, give more details in the assert checking that the window does have
capture in ReleaseMouse().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:16 +00:00
Vadim Zeitlin
af2372b95d Don't set even try to set focus to wxPopupWindow itself in wxMSW.
This doesn't work anyhow with our popup window implementation (it's a child of
the desktop and we can't set focus to it) and provokes error messages due to
::SetFocus() failures, so simply don't do this at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:13 +00:00
Vadim Zeitlin
0c60a0e2b7 No changes, just change data structures used by mouse capture code.
Use a simple stack of windows instead of a separate singly linked list and a
separate current capture pointer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:09 +00:00
Vadim Zeitlin
b0ad1918b9 No changes, just use wxRecursionGuard instead of manual boolean flag.
Use wxRecursionGuard with the flag indicating whether the mouse capture is
changing to ensure that we always reset it correctly and make the code
slightly shorter.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:06 +00:00
Vadim Zeitlin
ae1cdb2d07 No changes, just move mouse capturing bookkeeping data out of wxWindow.
All mouse capture-related data doesn't have to be declared in wxWindow itself
and can just be global in wincmn.cpp, so move it there, this will facilitate
further changes as they won't require recompiling everything any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:02 +00:00
Paul Cornett
992bf7cfac should have been part of r74664: Avoid calling gtk_window_get_position() from "configure-event" handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 04:28:28 +00:00
Paul Cornett
3eee64e7cf avoid duplicate move events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-17 16:38:12 +00:00
Paul Cornett
c37b0f0907 Avoid calling gtk_window_get_position() from "configure-event" handler, if possible.
This avoids a round trip to the X server, which is expensive over a remote connection.
Closes #15116


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-17 16:25:13 +00:00