Commit Graph

52120 Commits

Author SHA1 Message Date
Vadim Zeitlin
254f9b4c3c Fix conversion of 32 bit ARGB bitmaps to wxImage in wxMSW.
wxDIB::m_hasAlpha can't be trusted when the DIB was loaded from a file so
don't rely on it in wxDIB::ConvertToImage(). Instead, suppose that 32 bpp
bitmaps do have alpha channel and only get rid of it at the end of conversion
if it turns out that all alpha values were 0.

Closes #10133.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 22:40:22 +00:00
Vadim Zeitlin
c8ecb454c6 Don't hard code "open" verb in wxMSW wxLaunchDefaultApplication().
Don't choose the verb explicitly and let ShellExecuteEx() choose the default
one. In the vast majority of cases this will do the same thing but if some
file type doesn't have an "open" verb the new version will still open it
correctly using its default verb while the old version failed.

See #10707.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 22:40:17 +00:00
Vadim Zeitlin
164db92c14 Add support for specifying child process cwd and env to wxExecute().
Add an optional wxExecuteEnv parameter to wxExecute() which allows to specify
the initial working directory and custom environment for the child process.

Closes #12163.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 22:40:11 +00:00
Vadim Zeitlin
fab8784c71 Treat wxToolbook symmetrically with others in the notebook sample.
Use wxToolbook as the default notebook type if the other ones are not
available.

Closes #12610.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 22:40:01 +00:00
Vadim Zeitlin
448ca22809 Don't reserve space for hidden controller in wxBookCtrl.
Even when the controller was hidden, space was still allocated for it by
wxBookCtrl. Fix this by only reserving extra space when the controller is
shown.

Closes #12609.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 22:39:55 +00:00
Vadim Zeitlin
5995a84fcf Set wxKeyEvent::m_rawFlags to hardware key code in wxGTK.
The raw flags were previously unused in wxGTK but hardware key code is an
important information which may be useful to the application, so pass it in
the flags (this is rather symmetric with passing lParam in it under MSW as
lParam contains the scan code, among other things).

Also document the meaning of raw key code and flags in all the major ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 14:34:45 +00:00
Vadim Zeitlin
21567b0960 Output header to the same directory as the .cpp file in wxrc.
If "-o" option is given, generate the output header file in the same directory
as the .cpp file and not in the current directory.

Closes #4054.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65892 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 14:34:22 +00:00
Vadim Zeitlin
7c4e16e698 Use wxChoicebook instead of wxNotebook in the xrc sample.
wxNotebook was unusable with so many pages under all platforms and completely
unusable under Mac. Replace it with wxChoicebook which allows to select any
page quickly instead of having to do it sequentially (or not being able to do
it at all under Mac).

Another possibility could be to use wxTreebook and organize the pages in
categories, similarly to how it is done in the widgets sample.

Closes #3699.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-24 14:34:12 +00:00
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