Steve Lamerton [Mon, 12 Mar 2012 14:57:44 +0000 (14:57 +0000)]
Add new WX_ASSERT_EVENT_OCCURS macro to improve behaviour of testing asynchronous events. Use it in the wxWebView tests and re-enable previously failing tests.
Vadim Zeitlin [Sun, 11 Mar 2012 23:55:19 +0000 (23:55 +0000)]
Update the text part of combobox when changing text of selected item in wxGTK.
Add a call to SetValue() to wxComboBox::SetString() in wxGTK if the item being
changed is the currently selected one. The new behaviour is consistent with
wxMSW and also makes more sense.
Document it too to remove any doubts about what is supposed to happen in this
case.
Vadim Zeitlin [Sun, 11 Mar 2012 23:41:27 +0000 (23:41 +0000)]
Add a test for wxComboBox::SetString() to the widgets sample.
This allows to easily test this function interactively, notably check what
happens when the currently selected string is changed under different ports.
Vadim Zeitlin [Sun, 11 Mar 2012 23:41:16 +0000 (23:41 +0000)]
Document wxBK_HITTEST_XXX values.
They were previously implicitly documented in HitTest() itself but this was
insufficient for wrappers generation as the constants themselves were never
declared. Do define them now and also correct and update their descriptions.
Steve Lamerton [Sun, 11 Mar 2012 14:32:24 +0000 (14:32 +0000)]
Move getting the unit test event count from wxTestableFrame to the EventCounter class. This reduces the need to have wxTestableFrame pointers all over the unit testing code and should reduce bugs caused by counting the wrong events.
Julian Smart [Sun, 11 Mar 2012 05:31:06 +0000 (05:31 +0000)]
A fix for flicker when the top-level window is disabled or enabled (e.g. by modal dialogs).
Achieved by using IsThisEnabled to determine the visual disabled state and thus requiring no refresh on top-level window enabling/disabling.
Vadim Zeitlin [Sat, 10 Mar 2012 14:26:22 +0000 (14:26 +0000)]
Explicitly document wxMessageOutputFlags.
They were already mentioned in wxMessageOutputBest ctor documentation but now
add the standalone enum too to make the documentation header semantically valid.
Vadim Zeitlin [Thu, 8 Mar 2012 13:23:34 +0000 (13:23 +0000)]
Revert the zoom direction on Ctrl-mouse wheel in wxStyledTextCtrl.
The direction of the zoom in wxSTC didn't correspond to the usual conventions
which is to zoom in on Ctrl-Wheel-Up and zoom out on Ctrl-Wheel-Down, while
wxSTC did exactly the converse. Change it to behave as everybody else.
Vadim Zeitlin [Wed, 7 Mar 2012 23:50:21 +0000 (23:50 +0000)]
Deprecate wxWindow::MakeModal().
Using this function was never the right way to show a modal window and it
didn't really work correctly. Instead of futilely trying to fix it, just
deprecate it.
Vadim Zeitlin [Mon, 5 Mar 2012 13:00:57 +0000 (13:00 +0000)]
Override InheritAttributes() to do nothing in wxNonOwnedWindow.
Non owner windows shouldn't inherit attributes from their parent. This wasn't
a problem in wxMSW where InheritAttributes() was never called for them but was
in wxGTK (and possibly other ports) where dialogs inherited font from their
parent.
Vadim Zeitlin [Mon, 5 Mar 2012 13:00:55 +0000 (13:00 +0000)]
Override AdjustForParentClientOrigin() in wxNonOwnedWindow to do nothing.
No real changes, just replace an IsTopLevel() check in the base class
implementation of AdjustForParentClientOrigin() and override it for all top
level windows in wxNonOwnedWindow instead.
Vadim Zeitlin [Mon, 5 Mar 2012 13:00:51 +0000 (13:00 +0000)]
Remove the wrong "std::" scope prefix before ceil() call.
Fix compilation errors with VC6 (and possibly other compilers) introduced in
r70797 (see #13383): as we only include <math.h> and not <cmath> we don't
necessarily have std::ceil() available, only the extern "C" ceil(). Just use
the latter instead of the former.
Vadim Zeitlin [Sun, 4 Mar 2012 20:31:29 +0000 (20:31 +0000)]
No changes, just make wxAUI SetActivePane() a member function.
Make a global function a member one as it uses member variables and it's
easier to use them directly instead of passing the object pointer to it all
the time.
Vadim Zeitlin [Sun, 4 Mar 2012 00:29:55 +0000 (00:29 +0000)]
Always provide wxMenuItem bitmap-related methods in wxMSW.
Define these methods even when wxUSE_OWNER_DRAWN is turned off for some
reason. This allows to avoid ugly tests for !defined(__WXMSW__) ||
wxUSE_OWNER_DRAWN in the code that just wants to set a bitmap for a menu item.
Vadim Zeitlin [Sun, 4 Mar 2012 00:29:51 +0000 (00:29 +0000)]
Don't set value unnecessarily in wxSpinCtrl::Create() in wxMSW.
This is not only unnecessary but also results in an unexpected event (which
could be avoided by using ChangeValue() but why bother calling it at all if we
don't need to).
Vadim Zeitlin [Sun, 4 Mar 2012 00:29:21 +0000 (00:29 +0000)]
Fix assert when editing an item in multi-selection wxTreeCtrl.
Don't use GetSelection() in wxTreeCtrl EVT_CHAR_HOOK handler as it can only be
used with single selection controls and results in an assert when used with
multi-selection ones. Simply use GetFocusedItem() instead.
Vadim Zeitlin [Sun, 4 Mar 2012 00:29:03 +0000 (00:29 +0000)]
Fix showing MDI child from wxDocManager::ActivateDocument().
This fix has 2 components: first, call Raise() instead of simple SetFocus()
from ActivateDocument() as this corresponds better to what we want to do here.
And second, override Raise() to call Activate() in wxMDIChildFrame to ensure
that it works as expected as raising an MDI child doesn't work otherwise in
most ports (with the exceptions for wxOSX which, on the contrary, needs a
small fix to preserve the existing working Raise() behaviour).
Vadim Zeitlin [Sun, 4 Mar 2012 00:28:58 +0000 (00:28 +0000)]
Use wxHAS_IMAGES_IN_RESOURCES instead of explicit platform checks.
Add a special symbol which is defined only if the icons and other images (e.g.
cursor) are in the separate resource files and don't need to be embedded as
XPMs in the main program.
This makes the checks more clear and more customizable as it's enough to
change wxHAS_IMAGES_IN_RESOURCES definition instead of changing many platform
checks.
Paul Cornett [Thu, 1 Mar 2012 07:09:43 +0000 (07:09 +0000)]
Fixes to allow running with 64-bit wxGTK
- use correct printf format specifiers
- don't perform operations requiring a window until the window has been created
Vadim Zeitlin [Thu, 1 Mar 2012 01:05:25 +0000 (01:05 +0000)]
Correct wxCOMPILER_PREFIX definition when wxMSVC_VERSION is predefined.
Fix the wrong concatenation macro name that was used as using wxMSVC_VERSION
could not work as expected before (which also shows that nobody ever used it).
Vadim Zeitlin [Wed, 29 Feb 2012 14:45:29 +0000 (14:45 +0000)]
Ignore setting empty path in wxGTK wxFileDialog.
wxGenericFileButton calls wxFileDialog::SetPath() with empty path if no
initial path is explicitly specified and this clearly shouldn't do anything --
but it did, as it set the file dialog path to the initial directory (cwd by
default), and so opened it in the parent of that directory which was
completely unexpected and not useful at all.
Simply don't do anything when SetPath("") is called.
Vadim Zeitlin [Wed, 29 Feb 2012 13:58:52 +0000 (13:58 +0000)]
Move checks for m_art != NULL before code using m_art in wxAuiToolBar.
It doesn't make sense to check whether a pointer is NULL after using it, so do
the checks first.
In fact the m_art pointer probably can never be NULL at all as other code uses
it without checking and so these checks could probably be removed completely,
but keep them for now as I'm not totally sure if having NULL art provider is
really impossible.
Vadim Zeitlin [Tue, 28 Feb 2012 22:48:39 +0000 (22:48 +0000)]
Use /bin/echo for creation of Mac OS X PkgInfo files.
The built-in of /bin/sh doesn't handle "-n" option that we use (at least not
under OS X 10.6), so we were getting "-n APPL????" in the generated files.
Fix this by using /bin/echo which does support this option.