Commit Graph

58104 Commits

Author SHA1 Message Date
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
8587e491f9 Add projects for MSVC 11 and 12 (MSVS 2012 and 2013).
Add manually created projects for now, as it looks that we are not going to
have bakefile-generated ones any time soon.

Closes #15780.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 15:43:16 +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
9d2b9feeb1 Add "const" to the recently added wxRTC XPM.
This fixes half a page of warnings about converting string constants to
non-const char* from g++.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:43 +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
f20fbba01f Fix crash in wxMSW wxFileSystemWatcher when removing the same path twice.
Starting to watch a path, stopping to watch it, starting to watch it again and
stopping again resulted in a crash in wxMSW wxFileSystemWatcher implementation
because the watcher object wasn't kept artificially kept alive when it was
stopped for the second time. This happened because our way of keeping it alive
was to store it in a hash map indexed by path, but if a watcher for the same
path (added there when this path was first unwatched) was already present in
the map, the watcher wasn't added to it and not kept alive.

Fix this by using a vector instead of a map. We obviously sacrifice quick
access to it by path but at least this doesn't crash any more. And we could
actually still use a map, just indexed by the (unique) pointer to the object
stored inside wxSharedPtr itself, and not its path. But a vector might be a
more efficient data structure in practice, if we keep it from becoming too big
as we should try to do by triggering artificial port completions when a watch
is removed.

At any rate, at least the crash is fixed for now.

Closes #15995.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:53:11 +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
Vadim Zeitlin
6be8fc6667 Document wxTopLevelWindow::Restore().
This was never documented, probably because it's not actually very clear to
understand what exactly does it do.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-17 23:52:50 +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
Vadim Zeitlin
924465f468 Provide more detailed deprecation message for wxFont ctor.
Be more clear about how should the code be changed.

Closes #15972.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-12 13:15:17 +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