Commit Graph

56156 Commits

Author SHA1 Message Date
Vadim Zeitlin
06b4c6ebd2 Remove wxAUI dependency on wxXML as it doesn't depend on it.
Don't include wxAUI -> wxXML dependency in the libraries diagram in the
manual.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 18:21:54 +00:00
Vadim Zeitlin
0fccda2ced Respect wxFileName::DontFollowLink() in wxFileSystemWatcher.
Watch the link itself and not its target if DontFollowLink() had been called.

Closes #14543.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 18:21:31 +00:00
Vadim Zeitlin
d2a02746c6 Make wxDateTime invalid after Set((time_t)-1) call.
Closes #14776.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 14:02:30 +00:00
Vadim Zeitlin
81ec048ab9 Close wxLogWindow automatically if it's the last remaining TLW.
Don't keep the application opened just because a log window is shown.

Closes #14775.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 14:02:08 +00:00
Vadim Zeitlin
2ff86a86a7 Add wxVector::assign().
Closes #14703.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 14:01:44 +00:00
Julian Smart
9740c1afc8 Updated Lativan translation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 13:13:19 +00:00
Vadim Zeitlin
103d838eff Don't use std::min(), it's not available everywhere.
Fix compilation using Sun CC under Solaris.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 00:25:31 +00:00
Vadim Zeitlin
073d9e0f26 Don't use Shift-TAB in keyboard test.
This key combination seems to be intercepted by GTK now for keyboard
navigation purposes and we never get key up events for it. Just use a
different key.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 00:25:09 +00:00
Vadim Zeitlin
8f6bb2602b Disable wxEvtHandler::CallAfter() for VC6, it's too broken for it.
There is no clear way to implement wxRemoveRef() for VC6 so just disable it,
and CallAfter() as it relies on it, for this compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 00:17:15 +00:00
Vadim Zeitlin
25db2c25bc Don't follow symlinks in wxFileName::Rmdir(wxPATH_RMDIR_RECURSIVE).
Following symlinks, possibly leading outside of the directory being removed,
is at best surprising and at worst dangerous, so don't do it and just mimic
the behaviour of "rm -rf", i.e. remove everything inside this directory,
including the symlinks themselves, but don't follow them.

Closes #14649.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 23:58:17 +00:00
Vadim Zeitlin
0f57172b93 Mention wxFILE_EXISTS_NO_FOLLOW in wxFILE_EXISTS_SYMLINK description.
Using wxFILE_EXISTS_SYMLINK without wxFILE_EXISTS_NO_FOLLOW can only be
fruitless, so mention that they should normally be used together in the
documentation.

An alternative solution would be to always add wxFILE_EXISTS_NO_FOLLOW
automatically if wxFILE_EXISTS_SYMLINK is used, perhaps we should do this
instead.

See #14542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 23:57:54 +00:00
Vadim Zeitlin
c55f46d0a1 Add wxDIR_NO_FOLLOW flag for wxDir iteration.
This flag allows to avoid following the symbolic links during the directory
traversal. In particular, this means that links to the directories
(potentially outside the directory being traversed) are not considered as
directories at all when it is used, potentially avoiding surprises.

Closes #14542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 23:57:32 +00:00
Vadim Zeitlin
6bf11d6720 Change the way directory iteration flags are constructed.
Instead of explicitly constructing the flags from the flags that should be
included, construct them by excluding the flags that shouldn't be used. This
makes the code more stable in the sense that it will continue to work when new
flags, such as the upcoming wxDIR_NO_FOLLOW, are added.

See #14542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 23:57:07 +00:00
Paul Cornett
e264485aac non-pch build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 17:29:32 +00:00
Paul Cornett
856cad9ac7 Minor changes to some comments
remove ambiguous "only"
procession --> processing


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 17:28:43 +00:00
Vadim Zeitlin
65e9e9c303 Fix for PCH-less compilation of wxRibbonXmlHandler.
Need to have wxMenu declaration in order to wxDynamicCast() to it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 14:30:23 +00:00
Vadim Zeitlin
3f6a19ffab Guard gmake-specific syntax with IF_GNU_MAKE in make_dist.mk.
Debian distribution target uses GNU make extensions to make syntax which makes
the entire makefile impossible to use with other make versions, e.g. Solaris
make.

Fix this by prepending IF_GNU_MAKE to all Debian-specific lines, there should
be never any need to use them with non-GNU make.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 14:03:53 +00:00
Vadim Zeitlin
74a59798c0 Add support for wxRibbonBar and related controls to XRC.
Add wxRibbonXmlHandler and an example of using it to the xrc sample.

Closes #12058.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 13:52:27 +00:00
Vadim Zeitlin
00b4e7c946 Add support for wxAuiNotebook to XRC.
Add wxAuiNotebookXmlHandler to "aui" library, now that we can do it without
adding a dependency of it on "xrc" one.

Closes #10889.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 13:51:58 +00:00
Vadim Zeitlin
a3b9c43bbc Refactor wxXRC to allow defining handlers outside of xrc library.
Split wxXmlResourceHandler into an ABC and the real implementation to allow
referencing the ABC in the core library itself but without pulling in all of
the XRC into it. This also allows defining XRC handlers, which only depend on
this ABC and not the xrc library, in other libraries, such as richtext, as
demonstrated by the now enabled wxRichTextXMLHandler.

Closes #10996.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 13:51:32 +00:00
Vadim Zeitlin
4dca3e02a6 Define WXDLLIMPEXP_FWD_RIBBON for consistency with all the other libraries.
We defined only WXDLLIMPEXP_RIBBON but not the FWD version, do add it now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 13:51:06 +00:00
Vadim Zeitlin
3496ce18d1 Recognize more XRC elements as containing translatable strings.
This allows to translate the text of these elements in wxrc-generated code
using gettext.

Closes #14765.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 12:06:40 +00:00
Vadim Zeitlin
1ea95c73f8 Add a simple unit test for wxRegion::Intersect().
Check that Intersect() returns true, yet the intersection is empty.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 12:03:09 +00:00
Vadim Zeitlin
709617eec2 Process pending events from wxYield() in wxGTK.
Calling wxYield() is supposed to process the pending events but it didn't, any
more, in wxGTK. Restore this by explicitly calling ProcessPendingEvents() from
wxGTK wxYield() implementation as wxGUIEventLoop::ProcessIdle() does not call
it, in spite of a comment to the contrary in the sources.

Closes #14760.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 12:02:47 +00:00
Vadim Zeitlin
cf2227623a Add wxEvtHandler::CallAfter() for asynchronous method calls.
Add wxAsyncMethodCallEvent that is handled simply by calling the method this
event was created for and add default handler for this event to wxEvtHandler.

Implement CallAfter() overloads for up to 2 parameters only for now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 12:02:24 +00:00
Vadim Zeitlin
32753ae949 Add wx/meta/removeref.h header defining wxRemoveRef<> helper.
This is a very simple template allowing to remove the reference from the given
type, similar to std::remove_reference<>.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-23 12:02:00 +00:00
Vadim Zeitlin
1e30d94eff Fix border size computation in wxAuiTabArt.
Space was reserved for the borders even when it wasn't filled, resulting in
visual artefacts. Fix this by virtualizing the function returning the
additional space needed for the borders and only overriding it to return non
zero in wxAuiGtkTabArt.

Closes #14710.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-22 21:46:46 +00:00
Vadim Zeitlin
fe24e4e9c2 Set C++ global locale too in wxAppTraitsBase::SetLocale().
Ensure that C++ locale matches the C one, otherwise operations on C++ streams
may get much slower because some implementations (notable MinGW-64) change and
reset the C locale on every function call in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-22 15:51:49 +00:00
Vadim Zeitlin
988f7eec77 Revert accidental incompatible change to wxFileName::DirExists().
The non-static version tests for the existence of the directory part of the
object only as is explicitly mentioned in the documentation, so do the test on
GetPath() and not GetFullPath() as we did since r72707.

Also add a unit test for this behaviour.

Closes #14771.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-22 15:51:26 +00:00
Vadim Zeitlin
220dcb1a7f Ensure the correct cleanup order for GDI+-related modules in wxMSW.
GDI+ DLL could be unloaded by wxGdiPlusModule before wxGDIPlusRendererModule::
OnExit() was called, resulting in a crash when trying to call a GDI+ function
from the latter.

Fix this by adding a correct dependency between the modules.

Closes #14769.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-22 11:21:02 +00:00
Vadim Zeitlin
7276c69c1c Remove unnecessary SetInitialSize() from wxGTK wxComboBox::Create().
SetInitialSize() is already done by PostCreation() called just above, no need
to call it twice.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-21 20:48:54 +00:00
Steve Lamerton
8626e0b73d Explicitly unregister custom wxWebViewIE namespaces when we are done with them. Also add a missing ClassFactory::AddRef.
Closes #14749

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-21 20:33:48 +00:00
Vadim Zeitlin
a5f013566f Check the return value of system() and pipe() in the test suite.
This is mainly to avoid -Wunused-result warnings under recent Linux systems
but also could give valuable information if the call does fail.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-20 14:49:13 +00:00
Vadim Zeitlin
4213fd51cc Fix tests compilation in STL build after r72707.
Add an explicit call to wxString::c_str() as there is no implicit conversion
in STL build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-20 14:48:50 +00:00
Vadim Zeitlin
53a142be94 Nepali translation update from Him Prasad Gautam.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-20 12:04:51 +00:00
Vadim Zeitlin
d57d0505d4 Update header control when wxPropertyGridManager is resized.
Closes #14762.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 22:03:47 +00:00
Vadim Zeitlin
5a3eee0dba Allow specifying all wxFlexGridSizer parameters in XRC.
Add support for specifying flexible direction, grow mode in non-flexible
direction and row/column proportions for the growable ones.

Closes #14767.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 22:03:25 +00:00
Vadim Zeitlin
9f5103f1fd Add more error checks to XRC handler for longs, doubles and fonts.
Verify that the values in the XRC really conform to the expected type.

Closes #14766.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 22:03:01 +00:00
Vadim Zeitlin
15b467a57f Add missing styles support to wxWindow XRC handler.
wxBORDER_RAISED, wx[HV]SCROLL and a few extended styles were not recognized.

See #14766.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 22:02:38 +00:00
Vadim Zeitlin
c50db84779 Allow testing for existence of specific file types in wxFileName.
Add "flags" parameter to wxFileName::Exists() to allow testing for the
existing of files of specific type: not only regular or directory but also
symlink, device, FIFO or socket.

And also to pass wxFILE_EXISTS_NO_FOLLOW flag inhibiting following the
symlinks without using DontFollowLink().

Closes #14542.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 22:02:15 +00:00
Vadim Zeitlin
4f21fcb1ae Remove assert checking for valid font in wxMSW wxDC::GetTextExtent().
It wasn't there before wxTextMEasure changes and it doesn't seem obvious why
should it be there, it should be possible to measure the text using the
default wxDC font without setting one explicitly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 11:06:14 +00:00
Vadim Zeitlin
b93bc51ed9 Declare MeasuringGuard as friend in wxTextMeasureBase.
This should hopefully fix VC6 compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 10:43:20 +00:00
Vadim Zeitlin
a6b40a9aa2 Invalidate wxGrid best size when the grid is changed.
Don't keep using the cached best size if rows/columns are added/removed
to/from wxGrid or resized, doing this meant that we always used the first
computed best size which was way too small after adding rows/columns to the
grid.

There could be more places where the grid best size may need to be invalidated
but this should be a good start.

Closes #14761.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-19 10:42:57 +00:00
Vadim Zeitlin
1e9b3eff21 Fix bug in wxFileName::Exists("/").
Don't remove too many trailing slashes, the lone slash of "/" should remain.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-18 23:41:08 +00:00
Robin Dunn
88f70d8c0e non-pch build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-18 18:35:15 +00:00
Paul Cornett
a1624575a3 non-pch build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-18 05:06:29 +00:00
Vadim Zeitlin
bb996f2895 Fix crash in wxDC::GetMultiLineTextExtent() after last commit.
Don't call wxTextMeasure::DoGetTextExtent() with NULL width pointer, it now
supposes that both width and height pointers are non-NULL.

Add at least a trivial unit test for GetMultiLineTextExtent().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 23:06:07 +00:00
Vadim Zeitlin
8cd79b7af0 Factor out text measurement from wxDC and wxWindow into wxTextMeasure.
Add a new private wxTextMeasure class implementing methods for measuring text
and move the often duplicated (but not always identically) code for doing the
same from wxDC and wxWindow into it.

Currently this class is only really implemented in wxMSW and wxGTK.

Also extend the test for text measuring functions and rename it to
MeasuringTextTestCase from MeasuringContextTestCase as it's not wxGC-specific
any more.

Closes #14705.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 22:35:49 +00:00
Vadim Zeitlin
28dc9371d1 Remove unused code from MeasuringContextTestCase.
m_win variable was never used and setUp() and tearDown() were simply not
needed here.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 22:35:21 +00:00
Vadim Zeitlin
ccc040255c Fix wxGrid editors background painting.
There were two fundamental problems: first, we painted on a separately created
wxClientDC instead of using the wxPaintDC already available in wxGrid. Second,
we invalidated the control while painting, resulting in endless repainting, at
least under wxGTK.

Fix the first problem by passing wxDC to wxGridCellEditor::PaintBackground()
and the second one by not refreshing the control from there as it just seems
unnecessary.

Also pass the attribute by reference for consistency with
wxGridCellRenderer::Draw() and because this pointer can never be NULL.

Closes #2628.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-17 16:44:02 +00:00