Commit Graph

33030 Commits

Author SHA1 Message Date
Vadim Zeitlin
3dd1d4d915 Fix memory leak in case of error in wxOSX graphics code.
Delete the pointer before returning from the function if we don't pass its
ownership to CGDataProviderCreateWithData().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:46 +00:00
Vadim Zeitlin
a4cc201e76 Fix memory leak on error return from wxMsgCatalogFile::FillHash().
Use wxScopedPtr to make memory management simpler and to ensure that all
pointers allocated in this function are deleted: this wasn't the case when we
returned false earlier due to the MO file being invalid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:43 +00:00
Vadim Zeitlin
f5033eec65 No real changes, just use smart pointers in GIF decoding code.
Use wxScopedArray to make the code much shorter and guarantee that it doesn't
leak memory.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:41 +00:00
Vadim Zeitlin
76d296d67d Fix socket leak in Accept() in case of error.o
We leaked a socket descriptor if creating the accepted socket object failed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:38 +00:00
Vadim Zeitlin
bebfa839da Fix fall back to default resolution in wxOSX printing code.
The code was written to use the default resolution if getting it from the
printer failed but only handled failure of PMPrinterGetOutputResolution() and
not of PMSessionGetCurrentPrinter() itself.

Use default resolution if obtaining it failed for any reason (alternative
could be to return error if obtaining it failed for any return...).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:34 +00:00
Vadim Zeitlin
356da1750d Correct wxDataViewColumn::AppendXXXColumn() return value in case of failure.
Don't return invalid column pointer if it was freed because actually appending
it to the control failed.

Fixes corresponding Coverity warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:30 +00:00
Vadim Zeitlin
e518e31acd Fix crash when using wxThreadSpecificInfo from global object ctor.
When not using compiler TLS support (which is the default now), TLS variable
itself needs to be initialized and user-defined code in the global objects
ctor could be called before this happened, resulting in using uninitialized
CRITICAL_SECTION under Windows and a crash.

Fix this by wrapping global wxThreadSpecificInfo itself in an accessor
function ensuring that it is always initialized before use.

Notice that this required adding wxTLS_TYPE_REF() as wxTLS_TYPE() itself can't
be used for the function return value (__thread or similar can only be used on
the variables).

Closes #16009.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 15:13:36 +00:00
Vadim Zeitlin
d08b801d2c Use correct column type when adding columns to wxDataViewListCtrl.
Using base class methods such as AppendBitmapColumn() resulted in
wxDataViewListCtrl::AppendColumn() being called but this function always
assumed the column was of "string" variant type -- which was, of course, false
for bitmap columns and so resulted in heap corruption (thanks to the
wonderfully type unsafe code using wxVariant) and a crash.

Get the correct type to use from the column itself now to fix this.

Closes #16008.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 13:06:33 +00:00
Vadim Zeitlin
5178d10df7 Don't show hidden MDI frames when maximizing them in wxMSW.
This is inconsistent with the other ports and rather unexpected.

Closes #2508.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:58 +00:00
Vadim Zeitlin
0b4804594c Don't show the MDI children implicitly by default in wxMSW any more.
We kept doing it for compatibility with pre-2.5.3 versions but this was a long
time ago and we don't need this any longer.

See #2508.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:54 +00:00
Vadim Zeitlin
41d5ebc86f Fix wxCmdLineParser::Found(name) for options with values.
Calling Found() without providing the second "value" argument started
generating an assert since introduction of the negated options as it reused
FoundSwitch() which can only be used for switches, i.e. options without
values.

Fix this to revert a regression since 2.8 and also add unit tests for the
different Found() overloads.

Closes #15986, #16001.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:47 +00:00
Vadim Zeitlin
3d20f8e534 Reduce code duplication in wxCmdLineParser implementation.
No real changes, just extract the code for finding options from their names
into a separate function instead of repeating it 4 (and 5, after the next
commit changes) times.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:44 +00:00
Vadim Zeitlin
ac7e40cde2 Don't use invalid pointer in file dialog hook procedure in wxMSW.
We can receive WM_NOTIFY for other than CDN_XXX messages if we have a native
control as our immediate child (which can happen with "extra" controls) and
the LPARAM is not a pointer to OFNOTIFY at all in this case, so don't try to
use it as such.

This fixes a crash when adding a "bare" extra control, see #16003.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:39 +00:00
Vadim Zeitlin
81b62354dc Fix wxTextCtrl contents corruption with long strings in wxMSW.
wxMSW automatically extended wxTextCtrl length limit beyond the tiny standard
32KB when it was exceeded, but part of the text being appended into the
control was lost when doing it.

Fix this by retrying insertion after extending the limit.

Closes #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:34 +00:00
Stefan Csomor
43f960c9e1 misplaced the orderOut: , see #15998, #15902
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-19 20:24:04 +00:00
Vadim Zeitlin
f74fcabb0f Set model pointer in wxDataViewEvents generated under wxOSX.
Add missing SetModel() calls.

Closes #16004.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-19 14:52:18 +00:00
Vadim Zeitlin
b6be374d72 Move DSS_HIDEPREFIX fallback definition to the central header.
Do it only once now that it's used in 3 different places (it recently started
to be used in src/msw/anybutton.cpp as well) instead of defining it thrice.

This also fixes MinGW build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 23:36:34 +00:00
Vadim Zeitlin
0181aaf822 Compilation fix for wxUSE_IMAGE==0 wxMSW build.
Declare the variable used in any case outside of wxUSE_IMAGE-only block.

See #2609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:13:04 +00:00
Vadim Zeitlin
f1aac9d707 Don't delete child controls when deleting wxStaticBoxSizer.
This is an incompatible change compared to 2.8 which can make the existing
code crash and it also goes against the usual rule that the windows are never
owned by sizers, only other windows.

Closes #15698.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:08:49 +00:00
Vadim Zeitlin
0206eb6161 Add support for fixed spacers and labels to wxAuiToolBar XRC handler.
Allow specifying "width" and "proportion" attributes for the "space" elements
and add "label" element support.

Closes #15964.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:05:52 +00:00
Stefan Csomor
d64c74160b fixing nested modal sessions, part 2, see #15902
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 10:09:33 +00:00
Vadim Zeitlin
b577f3d731 Add missing bounding box calculations in wxMSW wxDC code.
Update the bounding box when drawing bitmaps (in one of several possible ways)
and gradients.

Closes #2132.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:38 +00:00
Vadim Zeitlin
fd743aad4b Improve disabled buttons appearance in wxMSW when not using themes.
Owner drawn buttons were not drawn in the same way as normal ones when they
were disabled, use Win32 DrawState() to do it now to achieve the correct
appearance.

Closes #11746.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:25 +00:00
Vadim Zeitlin
99d3a4f4d2 Speed up wxHtmlHelpWindow startup time by freezing font choices.
Appending the names of all fonts could take a significant amount of time if
there were a lot of them, freeze the controls while doing it to speed it up.

Closes #15978.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:20 +00:00
Vadim Zeitlin
8e828674c4 Set wxHtmlHelpFrame title format before creating it.
This ensures that it's always set before it can be used, fixing assert
introduced in r75748.

Closes #15977.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:15 +00:00
Vadim Zeitlin
aef402209d Allow waiting for thread termination even without wxTheApp in wxMSW.
Attempts to wait for thread termination after wxTheApp was destroyed resulted
in an error in wxMSW since 2.9.something whereas it used to work in 2.8 and
also generally makes sense to be allowed. So do make this work again by
falling back to the simple non-interruptible wait for thread if we don't have
the application object any more.

Closes #13391.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:06 +00:00
Vadim Zeitlin
0a5ea360d5 Fix handling of wxTEXT_ATTR_EFFECT_SMALL_CAPITALS in wxRichTextFontPage.
Due to a typo when copy-and-pasting code wrong control was being updated.

It would be better to have a function updating the given control from the
given flag, of course, but for now just fix the bug.

Closes #15990.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:01 +00:00
Vadim Zeitlin
592c0aa6a8 Fix fallback format index in wxPropertyGetter wxUIntProperty code.
Don't crash by accessing an out of bands array element if the format string
index had been set to an invalid value, just use the default (decimal) format
in this case.

Closes #15984.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:52:56 +00:00
Vadim Zeitlin
78be29a447 Use symbolic constants in wxPropertyGrid wxUIntProperty code.
No real changes, just use symbolic constants instead of hard coded magical
constants. The code is still difficult to understand but slightly better than
before.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:52:53 +00:00
Stefan Csomor
dba39486b1 fixing nested modal sessions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 19:13:04 +00:00
Paul Cornett
95dfcdd678 avoid potential NULL pointer dereference, closes #15993
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 16:25:22 +00:00
Paul Cornett
15c92b16a3 fix ordering of function parameters, closes #15985
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 16:25:08 +00:00
Julian Smart
29a83101bc Fixed floating object layout when there is only a short text string in the paragraph
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 14:54:09 +00:00
Julian Smart
ba7e065a34 Removed rounding that didn't work for negative numbers; added ability to hide "move object" controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-16 20:05:19 +00:00
Julian Smart
4d331cea32 Compile fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-16 11:41:20 +00:00
Paul Cornett
320a5da559 mimic wxMSW wxSetCursorEvent propagation behavior, closes #15801
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 18:14:48 +00:00
Julian Smart
8762e50748 Sizing fix in wxRichTextImage::LoadImageCache
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 18:11:44 +00:00
Václav Slavík
c76d1ea417 OS X: fix startup sequence when restoring session on >=10.7.
Make sure that OnInit() is called before MacReopenApp(). This is
normally the case, but it is possible for it to be called as the first
thing.  This can happen when OS X restores running apps when starting a
new user session. Apps that were hidden (dock only) when the previous
session terminated are only restored in a limited, resources-saving way
- the event loop is running, but didn't call anything in the app
delegate yet.  When the user clicks the icon,
applicationShouldHandleReopen: is called, but we didn't call OnInit()
yet. In this case, we shouldn't call MacReopenApp(), but should proceed
with normal initialization.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 16:59:18 +00:00
Julian Smart
2124c5688b Optimized wxRTC insertion and deletion when floating objects are present.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-15 16:19:43 +00:00
Paul Cornett
f2e9e3b4b7 avoid setting negative window size, see #15976
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 16:47:17 +00:00
Paul Cornett
d35ca1d7aa avoid forcing a paint on a window with zero size, see #15976
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 16:46:57 +00:00
Julian Smart
f95ee1bade Added ability to disable images in wxRTC for performance or image corruption reasons
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 12:32:46 +00:00
Julian Smart
5e989e67fc Corrected wxTextBoxAttr::IsDefault() implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 12:00:52 +00:00
Julian Smart
d2e7ba812c Border drawing corrections
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 11:57:40 +00:00
Julian Smart
46944bebe4 Fixed a bug that prevented floating objects from being updated correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-13 11:46:59 +00:00
Paul Cornett
0eb8b9579a finish setting size before sending wxMoveEvent
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-10 17:32:42 +00:00
Paul Cornett
ec3872a8e1 remove stuff that is already done by gtk_window_set_transient_for()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-10 17:25:32 +00:00
Paul Cornett
14029856dc generate wxMoveEvent from wxPopupWindow::DoSetSize()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-10 17:11:54 +00:00
Paul Cornett
8f97969383 add missing GTK3 implementations of GTKGetWindow()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 19:53:17 +00:00
Paul Cornett
1b131bf7e5 emit signal by id instead of name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 18:36:15 +00:00
Paul Cornett
6fb06f465b get non-default wxTextCtrl cursors working with GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 18:15:03 +00:00
Paul Cornett
c51c65633b Use "state-flags-changed" signal with GTK3, deprecated "state-changed" is ignored.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 16:49:35 +00:00
Vadim Zeitlin
6e7ebad658 Fix wxToolBar size in wxMSW when not using icons.
There were several problems when the toolbar style was toggled to not show
icons, fix them by adding missing checks for wxTB_NOICONS style.

Closes #13578.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-08 14:12:20 +00:00
Julian Smart
30d591010b Return true from GetRangeSize or partial extents will be incorrectly filled in
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-08 11:55:08 +00:00
Vadim Zeitlin
6d7a5d3969 Don't show "deleted stale lock file" message by default.
The user typically can't do anything about this error anyhow, so don't show it
by default. Still do show it when running in the verbose mode as this might
add diagnosing the problem when something goes unexpectedly wrong.

Closes #15944.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-08 00:46:54 +00:00
Vadim Zeitlin
92c74c3513 Don't use try/catch if exceptions support is disabled.
Closes #15954.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-08 00:43:00 +00:00
Vadim Zeitlin
10597ecd04 Don't log error from wxMSW wxWakeUpIdle().
This is not necessary as there is nothing that can be done about this error
anyhow and the function still "works" even if it occurs (it doesn't wake up
anything but it is not necessary to do it if the message queue is already
full) and, worse, results in a crash due to stack overflow.

Closes #15951.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-07 15:02:36 +00:00
Paul Cornett
2dfa6e6aa8 Don't update position variables from window dragging code.
Let "configure-event" handler do it so it can also generate proper move events.
closes #15904


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 17:27:25 +00:00
Paul Cornett
9d0d2b7e98 Fix wxSetCursorEvent handling
For compatibility with wxMSW, send event up the parent chain.
Properly handle setting the cursor for a wxSetCursorEvent, and don't overwrite the window cursor.
see #15801


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 08:54:17 +00:00
Paul Cornett
0dfeb74e78 Different fix for cursor inheritance and busy cursor/global cursor.
Previous work was not compatible with GTK < 2.18 and did not properly handle some cases
see #15801


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 04:43:46 +00:00
Vadim Zeitlin
5e6d30aa0b Add support for sorting by more than one column to generic wxDataViewCtrl.
Maintain a list of columns used for sorting instead of a single sort column
index and allow to add/remove columns to/from it interactively by right
clicking them if AllowMultiColumnSort() was used.

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

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 22:12:53 +00:00
Václav Slavík
8dd971e45b Rewrite wxTextFile's newlines parsing to fix multiple bugs.
Remove the complicated parsing state machine that contained bugs with
unexpected inputs and was very hard to modify correctly.  Replace it
with much simpler code that looks ahead, instead of deducing line
endings from past characters.

The new code never looses lines with data and calls AddLine() on the
first newline character it encounters, peeking ahead to determine the
line ending type.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 18:28:57 +00:00
Vadim Zeitlin
c866934853 Compilation fix for PCH-less build.
This should fix compilation without PCH after r75785.

See #2609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 01:04:27 +00:00
Julian Smart
9733b78862 Return true from OnCellClicked if the event was processed, otherwise further processing will use default behaviour which may negate the effect of the event handler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 19:10:22 +00:00
Julian Smart
179d117a35 Added the ability to restore the last selected page in a wxRTC formatting dialog.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 18:57:20 +00:00
Vadim Zeitlin
9d05d9a009 Allow using wxRearrangeList::Check() to change state programmatically.
Previous this resulted in an assert and broken behaviour as it didn't update
the internally stored state. Do update it now and remove the assert as it
isn't possible to distinguish between user code calling Check() and wxGTK
doing it itself from wxCheckListBox implementation.

Closes #15940.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 15:59:52 +00:00
Vadim Zeitlin
8942262811 Fix transparency in toolbar buttons when not using comctl32.dll v6.
Old versions of comctl32.dll don't support alpha in the toolbar image list, so
use the masks only for them.

Closes #2609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 15:59:47 +00:00
Dimitri Schoolwerth
6d34b1b760 Added support for wxEVT_COMBOBOX_DROPDOWN and wxEVT_COMBOBOX_CLOSEUP events to wxOSX/Cocoa.
See #15762.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-04 09:32:16 +00:00
Stefan Csomor
9f93667c52 merging in Václav's fix for getting CPU usage down in ShowModal
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-03 20:31:55 +00:00
Stefan Csomor
7df52b73bd passing correct timeout values, patch from Václav
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-03 17:40:43 +00:00
Jouk Jansen
b09a481c2e synchronizing the definition of wxLoadQueryNearestFont
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-03 14:06:40 +00:00
Paul Cornett
95695c0a9f don't avoid no-window widgets in GTKUpdateCursor()
it doesn't work for things like multi-line text control where m_widget is a no-window GtkScrolledWindow

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 21:01:09 +00:00
Paul Cornett
adeb914098 fix running with GTK < 2.18 when built with later GTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 20:05:43 +00:00
Paul Cornett
fd049a5465 restore non-default cursors in native widgets when unsetting wxCursor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:26:21 +00:00
Vadim Zeitlin
7baf1ce2fd Don't show windows with "hidden" XRC attribute at all.
This is better than showing them initially and then hiding them if only
because it avoids the unexpected wxEVT_SHOW events being generated.

Closes #15919.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:18:52 +00:00
Vadim Zeitlin
36e3a58992 Recompute the tooltip width when changing its text in wxMSW.
This avoids unnecessarily wrapping the tooltips if they are set to a longer
string than their initial value later.

Closes #4685.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 18:18:47 +00:00
Paul Cornett
7b1f4ba70a don't override non-default cursors in native controls when no wxCursor is set, a regression introduced by r75690
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 17:08:25 +00:00
Tim Kosse
98bf1dae9b Add Kabyle language, as rare language it uses a three-letter code as per ISO 639-2.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-01 10:39:25 +00:00
Vadim Zeitlin
a23b9cd8ce Use automatic resource management in wxMSW wxDC::DrawRotatedText().
No real changes, just simplify the code by using RAII classes.

Also avoid unnecessary indentation by returning after checking for the special
cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 19:33:58 +00:00
Vadim Zeitlin
0a86fd0f4f Support multiline strings in wxDC::DrawRotatedText() in wxMSW.
The native API doesn't support this, so do it by splitting the string into
lines manually.

Closes #9686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 19:33:53 +00:00
Paul Cornett
17a5323672 build fix for GTK3, see #15930
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 18:26:09 +00:00
Vadim Zeitlin
67cbb04051 Try to detect invalid wxHtmlWindow title format earlier.
Assert directly in wxHtmlWindow::SetRelatedFrame() instead of doing it much
later, hopefully people will read the comment at the assert point.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-31 16:06:43 +00:00
Vadim Zeitlin
448a4ac22a Reduce the number of realloc() calls in wxHtmlTableCell.
Don't call realloc() after adding each row, this is horribly inefficient, so
preallocate more memory to avoid this.

Closes #15931.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:40 +00:00
Vadim Zeitlin
d0d22874c8 Correctly detect cancelled drag-and-drop operations in wxGTK.
The status of the drop operation wasn't propagated back to the initiator of
drag and drop, so failing to drop data over a possibly accepting recipient
could result in wrong behaviour and even data loss.

Closes #15930.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:35 +00:00
Vadim Zeitlin
98da482d7a Deprecate wxTipProvider::PreprocessTip().
It is completely useless, and there is no reason to keep it.

Closes #15916.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 19:40:29 +00:00
Vadim Zeitlin
aeadb41900 Update copyright year in the library versions.
Update the version info dialog and the version info included in MSW DLLs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-30 03:32:49 +00:00
Vadim Zeitlin
b02ba7c9ff Don't mark wxMSW applications as being DPI aware.
Because they are not, fully. While our standard controls do appear correctly
in any DPI, anything using bitmaps/icons (e.g. toolbars, AUI title bars, ...)
isn't usable at all without scaling at high DPI, so it's better to avoid
pretending that we're DPI aware at all rather than doing it without being it
for 100%.

This reverts the changes of r63990.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:29:54 +00:00
Vadim Zeitlin
67fe66530d Fix a bug which could result in two default buttons in wxMSW dialogs.
Exchange the order of setting/resetting the new/old button as the default one
when focus is lost/gained to avoid the possibility of having two simultaneously
default buttons at once.

Closes #9528.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:26:00 +00:00
Vadim Zeitlin
3ded9e191d Fix handling of wxSET, wxCLEAR and wxINVERT ROPs in wxMSW.
Avoid passing source HDC to MaskBlt() for these ROPs which only use the
destination HDC as they produce garbage instead of just ignoring the source in
if it's non-NULL.

Closes #2047.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:56 +00:00
Vadim Zeitlin
afb49a224b Fix wxClientDC::Clear() for scrolled windows in wxMSW.
Take the DC origin into account when clearing a window DC and not only a
memory one.

Closes #2048.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:51 +00:00
Vadim Zeitlin
41569662e3 Fix wxPrinterDC::DrawIcon() in wxMSW.
Make DrawIcon() work when printing: it previously didn't, as we used
::DrawIconEx() Windows function which wasn't supported when printing.
Work around this by using DrawBitmap() if necessary.

Closes #379.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:45 +00:00
Vadim Zeitlin
cc4658d1f4 Fix display of bitmaps with alpha in wxStaticBitmap under MSW.
Avoid double alpha pre-multiplication by converting the bitmap into a non
pre-multiplied format before passing it to STM_SETIMAGE.

Closes #2395.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:41 +00:00
Vadim Zeitlin
0a411fd5da Virtualize wxXmlNode methods used by wxAuiToolBarXmlHandler.
This fixes the DLL build of aui library as it can now be linked without
leaving any unresolved dependencies to the code in xml library (where
wxXmlNode is implemented).

Closes #15686.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:36 +00:00
Vadim Zeitlin
d94f3f5aba Fix bug with non-NUL-terminaed inputs in wxMBConvUTF8.
We read beyond the provided maximal length as we didn't update the remaining
length while parsing the remaining bytes of an UTF-8-encoded code point.

Fix this and add a test for it.

Closes #15901.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:14 +00:00
Vadim Zeitlin
5cfbf0dc4d Allow iterating over wxCmdLineParser arguments in order.
This allows the meaning of the options to depend on their order relatively to
the other options which wasn't possible before.

See http://review.bakefile.org/r/557/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-28 13:04:55 +00:00
Vadim Zeitlin
f4c9767b49 Try rounding the values when resizing wxImage instead of truncating.
This would seem to make more sense and might also fix the test failures
resulting from tiny differences in arithmetic operations when compiled with
different compilers/under different architectures.

Regenerate the test files and commit (disabled) change to the unit test
allowing to do it again in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-26 16:24:42 +00:00
Vadim Zeitlin
ca5f92da94 Don't keep dangling pointers in other wxRibbonButtonBar members neither.
This should have been part of r75710: after deleting the button, also reset
any stored pointers to it.

Closes #15909.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-26 14:08:23 +00:00
Vadim Zeitlin
7048cf7174 Don't leave dandling pointers in wxDataViewCtrl in wxOSX.
The previous m_ModelNotifier became invalid but wasn't always replaced with a
valid one, resulting in a crash due to the use of an invalid pointer.

Closes #15910.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 17:39:28 +00:00
Vadim Zeitlin
5f30588ebd Delete the button object in wxRibbonButtonBar::DeleteButton().
Unlike ClearButtons(), DeleteButton() didn't actually delete the button.

Fix this and document this behaviour.

Closes #15909.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 17:39:21 +00:00
Václav Slavík
2c260e8188 Fix improper NSGraphicsContext handling in wxOSXCreateBitmapContextFromNSImage.
Don't leave currentContext set to the temporary context indefinitely,
but restore the previous one when done. It's apparent from the code that
this is how it was meant to be done.

Not doing this can result in strange, insanely hard to debug errors in
completely unrelated places, because OS X (at least < 10.9) reuses a
pool of contexts. For example, this change fixes Quicklook crashes in
file open panel on 10.8.

For detailed explanation, see the lengthy discussion at
https://code.google.com/p/chromium/issues/detail?id=90140

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 17:38:56 +00:00
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