Commit Graph

51862 Commits

Author SHA1 Message Date
Vadim Zeitlin
85edc04591 Rearrange xrc sample controls in alphabetical order.
Several new pages were added in random positions, rearrange them to be in
alphabetical order.

Also remove wxToolBar from "The Rest" page as it is shown in one of the other
pages now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 14:34:05 +00:00
Vadim Zeitlin
40730ad17d Make it easier to define custom wxSizerXmlHandler subclasses.
No real changes but refactor wxSizerXmlHandler to make it easier to derive
from it by adding virtual IsSizerNode() and DoCreateSizer() methods. To add
support for a custom sizer class you only need to override them in
wxSizerXmlHandler subclass now.

Also document wxSizerXmlHandler which was not documented at all previously.

Closes #11845.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 14:33:58 +00:00
Vadim Zeitlin
8ec22772d0 Make wxXmlResourceHandler::IsOfClass() static.
This simple helper function doesn't use any wxXmlResourceHandler data as it's
just a trivial wrapper for wxXmlNode::GetAttribute().

Making it static allows, in particular, to call it from const member functions
of wxXmlResourceHandler-derived classes (making it "const" itself would
achieve this too, of course, but it just doesn't need to be non-static).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 14:23:56 +00:00
Vadim Zeitlin
9b307a69b3 Add wxIcon::GetSize() to wxIcon in wxOSX.
This fixes the compilation errors under OS X after r65884 due to the lack of
this method there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 21:47:22 +00:00
Vadim Zeitlin
c5d7b7d20b Don't use non-existent icon in XRC sample.
appicon.xpm was removed so use another icon in the controls demo in the sample
instead, it doesn't matter which one we use anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 18:56:37 +00:00
Vadim Zeitlin
4689441b05 Add XRC handler for wxToolbook.
Closes #11615.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 18:56:28 +00:00
Vadim Zeitlin
fe97acf0e3 Don't assume any particular default size for XRC image lists.
Let the image list deduce its size from the first bitmap in it. This is better
than the old behaviour of using the standard icon size as it allows to omit
the size from the image lists provided they contain the bitmaps of the same
size.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 18:56:13 +00:00
Vadim Zeitlin
814bfbb9c0 Correct wxDialog::SetAffirmativeId() documentation.
The return value of ShowModal() is the affirmative id and not wxID_OK, of
course.

See ##11413 (specifically comment 5).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 18:56:06 +00:00
Vadim Zeitlin
df191bfe39 Added wxThread::OnKill() and OnDelete() callbacks.
Call OnXXX() from wxThread::Kill() and Delete() respectively to allow the
thread being terminated perform some cleanup.

Closes #9046.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:10:12 +00:00
Vadim Zeitlin
ec2c85bf79 Construct paths using wxFileName in wxHTML help.
Use wxFileName instead of more complicated and error-prone manipulations with
strings.

Closes #12602.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:10:05 +00:00
Vadim Zeitlin
7f75598947 Use rpmbuild to build the RPMs in "make rpm" target.
In recent versions of rpm rpmbuild must be used for building the RPMs instead
of rpm itself.

See #12567.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:09:57 +00:00
Vadim Zeitlin
b3706b40d2 Add more headers to "make dist" and remove .mo files.
Add wx/persist headers to the list of files used by "make dist" and remove the
message catalogs which shouldn't be part of the source distribution.

See #12567.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:09:49 +00:00
Vadim Zeitlin
f5ee20ccd3 Include wxscintilla library in wxGTK RPM.
Include libwxscintilla.a for static linking.

See #12567.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:09:43 +00:00
Vadim Zeitlin
7a2c0dd904 Generate the full list of wxBase headers paths in wxGTK.spec.
Instead of hardcoding the list of wxBase headers path, build it automatically
from the list of their base names which is generated by bakefile and so is
always up to date.

See #12567.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:09:39 +00:00
Vadim Zeitlin
a2d2cb04ee Force the use of GNOME printing support and wxMediaCtrl in wxGTK RPMs.
Explicitly enable the use of GNOME printing and media control to ensure that
RPMs are always created with these features enabled.

See #12567.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:09:34 +00:00
Vadim Zeitlin
bae3556dbf Remove "release" suffix from wx-config links used in RPMs.
We don't distinguish debug and release builds under Unix any more in 2.9 and
don't use "release" and "debug" suffixes in full wx-config names. Remove these
suffixes from the wx-config links created by RPM post-installation step.

See #12567.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:09:27 +00:00
Vadim Zeitlin
1bcde56c8d Document that wxProcess::GetOutputStream() can't be used after CloseOutput().
As closing the output stream makes it unusable, it is destroyed as well and so
GetOutputStream() returns NULL after calling CloseOutput().

Closes #12605.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:09:21 +00:00
Robert Roebling
e3d358bbe4 wxDataViewCtrl::Expand() only works on items whose parents are already
expanded. The attached patch fixes this by expanding all ancestors of the
 item before expanding the item itself. Closes #12585: wxDataviewCtrl::Expand() needs to expand all ancestors

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:03:18 +00:00
Robert Roebling
3d9bff2f13 Set focus to generic wxDataViewCtrl when clicking with any mouse button, not just left, closes #12586: wxDataviewCtrl only gets focused on left mouse
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 14:00:15 +00:00
Robert Roebling
cd7715602b Implement wxDataViewCtrl::HitTest() under GTK+, second part of #12582: enhancing wxDataViewCtrl, closes #12582
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 13:53:31 +00:00
Robert Roebling
08a379c575 Also set mouse position in ITEM_BEGIN_DRAG event in wxDataViewCtrl under GTK+, part of #12582: enhancing wxDataViewCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-23 13:48:15 +00:00
Michael Wetherell
0dffa8059d Change the return code of the test program so that aborting a test with an
exception doesn't count as a failure, to provide a way to skip tests that
can't be performed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 22:15:07 +00:00
Michael Wetherell
c5084fff34 Add debugging info to the trunk Linux builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 22:12:00 +00:00
Vadim Zeitlin
3b5c96639b Enable ListBoxTestCase::HitTest() for wxGTK.
wxListBox::HitTest() does work in wxGTK but we need to realize the control
before using it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 16:33:43 +00:00
Vadim Zeitlin
5effc1cf58 Restore the note about auto-repeat in key events documentation.
Closes #12598.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 16:33:38 +00:00
Vadim Zeitlin
1d91908363 Use GTK_SELECTION_BROWSE instead of SINGLE for wxListBox in wxGTK.
A single-selection listbox must always have a selected item, at least after
initial selection is done, i.e. its selected item can't be deselected. This
behaviour corresponds to GTK_SELECTION_BROWSE style in GTK+.

Closes #2549.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 16:33:29 +00:00
Vadim Zeitlin
a0fe77034b Fixes for calling Enable() on children of a disabled TLW in wxMSW.
The change of the child window state wasn't reflected immediately if it was
done while the TLW itself was disabled but only happened when it was
reenabled and in some cases the child could not be enabled even then.

Fix this by updating the child state immediately, even when its TLW parent is
disabled and only skip the update of the children state when TLW is being
disabled, not when it's enabled back.

Closes #11622.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 14:17:48 +00:00
Vadim Zeitlin
1af292a686 Use single BeforeLast() call in wxConfigPathChanger ctor.
Use a single BeforeLast() call with the "rest" argument and avoid calling
AfterLast() laster in wxConfigPathChanger ctor.

This is a small optimization which may count because wxConfigPathChanger is
used in a lot of wxFileConfig functions but, even more importantly, this works
around a bug in g++ 4 optimized build when the name was not filled by
AfterLast() call correctly as apparently the optimizer decided it was not
used. The real cause of this compiler bug was difficult to find as it couldn't
be reproduced in a simple test case but this change avoids it and fixes
wxFileConfig unit test in optimized build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 14:17:42 +00:00
Vadim Zeitlin
6becc1e617 Added "rest" argument to wxString::Before{First,Last}().
This allows to search the string just once, in BeforeXXX(), when both the
parts of the string before and after some character are needed instead of
having to do it twice in both BeforeXXX() and AfterXXX().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 14:17:37 +00:00
Vadim Zeitlin
f48a115976 No real changes, just use const_cast<> instead of C casts.
Replace many comments indicating that the C cast used was really a
const_cast<> with the proper cast itself. There is no reason to not use it any
longer, all the supported compilers understand it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 14:17:30 +00:00
Vadim Zeitlin
9513aa80ce Don't add quotes to string representation in gdb.
gdb adds quotes itself around string values so don't duplicate them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-22 14:17:22 +00:00
Vadim Zeitlin
53dfbfa5c9 Add missing comparison operator declarations in wxString::iterator.
Fix compilation in !wxUSE_UNICODE_UTF8 case after r65857.

Modify the second declaration of wxString::iterator class which was not
updated by the previous commit in the same way, i.e. add declaration of
comparison operators taking const_iterator to iterator class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-21 19:51:40 +00:00
Vadim Zeitlin
51c30bca93 Document the meaning of wxToolBar tool id more clearly.
Make it clear that the id is the same one as was passed to AddTool().

Closes #12597.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-21 19:44:23 +00:00
Vadim Zeitlin
bdb40fa63e Implement comparisons between wxString::iterator and const_iterator.
Only comparisons between const_iterator and iterator worked before (because of
implicit conversion from the latter to the former), implement the ones in the
other direction explicitly now.

Closes #12594.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-21 19:22:33 +00:00
Vadim Zeitlin
53cdd2c11d Add XRC handler for wxCommandLinkButton.
Added a handler for wxCommandLinkButton class and a demo of it in the xrc sample.

Closes #12593.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-20 23:11:20 +00:00
Vadim Zeitlin
528f2a25ca Merge wxBitmapButton and wxButton panels in the xrc sample.
There are already way too many pages in the "Controls Example" in the sample,
combine wxBitmapButton and wxButton ones to save some space and make it more
usable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-20 23:11:09 +00:00
Vadim Zeitlin
4d9d127f45 Correct the fix that broke wxRegion::ConvertToBitmap().
The changes in r64874 were incorrect and made the size of the bitmap even
more wrong than before. Fix it correctly now by just adding 1 extra pixel to
the size of the bitmap used in the original (pre-r64874) version.

Closes #12213.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-20 23:11:04 +00:00
Peter Cawley
140091e55c Improve support for ribbon panel sizers: panels with sizers should now automatically minimise at small sizes, and behave properly when popping up from a minimised state.
Patch by johnr in trac issue #12580.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-20 17:49:42 +00:00
Michael Wetherell
ab3332517f Check for window manager before running GUI tests on unix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-20 13:08:32 +00:00
Vadim Zeitlin
02a4d0b7a0 Change wxSP_XXX flags values to avoid clashes with wxTE_XXX.
wxSP_ARROW_KEYS conflicted with wxTE_AUTO_URL (which was probably not
important in practice as URLs don't appear in spin controls anyhow) and wxSPWR
conflicted with wxTE_NOHIDESEL (which could conceivably be a problem).

Change their values to reuse the bits of wxTE_CHARWRAP and wxTE_RICH2 neither
of which definitely makes sense for a spin control.

Closes #11461.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-18 23:43:25 +00:00
Vadim Zeitlin
1780a38b7b Use unsigned char for XBM bitmaps data.
This fixes compilation with g++ in C++0x mode in which conversions of
constants not fitting into signed char range to char are not permitted.

Closes #12575.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-18 23:43:20 +00:00
Vadim Zeitlin
40f48834fc Correctly handle S_FALSE return value of IActiveMovie::get_Duration().
IActiveMovie::get_Duration() can return S_FALSE in which case outDuration
isn't initialized and so wxAMMediaBackend::GetDuration() would return a
completely wrong value.

Fix this by returning 0 from it instead which seems like the only reasonable
thing to do (in the absence of documentation of this interface it's not really
clear what does S_FALSE return value mean nor why didn't it return it before).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-18 23:43:14 +00:00
Vadim Zeitlin
a8b3cea302 Correct recently broken checked state handling in wxRearrangeList.
The checked state of them wasn't preserved correctly any more since r64875,
correct this by changing the state only after storing the old one.

Closes #12578.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-18 23:43:09 +00:00
Vadim Zeitlin
bb7cd76766 Add missing "static" to wxSystemOptions::SetOption() documentation.
Closes #12576.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-18 23:43:02 +00:00
Jaakko Salli
769ede722a Call wxScrollHelper::AdjustScrollbars() to fix scroll bar setup that broke after wxPropertyGrid was changed to inherit from wxScrollHelper instead of wxScrolledWindow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-18 13:55:40 +00:00
Vadim Zeitlin
35f8d83dbb Fix wxSTC compilation without wxUSE_DRAG_AND_DROP after r65827.
Correct the changes of r65827 to also compile with wxUSE_DRAG_AND_DROP==0
(especially important for the ports without dnd support such as wxX11 and
wxDFB).

Also do the changes in the correct files, i.e. src/stc/stc.{h,cpp}.in and not
in the generated files themselves to prevent them from being overwritten the
next time gen_iface.py is ran.

Finally keep backwards compatibility as SetDragAllowMove(bool) is a public
method so preserve its old semantics and add a new SetDragFlags() instead of
silently breaking the existing code using SetDragAllowMove().

See #11709.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-17 18:17:30 +00:00
Michael Wetherell
5f8bf0ee6f Disable the Mingw x64 builds as there's no compiler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-17 14:06:30 +00:00
Vadim Zeitlin
dbd92d3d0c No real changes, just fix a warning in the test suite.
Don't assign wxNO_LEN to int variable, this results in gcc warnings about
overflow in implicit constant conversion.

Use size_t for the variable containing string length to fix it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-17 13:59:55 +00:00
Vadim Zeitlin
e3cd024e85 Revert the changes of r65826 in wxConvertToGTK().
This is not necessary any longer after the previous commit which changed
cMB2WC() to not return NULL for empty input.

See #12432.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-17 13:59:48 +00:00
Vadim Zeitlin
cfcfada96e Return valid buffer from wxMBConv::c{MB,WC}2{WC,MB} for empty input.
Returning invalid buffer for empty input is unexpected and resulted in e.g.
wxString::utf8_str() returning NULL and not "" in ANSI build for empty strings
(which, in turn, resulted in crashes in the test suite and undoubtedly not
only) as well as crashes when calling GTK+ functions (see #12432). Other uses
of cMB2WC() also show that NULL return value from it is unexpected as it is
often passed to CRT functions not accepting NULL.

So return empty buffer instead for empty input to avoid all these problems.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-17 13:59:42 +00:00