Commit Graph

50590 Commits

Author SHA1 Message Date
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
Vadim Zeitlin
be103d4a3d Don't leak m_protocol in wxURL.
Destroy the old protocol before creating it anew in ParseURL().

Closes #11796.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-21 11:06:26 +00:00
Jaakko Salli
46291feecd Make wxPGVFBFlags an unsigned char define instead of wxByte typedef (easier time for wxPython bindings)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 14:08:34 +00:00
Vadim Zeitlin
947c91dae1 Remove obsolete parts of wxPageSetupDialog documentation.
Don't speak about features "new" in Windows 95 nor 4.0 any more (what next,
discussion of wxWidgets limitations when running on an abacus?) but do mention
that this dialog is native under all major platforms now.

Closes #11820.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:18:28 +00:00
Vadim Zeitlin
a4578b0ced Add wxMessageDialog::GetEffectiveIcon() and use it in all ports.
Remove code duplication and inconsistencies among different ports by using a
single function in the base class for the determination of the effective icon
style to use, correctly handling both wxICON_NONE and the absence of any
wxICON_XXX styles.

Closes #11822.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:18:23 +00:00
Vadim Zeitlin
5eb342f9a2 Remove unused and empty src/x11/joystick.cpp file.
This was never implemented and is unlikely to ever be. In any case the file
didn't contain anything useful.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:03:09 +00:00
Vadim Zeitlin
679918f93d Rename wxWindow::GetMainWindow() to X11GetMainWindow() in wxX11.
This avoids conflicts with GetMainWindow() defined in other wxWindow-derived
classes (such as wxDataViewCtrl and potentially user-defined classes as well).

Closes #11818.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:03:05 +00:00
Vadim Zeitlin
21867d9888 Fix a couple of harmless unused parameter warnings in wxX11.
See #11818.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:03:00 +00:00
Vadim Zeitlin
e3728f8a8d De-TAB-bed src/x11/pango_x.cpp.
This is necessary in order to be able to check in its modified version in the
next commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 13:02:56 +00:00
Vadim Zeitlin
c514752837 Fix some harmless unused parameter warnings.
These warnings only happen in specific builds (when HAVE_LANGINFO_H and
wxUSE_DISPLAY are undefined/off).

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:47 +00:00
Vadim Zeitlin
26844c729f Check whether SA_RESTART is defined and don't use it if it isn't.
SA_RESTART is not defined for QNX and not only VMS so test for it directly
instead of testing for the platform.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:43 +00:00
Vadim Zeitlin
feedacd880 Include sys/time.h from threadpsx.cpp for all systems.
It's needed by Linux and QNX and shouldn't do any harm under the others.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:39 +00:00
Vadim Zeitlin
7fbff80203 Add support for QNX to dialup detection code.
See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:33 +00:00
Vadim Zeitlin
d141826876 Always include sys/time.h and sys/select.h from selectdispatcher.h.
fd_set used by this header is supposed to be defined in sys/select.h and not
including this header resulted in compilation problems under QNX. And
including sys/time.h shouldn't hurt and is needed by select() under many
systems anyhow.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:28 +00:00
Vadim Zeitlin
ef40c54c63 Define wxGraphicsRenderer::GetDefaultRenderer() for all non-{MSW,Mac} ports.
wxGraphicsRenderer::GetDefaultRenderer() was only defined for wxGTK for some
reason but it needs to be defined in terms of GetCairoRenderer() for all ports
without native renderer implementation, i.e. everything but wxMSW and wxMac.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:23 +00:00
Vadim Zeitlin
636d5f3f23 Remove duplicate variable definition.
The splitterX variable in wxPropertyGrid::HandleMouseMove() was defined twice
with the same value, remove the second definition to avoid warnings about
shadowing the variable in outer scope from some compilers.

See #11817.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-20 12:45:19 +00:00
Francesco Montorsi
d86f721af3 Fix various doxygen warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-19 22:35:30 +00:00
Vadim Zeitlin
60a7194e43 Postpone initialization of owner-drawn menu metrics.
Doing it during globals initialization time didn't work and could even result
in a crash due to dereferencing a NULL wxTheApp pointer.

Closes #11806.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-19 09:57:15 +00:00
Jaakko Salli
28756ab9c5 Clarify documentation for wxPropertyGridEvent::GetProperty()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 17:12:40 +00:00
Vadim Zeitlin
34e3a8105d Return exit code as signed integer from wxExecute(wxEXEC_SYNC).
The caller expects the function to return -1 if the child process exited with
-1 error code and not 255 that was returned before. The function is also
documented as returning -1 if the execution fails which wasn't true neither.

Fix this by explicitly handling the exit code as signed.

Closes #11824.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:51:19 +00:00
Vadim Zeitlin
0772a89875 Ensure that setting wxChoice height to its default value does set it.
Setting wxChoice height to its default value didn't change the height even if
the current height was different from the default. This resulted in problems
when a wxChoice was used inside a wxAuiToolBar because AUI temporarily reduces
the toolbar size to (1, 1) when docking it (thus ensuring that the height of
wxChoice is changed too) and generally didn't make sense.

Fix this by resetting the height to the default value if the value passed to
wxChoice::SetSize() is what it considers to be its default height.

Add a unit test for this bug and also add a wxChoice to AUI sample to allow
testing for wxChoice behaviour inside a wxAuiToolBar being [un]docked.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:39 +00:00
Vadim Zeitlin
3f931438cc Remove wxAuiProportionalBoxSizer hack and replace it with wxBoxSizer.
The temporary workaround due to wxBoxSizer changes in 2.9.0 is not needed any
more, revert r59889 and use wxBoxSizer instead of custom
wxAuiProportionalBoxSizer again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:32 +00:00
Vadim Zeitlin
729f53d421 Fix box sizer layout algorithm to respect both proportions and min sizes.
The new version of the algorithm tries to distribute the entire space
allocated to the sizer among its children, just as the version in 2.8 did,
while still respecting minimal children sizes first and foremost. This means
that the space allocated to the item will always be at least its minimal size
if the total space is at least equal to the sum of minimal sizes of the
children but that if there is enough space, the proportions will be respected
too.

Extended the unit test to check that laying out various combinations of three
elements results in the expected results.

Closes #11311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:24 +00:00
Vadim Zeitlin
a71aeb2426 Ensure that size in the minor direction of box sizer doesn't exceed the total.
This is similar to the previous commit but for the transversal direction of a
box sizer: we could give an item size larger than the size of the sizer itself
making only part of its window visible (and thus potentially making the window
unusable e.g. because the scrollbar wasn't visible at all).

Fix this by always restricting the item size in the minor direction to the
total size available and add a unit test which failed previously and passes
now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:19 +00:00
Vadim Zeitlin
26022721e8 Ensure that size in the major direction of box sizer doesn't exceed the total.
After fixing the problem with "growing items by negative proportion" in r56010
(which still was the correct thing to do as it fixed such indefensibly broken
behaviour as shrinking items with larger proportion by more than "smaller"
items when there was not enough space) the items in a box sizer could become
larger than the total space allocated to the sizer resulting in only parts of
them being visible.

Fix this by truncating the items to the (remaining) total size even if this
means making them less than their minimal sizes -- because there is nothing
else we can do when the total space is smaller than the sum of minimal sizes
anyhow.

Closes #10008.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:14 +00:00
Vadim Zeitlin
869c7a944b Add (a very simple for now) wxBoxSizer unit test.
Only check that layout for a single sizer item works correctly for now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:10 +00:00
Vadim Zeitlin
bbf82147ab Czech translation update from Herbert Breunung.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:02:15 +00:00
Jaakko Salli
6cf5edea27 Use explicit wxPGPropertyFlags enum type with wxPGProperty::SetFlag() and similar member functions (thus preventing use of incorrect set of flags). Also now document wxPGProperty flags.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 18:17:19 +00:00
Stefan Csomor
bf06fbce41 fixing non-precomp builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 09:13:55 +00:00
Stefan Csomor
9aee121225 adding proper removal of observer for stacked event loops, using cfrunloop for console on osx as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 08:05:04 +00:00
Stefan Csomor
80eee8378f streamlining OSX event support third step, using platform specific native run methods for event loops
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-17 07:14:03 +00:00
Robert Roebling
0e92a846e4 Don't use grouping of different methods as this creates confusing output
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-16 19:13:36 +00:00
Vadim Zeitlin
0f1c3d30d4 Add white outline to bulls eye cursor used under MSW.
The cursor used black circles only making it perfectly invisible on black
background. Add a white outline as well to ensure that it can be seen in this
case too, similarly to how it's done for magnifying glass cursor and the same
bulls eye cursor in GTK+.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-16 14:48:02 +00:00
Vadim Zeitlin
459128ac88 Initialize picker style in native GTK file/dir pickers.
This fixes the styles used in the native wxGTK version after changes in
r63654: we must initialize base class m_pickerStyle now and the code didn't do
this before resulting in various asserts and incorrect behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-16 00:23:57 +00:00
Stefan Csomor
293a13bad7 streamlining OSX event support second step, moving pending and idle event handling to runloop-observer, see #11805, see #11797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-15 19:31:57 +00:00
Stefan Csomor
0056673c67 streamlining OSX event support first step, see #11805, see #11797
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-15 15:40:47 +00:00