Commit Graph

49462 Commits

Author SHA1 Message Date
Jaakko Salli
aa498ec94e Removed some old code that generated warnings on some compilers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-01 13:20:21 +00:00
Jaakko Salli
9a30da4d1f Fixed a severe crash bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-01 13:13:58 +00:00
Vadim Zeitlin
890defb4f3 Correctly determine best wxPropertyGrid width.
Improve wxPropertyGrid::DoGetBestSize() to correctly determine the window
width by using the sum of columns widths.

Also correct wxPropertyGridPageState::GetColumnFitWidth() to account for the
bitmaps.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-31 21:28:25 +00:00
Vadim Zeitlin
a4dac1907b Avoid spurious uninitialized variable warning.
Last change introduced a new warning in optimized g++ build, fix it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-31 00:05:29 +00:00
Vadim Zeitlin
2e51fb3041 Correct wxImage::Size() again; add unit tests for it.
wxImage::Size() didn't handle the paste position correctly.

Closes #7874.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 21:43:11 +00:00
Vadim Zeitlin
180f3c7461 Add support for bilinear resize algorithm to wxImage.
Add wxIMAGE_QUALITY_BILINEAR in addition to the existing wxIMAGE_QUALITY_BICUBIC,
it is supposed to be much faster yet yield almost the same results.

Closes #11034.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 21:11:37 +00:00
Vadim Zeitlin
16b0c55398 Use correct font instead of DEFAULT_GUI_FONT.
DEFAULT_GUI_FONT is a misnomer, not only is it not a default (and never was)
but it shouldn't be used at all. Instead use lfMessageFont from the
NONCLIENTMETRICS structure as it seems to correspond to the font used by
the native controls under 2000, XP and Vista and respects Vista global DPI
setting unlike DEFAULT_GUI_FONT.

Closes #11008.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 20:42:46 +00:00
Vadim Zeitlin
791f7574a0 Fix buffer overflow in wxURLDataObject.
The code in CFSTR_SHELLURLDataObject::GetDataHere() was confused by
ANSI/Unicode and ended up overwriting output buffer because of it. Moreover,
this function was actually completely unnecessary as the base class version
did work correctly.

Closes #11102 (thanks to Tim Kosse).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 17:25:42 +00:00
Vadim Zeitlin
cd67a80a9a Fix off by one errors in wxURLDataObject.
wxTextDataObject::SetData() adds the terminating NUL automatically so there is
no need to add it to the length when calling it from wxURLDataObject::SetURL().

This change is necessary to fix the unit test in the upcoming fix for #11102.

See #11102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 17:25:28 +00:00
Vadim Zeitlin
69d31e3130 Output the extracted number from wxString::ToXXX() even if it returns false.
After the changes in r50710 wxString numeric conversion functions didn't
update their output parameter any more if the conversion failed because not
entire string was converted. This was incompatible with the old behaviour
which some existing code did rely on, so restore it and now always return the
number which was extracted from the beginning of the string if we found
anything at all, even if the function returns false.

Add unit test for the correct behaviour and updated the documentation.

Closes #11126.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 17:25:19 +00:00
Vadim Zeitlin
4329eae943 Use GetBestSize() rather than DoGetBestSize().
Call GetBestSize() from wxWindowMSW::DoSetSize() so that it works correctly
for the classes which only override DoGetBestClientSize() and not
DoGetBestSize() itself, such as wxStaticText.

Closes #11096.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 17:25:02 +00:00
Vadim Zeitlin
d301c44093 Fix selection events generation in multi-select wxTreeCtrl.
Only deselect the items when the mouse is released if really necessary: add a
flag indicating when it is instead of trying to deduce it in the mouse up
handler.

Closes #11099 (thanks to Jonathan Liu).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 17:24:53 +00:00
Vadim Zeitlin
f2fec40d2c Don't generate duplicated events for clicks on tree +/- buttons.
In multiple selection mode we process mouse events manually in wxTreeCtrl
itself and already take care of mouse clicks on the buttons there so don't
pass them on to the base class which would generate another event.

Closes #11098 (thanks to Jonathan Liu).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 17:24:45 +00:00
Jaakko Salli
08c1613f88 Disabled top-level parent tracking by default (crashes with AUI), must now use wxPG_EX_ENABLE_TLP_TRACKING style to enable old behavior.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-29 08:09:45 +00:00
Vadim Zeitlin
ef8f6d9590 Compilation fix for wxUSE_PROTOCOL && !wxUSE_URL.
IMPLEMENT_CLASS(wxProtoInfo) wasn't compiled in in this build configuration
because it was in url.cpp instead of protocol.cpp and so was guarded by
wxUSE_URL and not wxUSE_PROTOCOL as it should have been.

Closes #11151.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-28 10:44:25 +00:00
Vadim Zeitlin
dc2575bad4 Compilation fixes for wxUSE_FONTMAP==0.
Closes #11150.

Closes #11152.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-28 10:44:12 +00:00
Vadim Zeitlin
1c51fc784d No real changes, just slightly simplify code.
No need to check whether the pointer is NULL before deleting it nor to assign
NULL to it if it's going to be immediately reassigned on the next line.

Closes #11149.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-28 10:43:51 +00:00
Paul Cornett
40fd70f109 small fix to last commit, only disable updating decor size if necessary
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-27 07:08:12 +00:00
Paul Cornett
d2c5fe6e6e avoid deferred show with Fluxbox, its support for _NET_REQUEST_FRAME_EXTENTS is broken
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-27 05:11:01 +00:00
Michael Wetherell
ba27f249be Split 32-bit GTK builds between the the two linux machines, read to add more builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-26 23:12:36 +00:00
Vadim Zeitlin
0571b62b88 Fix wxDocManager::GetLastDirectory() when there is no history.
The most recently opened file should be used only if we have MRU list.

Closes #11145.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-26 22:17:57 +00:00
Vadim Zeitlin
ff971416bb Use correct array size for weekday names.
DAYS_PER_400_YEARS was erroneously used instead of DAYS_PER_WEEK which
resulted in creation of much larger object file than needed as the array is
initialized.

Closes #11143.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-26 20:44:09 +00:00
Vadim Zeitlin
7d58a1bdd0 Use #pragma message and not #pragma warning for MSVC.
This fixes MSVC compilation with wxUSE_APPLE_IEEE==0.

Closes #11141.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-26 20:44:01 +00:00
Vadim Zeitlin
bc2fe7b204 Compilation fix for wxUSE_INTL==0 in wxMSW MDI code.
Using wxGetTranslation().wx_str() doesn't work when wxUSE_INTL==0.

Closes #11142.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-26 20:43:53 +00:00
Kevin Ollivier
66f917a7ea Restore pattern creation, and do sanity checks before destroying the pattern or the surface. Closes #11140.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-24 22:49:27 +00:00
Vadim Zeitlin
a6cf6bcfb4 Don't append text following CDATA section to its node itself.
Reset wxXmlParsingContext::lastAsText flag when CDATA section ends to avoid
appending the text following it to its node. Instead new text nodes should be
created for it.

Also update the unit test to not work around the bug any more.

Closes #10552.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-24 21:42:27 +00:00
Vadim Zeitlin
84e0e5265d No changes, just fix unused variables and parameters warnings.
Fix warnings in wxGTK wxUSE_GRAPHICS_CONTEXT==1 build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-24 21:42:21 +00:00
Vadim Zeitlin
d55906de77 Add A0 and A1 formats to wxPaperSize enumeration.
Closes #11083.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-24 21:42:11 +00:00
Jouk Jansen
7b8dd3cc49 Update OpenVMS compile support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-24 07:31:37 +00:00
Vadim Zeitlin
345ff9c65b Allow entering minus sign in wxMSW wxSpinCtrl if needed.
Only restrict input to wxMSW wxSpinCtrl to digits only if it doesn't support
negative values, otherwise the user can't enter any negative numbers. As there
is no built in support for entering digits and minus sign only, simply allow
all characters to be used if the negative numbers must indeed be possible to
enter.

Closes #11082.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:48:35 +00:00
Vadim Zeitlin
07890fbeb5 Never overflow the output buffer in wxBase64Decode().
Don't write extra NUL bytes obtained by decoding the padding at the end of
input into the output buffer as there may be not enough place in it for them.
And in any case the buffer is not (always) NUL-terminated as no NUL bytes are
obtained in absence of padding, so it's better to never terminate it for
consistency.

Closes #11101.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:25:12 +00:00
Vadim Zeitlin
e331a94e90 Correct the order of coordinates in CGPoint initializer.
The order was reversed.

Closes #11020.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:25:00 +00:00
Vadim Zeitlin
7b342d55c3 Show the current range of valid dates in the calendar sample.
See #11081 (point C).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:24:54 +00:00
Vadim Zeitlin
0274a7973d Added wxGridSize::GetEffective{Cols,Rows}Count().
These functions return the number of columns or rows being currently used and
not 0, unlike the existing Get{Cols,Rows}(), if the corresponding number is
determined dynamically.

Closes #10254.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:24:48 +00:00
Vadim Zeitlin
fef6a2f1a0 No changes, just clarify a comment for WXK_XXX values.
Part of patch in #10268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 21:39:42 +00:00
Vadim Zeitlin
4f742042b8 Make WXK_NUMPAD_TAB member of WXK_CATEGORY_TAB.
See #10268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 21:39:32 +00:00
Vadim Zeitlin
12c9c01c24 Extract event handlers chain documentation in a separate section.
The explanation of event handlers chaining was too big and distracted from the
main point of the event processing section which was to explain in which order
different handlers are looked up.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 21:31:14 +00:00
Jaakko Salli
0ee316821c Made wxPropertyGridHitTestResult a real class (works better that way with SWIG)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 18:38:13 +00:00
Jaakko Salli
1bfcd80c2f Removed obsolete conditional compile option wxPG_CREATE_CONTROLS_HIDDEN
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 15:34:25 +00:00
Jaakko Salli
58935d4a5c Added label editing capability into wxPropertyGrid
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 15:31:03 +00:00
Vadim Zeitlin
7a34307e24 Added wxKeyEvent::IsKeyInCategory() method.
This allows to test whether a given key belongs to the category of e.g. arrow
keys or navigation keys in a more concise and more readable manner.

Closes #10268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 00:32:17 +00:00
Vadim Zeitlin
2e4d0e91bf Document wxGraphicsPath::AddArc() better.
The angles passed to it are measured clockwise from the horizontal axis,
contrary to the usual mathematical convention so take care to mention this in
the documentation.

Closes #11112.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-22 13:59:14 +00:00
Vadim Zeitlin
7a91ad2cee Only use wxLocale functions if wxUSE_INTL == 1.
Don't use locale-dependent formats in wxDateTime::ParseFormat() when locale
support is disabled.

Closes #11121.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 18:46:39 +00:00
Vadim Zeitlin
c0f02dab27 Fix typo in wxNewEventFunctor() comment.
Closes #11117.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 18:46:32 +00:00
Stefan Csomor
7c17cb8c2c supporting earlier xcode version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 18:22:28 +00:00
Vadim Zeitlin
1b4b608091 Do wait for connection in the server socket.
The code returned immediately from wxSocketBase::DoWait() if it wasn't
connected but it only made sense for the client sockets, not server ones which
could be calling this function precisely in order to wait until a connection
is made.

Also added a test for this bug in the sockets/server sample.

Closes #11107.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 15:25:09 +00:00
Vadim Zeitlin
d94e9b623a Allow creating initially hidden controls in wxOSX/Cocoa.
If wxWindow is hidden before being really created, we must create the native
control hidden too. Not only this allows to create the controls initially
hidden, as intended, but it also avoids the wx and native visibility flags
from getting out of sync which results in many other problems.

Closes #11131.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 10:54:53 +00:00
Vadim Zeitlin
03647350fc No changes, just removed hard tabs and trailing white space.
This commit is huge but there are no non-white-space changes in it.

Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-21 10:41:26 +00:00
Vadim Zeitlin
545cb3fcf2 Fix signatures of various image handlers methods.
Use wxBitmapType instead of long for the type parameter and made SaveFile()
methods const to follow the base class changes.

Now that the signatures are the same as in the base class these handlers have
a chance to work again while their methods couldn't be called at all before
this change.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-20 00:44:47 +00:00
Vadim Zeitlin
4462f911b1 Refactor and clean up slider labels drawing code.
This change fixes multiple g++ 4 warnings about unsafe expressions with
bit-wise operators (completely justified, for once, as the expressions were
absolutely incomprehensible and almost certainly incorrect too) and refactors
the determination of where to draw the slider labels in a single function
instead of triplicating it.

Also reformat to follow wxWidgets conventions and use more clear variable
names.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-20 00:44:42 +00:00