Commit Graph

58127 Commits

Author SHA1 Message Date
Vadim Zeitlin
d183babc8d Allow retrieving wxPG_FLOAT_PRECISION and not just setting it.
It was possible to call SetAttribute() to change this attribute value but not
to get it back. Override DoGetAttribute() to also allow the latter.

See #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:44 +00:00
Vadim Zeitlin
876859fcb7 Expose ScintillaWX DoDragEnter() and DoDragLeave() methods.
These methods are needed to allow implementing alternative wxDropTargets, in
addition to the already public DoDragOver().

Closes #16010.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:39 +00:00
Vadim Zeitlin
0415f0ab05 Document interaction of wxSplitterWindow gravity with initial size.
Document the somewhat counter intuitive (but difficult to change) behaviour of
the splitter when both sash position and gravity are set.

See #15996.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:31 +00:00
Vadim Zeitlin
b1a92006b9 Fix memory leak when not finishing iteration started by wxFindFirstFile().
Memory allocated by wxFindFirstFile() was only freed when no more files could
be found by wxFindNextFile(), resulting in a memory leak if the iteration was
never finished.

Closes #4631.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:24 +00:00
Vadim Zeitlin
1911811fe6 Fix wxOSX compilation error after r75956.
wxScopedArray::get() needs to be explicitly called to access the array
contents as a pointer.

Closes #16015.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:14:32 +00:00
Vadim Zeitlin
d479c2affa Chinese translations update for 3.0.1 from Jiawei Huang.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:09:51 +00:00
Vadim Zeitlin
92c5b8bba2 German translations update for 3.0.1 from Sebastian Walderich.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:06:50 +00:00
Vadim Zeitlin
918f777c5e Basque translations update for 3.0.1 from Xabier Aramendi.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 21:47:28 +00:00
Stefan Csomor
633b5c691b make sure a frozen control calls a native 'thaw' on the tlw during destruction, otherwise tlws might end up unresponsive, see #16011
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 19:05:22 +00:00
Vadim Zeitlin
b481d43235 Ukrainian translations update for 3.0.1 from Yuri Chornoivan.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 17:15:56 +00:00
Vadim Zeitlin
ae3ffd0740 French translations update for 3.0.1 from Xavier Perrissoud.
Apply to the trunk as well.

See #16013.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 16:28:03 +00:00
Vadim Zeitlin
dfdde1cd06 Regenerate all .po files in the trunk too.
Bring them (more) in sync with 3.0 branch.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 16:27:57 +00:00
Vadim Zeitlin
5ac26f43bd Fix memory leak in wxRibbonToolBar in case of error.
Use wxScopedPtr to ensure the tool is not leaked, even if we fail to insert
it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:58 +00:00
Vadim Zeitlin
5e204ab52e Fix uninitialized variable use in wxPropertyGrid code.
wxPGProperty::GetItemAtY() uses its input/output "nextItem" parameter, so it
must be initialized before calling it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:55 +00:00
Vadim Zeitlin
461e38f17c Ensure we don't read invalid memory in wxOSX wxDisplay code.
Replace wxASSERT() with wxCHECK_MSG() to ensure that we don't read beyond the
end of the array even if we are given an invalid index.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:52 +00:00
Vadim Zeitlin
563f41c686 Fix memory leak on error return in wxOSX wxDisplay code.
Use wxScopedArray to ensure that memory is freed, even if wxCHECK_MSG()
condition fails.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 00:51:49 +00:00
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
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