Commit Graph

50625 Commits

Author SHA1 Message Date
Francesco Montorsi
00e075e551 Committing modified version of jwiesemann's patch (see #11223):
Fix wxURL copy ctor and assignment: the default ones provided by the compiler are wrong because wxURL uses pointers internally. 
Also add a test for copy & assignment in URLTestCase.

Closes #11223

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-30 21:38:31 +00:00
Paul Cornett
38442edb48 Remove unnecessary declarations.
Contrary to the comment, they are not used often, in fact only once each
and in the same file.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-30 16:14:11 +00:00
Jouk Jansen
a41115011c correcting typo in commit 63803
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-30 12:02:16 +00:00
Jouk Jansen
7126436ab4 Defining wxCOMPILE_TIME_ASSERT for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-30 11:54:37 +00:00
Robin Dunn
9e96e16fe0 Apply patch (plus some additional changes) upgrading Scintilla to version 2.03. Closes #11765, #11748, #11346
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-30 03:50:06 +00:00
Francesco Montorsi
a7d354c6d7 better docs for Get/SetLabel methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 21:31:27 +00:00
Vadim Zeitlin
af9b20332c Fix compilation breakage in r63783.
Added missing #endif.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 21:24:44 +00:00
Vadim Zeitlin
97aa1a74db Only allow opening existing files in docview framework.
Use wxFD_FILE_MUST_EXIST when asking the user for the name of the file to
open.

Closes #11866.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 21:24:39 +00:00
Vadim Zeitlin
e7678d7d03 Add wxUSE_FSWATCHER dependency on wxUSE_THREADS for wxMSW.
wxFileSystemWatcher implementation uses threads under MSW and can't be
compiled when wxUSE_THREADS==0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 20:57:41 +00:00
Jaakko Salli
e954958f98 For better support of wxValidators, invoke wxValidator::Validate() directly. Also remove obsolete flag wxPG_FL_VALIDATION_FAILED and make wxPropertyGrid::DoEditorValidate() virtual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 18:17:55 +00:00
Václav Slavík
c44a49b852 Use fixed screen DPI of 96 when printing HTML.
Unlike font sizes, which depend on screen resolution because of weird
wxFont API, pixel sizes used elsewhere (and in particular, for images)
shouldn't depend on screen DPI.

This finally makes the output independent of screen size.

Fixes #10942.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 14:19:06 +00:00
Václav Slavík
5a21001cdd Removed useless wxDisplaySize() calls from wxHtmlPrintout.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 14:18:58 +00:00
Vadim Zeitlin
bd9532a416 Add wxBitmap unit test.
This should have been part of r63774.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 09:59:05 +00:00
Paul Cornett
a89c31bb34 build fix for IRIX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 06:45:00 +00:00
Paul Cornett
ad4a907bb7 non-pch build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 06:44:16 +00:00
Paul Cornett
f089940f68 Reverse hierarchy of wxPizza GdkWindows
widget->window must be topmost in order for GTK+ to calculate DND drop coordinates correctly
fixes #11834


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-29 01:16:06 +00:00
Vadim Zeitlin
27297c823a Implement wxMask copy ctor for wxGTK.
Without copy ctor copying masks simply crashed because the same pointer was
deleted twice.

Also added a (completely trivial but better than nothing...) unit test for
wxBitmap to check that copying masks does work now.

Closes #11854.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 23:20:49 +00:00
Vadim Zeitlin
6f4968ce94 Suppress gcc warnings about double to int conversion.
This change might actually make the code more correct as well although in
practice it probably doesn't change anything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 23:20:41 +00:00
Vadim Zeitlin
eb08702932 Fix bug in wxMBConv_cf::FromWChar() in OS X.
Apparently CFStringGetBytes() doesn't always behave as expected, work around
this by checking that the returned buffer size is not greater than the size we
passed in.

Closes #11859.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 22:39:39 +00:00
Vadim Zeitlin
d16ba4644a Clarify wxMenu objects allocation rules.
Make it clear that only the menu directly passed to wxWindow::PopupMenu()
doesn't need to be allocated on the heap and that its submenus still do.

Closes #11851.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 22:39:32 +00:00
Francesco Montorsi
7517dcb56e no real changes: just a small optimization on wxStaticText::DoSetLabel() to avoid altering m_labelOrig there (it's already modified by SetLabel(), no need to change it twice)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 22:23:38 +00:00
Václav Slavík
fa79415135 wxHTML: Support percentage width in IMG tag.
(Patch #11800 by lpoujoulat) Fixes #11800.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 17:55:51 +00:00
Václav Slavík
b37dacdca6 Fix UTF-8 string storage in constant: use unsigned char.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 17:52:19 +00:00
Václav Slavík
3eadb6d5e6 Reverted wxFileSystem support in wxLocale.
The implementation was broken in numerous ways. URLs were corrupted in
search paths thanks to use of wxFileName for normalization. Lookup of
catalogs was broken, because ":" in URLs were interpreted as path
separators. Asserts occured because filenames were (incorrectly!)
interpreted as URLs.

Will replace with proper implementation.

See #8793, #11491.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 15:41:41 +00:00
Václav Slavík
55129143a1 Fix wxFileSystem::FileNameToURL() for Unicode file names.
If filename with non-ASCII characters was encoded, resulting URL
contained non-ASCII characters. But URLToFileName() expected the
input to be in UTF-8. This change fixes it by using UTF-8 for
file: URLs in FileNameToURL() too.

Fixes #11491.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 15:41:35 +00:00
Václav Slavík
abd5e008f1 Add test wxFileSystem::FileNameToURL,URLToFileName roundtrip with
Unicode filenames.

See #11491.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 15:41:29 +00:00
Václav Slavík
d4a58a7ce5 Preserve m_skipped in wx[Var]ScrollHelperEvtHandler::ProcessEvent.
If the event was skipped and not processed, its "skipped" status would
be lost.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 14:37:30 +00:00
Vadim Zeitlin
e9c4f54ef3 Fix compilation of wx/debug.h when it's the first wx header to be included.
We must include wx/dlimpexp.h from wx/debug.h to be able to forward declare
wxString and wxCStrData using WXDLLIMPEXP_FWD_BASE, otherwise compilation
errors occur in the code which includes wx/debug.h as the first wx header.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-25 20:08:05 +00:00
Vadim Zeitlin
94dc70d190 Allow overriding print preview frame creation in docview.
Add a virtual wxDocManager::CreatePreviewFrame() which can be overridden to
customize the print preview used by docview framework.

Closes #11390.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-25 20:07:58 +00:00
Jaakko Salli
18e543ea9d Fix focus at the end of a property label edit (needed at least for wxGTK)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-25 15:55:01 +00:00
Jaakko Salli
ad2db6f8ea In wxPropertyGrid::HandleCustomEditorEvent(), ignore events coming from a label editor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-25 15:40:27 +00:00
Jouk Jansen
e1cf09d918 Updates to make wxWidgets compaile on OpenVMS again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-25 11:16:32 +00:00
Paul Cornett
d26cb76b58 better fix for #11803, don't set iconized state for hidden window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-23 17:58:03 +00:00
Paul Cornett
3c7620f666 ignore iconized state when computing client size for GetBestSize(), fixes #11803
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-23 17:19:02 +00:00
Jouk Jansen
8c6a2d5ccd Adding keyboard sample to OpenVMS makefiles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-23 15:14:25 +00:00
Vadim Zeitlin
4311588bfe Implement wxDocument::Revert() and show its use in the sample.
wxDocument::Revert() method existed but didn't do anything, provide a
default implementation for it. Also document it and show it in the sample.

Closes #11849.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-23 10:49:51 +00:00
Vadim Zeitlin
cf30eac295 Always call wxView::Close() when closing it.
After wxDocView refactoring the behaviour has changed and wxView::Close() and
hence user-overriddable OnClose() called from it) was only called if the close
event could be vetoed. This broke code which relied on OnClose() being
executed in any case to perform some cleanup and was incompatible with 2.8 so
restore the old behaviour now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-23 10:36:36 +00:00
Julian Smart
09783f72d4 Fixed ordering bug that caused an assertion because symbol list control wasn't set to unicode yet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-23 08:59:52 +00:00
Vadim Zeitlin
c24309dabd Add uiaction sample to the list of samples to build if enabled.
The uiaction sample was never built under Unix, do add it to SAMPLES_SUBDIRS
to enable building it if wxUSE_UIACTIONSIMULATOR==1.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 22:56:26 +00:00
Vadim Zeitlin
1448054061 Let uiaction sample compile even if wxUSE_UIACTIONSIMULATOR==0.
There is no way to exclude the sample from the build under Windows so make it
compile and link even if wxUSE_UIACTIONSIMULATOR==0 but just give an error
message on startup in this case instead of working as expected.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 22:56:22 +00:00
Vadim Zeitlin
7633bfcd68 Clarify wxDateTime::ParseDateTime() semantics: it needs both date and time.
Correct documentation and also remove unnecessary initialization of variables
and comments in the function itself.

See #11846.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 22:56:17 +00:00
Vadim Zeitlin
b66a68884d Temporarily disable wxFileSystemWatcher unit test under OS X.
This tests hangs and never finishes, disable it for now to allow buildbot to
at least run the other tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 16:08:44 +00:00
Jaakko Salli
e948e2140f Fixed RefreshRect() call in wxPropertyGrid::DrawItems() to use physical window coordinates instead of logical grid ones
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 16:07:45 +00:00
Vadim Zeitlin
976e63a7a8 Fix wxOSX compilation without PCH.
Explicitly include wx/nonownedwnd.h as we use wxNonOwnedWindow in this file.

Closes #11833.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 11:40:40 +00:00
Vadim Zeitlin
9b7e022676 Add wxUSE_UIACTIONSIMULATOR and turn it off by default.
Disable the recently added wxUIActionSimulator class until the issues with it
mentioned at http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/119792/
are fixed.

Also use "" around wx headers instead of <> in wx code itself.

See #11801.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 11:40:35 +00:00
Vadim Zeitlin
75738bb65b Don't enter an infinite loop if a spacer with min size of -1 is used.
Sizer layout algorithm broke down if min size of an item happened to be -1,
i.e. the same value as we use as a sentinel for indicating that the min size
hasn't been fixed yet. It doesn't make much sense for min size to be negative
in the first place but currently this can happen at least for spacers so deal
with it here by ensuring that the min size we use is positive.

Closes #11842.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 11:40:26 +00:00
Vadim Zeitlin
e0856740af Fix the selection validity check in wxSingleChoiceDialog.
Fix the typo ("> 0" was used instead of ">= 0") introduced in r63731.

Closes #11844.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 11:40:19 +00:00
Francesco Montorsi
32ee98eb76 reorder GetLabel(), GetLabelText(), SetLabel() and SetLabelText() function declarations, implementations and relative documentations.
Add wxStaticTextBase::GetLabelWithoutMarkup() and use it in the wxMSW implementation of wxStaticText::SetLabel() to close bug #11446; the function RemoveMarkup() which was previously used in fact could not check for presence/absence of wxST_MARKUP style since it's a static function.

Add wxStaticTextBase::SetLabelText() functions for symmetry with wxControlBase::SetLabelText()

Add test unit for both wxControl::*Label* and wxStaticText::*Label* functions.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-21 21:39:15 +00:00
Vadim Zeitlin
90497db95b Correct wxFILTER_DIGITS handling broken by r63582.
The fix in r63582 accidentally omitted the "!" in wxFILTER_DIGITS check.

Restore it.

Closes #11838.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-21 11:06:36 +00:00
Vadim Zeitlin
697f4a966e Add initial selection parameter to wxGetSingleChoice() functions.
Allow to easily specify the initially selected item.

Closes #11749.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-21 11:06:31 +00:00