Refactor wxTextEntry::AutoComplete() to simply call DoAutoCompleteXXX().
No real changes, just make the public AutoComplete() non-virtual and add
virtual DoAutoCompleteXXX() methods to make it easier to add new public
AutoComplete() overloads in the upcoming commits.
Jaakko Salli [Fri, 15 Apr 2011 09:23:23 +0000 (09:23 +0000)]
Removed wxPG_DOUBLE_BUFFER constant. Now all wxPG rendering is done double-buffered, regardless of the platform. Code path with wxPG_DOUBLE_BUFFER = 0 did not render correctly (fixes #13140). In future should probably use wxAutoBufferedPaintDC or something similar, but this will require non-trivial code changes and testing.
Jaakko Salli [Wed, 13 Apr 2011 16:39:06 +0000 (16:39 +0000)]
wxEVT_COMMAND_TEXT_UPDATED events from wxComboCtrl's embedded wxTextCtrl kept confusing wxPropertyGrid::HandleCustomEditorEvent(). We need to ignore them.
Re-define push_back() in wxSortedArrayString to behave correctly.
Adding items to wxSortedArrayString should always keep them sorted but while
Add() did this, push_back() didn't breaking the class invariant.
Redefine push_back() in _WX_DEFINE_SORTED_TYPEARRAY_2 macro to fix this and
add a unit test checking that wxSortedArrayString::push_back() does work now.
Add wxAuiTabArt::SetColour() and SetActiveColour() methods and provide trivial
default implementation of them in wxAuiDefaultTabArt to allow customizing the
tab colours.
Fix vararg function in wxXml unit test broken by recent changes.
The changes in r67345 changed CheckXml() vararg function to take a reference
as the first argument but this doesn't work with va_start(), so revert to
using a pointer here.
This fixes the current unit test failures in the XML tests.
Correctly restore the old locale in wxXLocale functions.
In non-wxHAS_XLOCALE_SUPPORT case we didn't restore the original locale
correctly in wxStrtoxxx_l() functions as the return value of wxSetlocale() was
incorrectly assumed to be the old locale instead of the new one.
Fix this and also replace the macros used by the old code with a small helper
class, this simplifies the code and is less ugly.
Finally add a unit test which failed before these changes when the program ran
in any non-C locale but passes now.
Fix incorrect use of setlocale() in wxLocale::IsAvailable().
The return value of setlocale() was used incorrectly in this code: it
represents the newly set locale and not the previously active one so we didn't
actually restore the original locale before.
Fix the code and check that we do actually restore the locale in a new unit
test for it.
Fix VarArgTestCase compilation when type traits are unavailable.
When type traits are unavailable we can't check whether a type can be passed
to a vararg function but we still need to pass a copyable object to
wxString::Format() for the code to compile, even if we just want to check that
it will fail with the assert at run-time.
Changed licence references to "wxWindows licence".
Use "wxWindows licence" and not "wxWidgets licence" and also use British spelling for licence. Updated new occurrences in recently added files and a couple of previously (r64940) missed ones.
ImageTestCase::DibPadding was always failing due to differences in pixel data between the decoded GIF and encoded ICO image. Instead of comparing image content just check if the saving of the ICO succeeds (prior to r67296 it would crash).
Paul Cornett [Sun, 3 Apr 2011 05:19:59 +0000 (05:19 +0000)]
For wxGTK2, link with X11 explicitly, since we use many X11 functions directly.
Some linkers, notably newer Linux ones, don't implicitly link against dependent libs
Fixes #13100
Disable wxUSE_STD_CONTAINERS by default for MSVC6.
This compiler can't compile its own standard headers with the default options
as it overflows an internal heap. Disable the use of standard containers by
default for it to avoid this problem and indicate that /Zm option must be used
to avoid this.
Remove the weird wxSVG_DEBUG which could apparently be used to trace the code
execution by triggering asserts in all functions. This is really not the right
way to implement tracing and seems pretty useless, just remove it.
Jaakko Salli [Thu, 31 Mar 2011 17:22:51 +0000 (17:22 +0000)]
Added wxComboPopup::DestroyPopup(), which responsibility is to call Destroy() for the popup control and also delete the combo popup object itself. The default implementation should be able to handle common cases.
Vadim Zeitlin [Thu, 31 Mar 2011 09:38:03 +0000 (09:38 +0000)]
Implement wxGraphicsContext::GetSize() for Cairo.
As the implementation of this method is basically the same for all ports move
it to the base class itself instead of requiring the derived classes to
implement it. Now the derived classes need to fill in m_width and m_height
members instead.
Do fill them when creating wxGraphicsContext in Cairo version.
Vadim Zeitlin [Thu, 31 Mar 2011 09:37:59 +0000 (09:37 +0000)]
Tentative compilation fix for wxMSW with MinGW after STL changes.
Include wx/stack.h, which includes the standard <stack> header, before
<windows.h> as the latter redefines min and max as macros conflicting with the
standard headers.
Vadim Zeitlin [Thu, 31 Mar 2011 09:28:41 +0000 (09:28 +0000)]
Fix alpha handling in CSS syntax in wxColour in non-"C" locale.
Use locale-independent functions to parse and generate the floating point
alpha representation in CSS syntax for colours to make it work in locales
which don't use period as decimal separator.
Vadim Zeitlin [Thu, 31 Mar 2011 09:28:38 +0000 (09:28 +0000)]
Fix HMENU to wxMenu translation in wxMSW code.
We didn't find the menus corresponding to the submenu handles. This resulted
in incorrect processing of EVT_UPDATE_UI events for the submenus and probably
other problems.
Fix this by searching for the HMENU recursively in all menus.
Vadim Zeitlin [Thu, 31 Mar 2011 09:28:34 +0000 (09:28 +0000)]
Document unexpected wxWindowDisabler taskbar UI in wxMSW.
It may be unexpected that the application can still be closed from the taskbar
even if its main window is disabled. Mention this in the documentation and
indicate how to prevent this from happening if required.
Vadim Zeitlin [Wed, 30 Mar 2011 14:16:25 +0000 (14:16 +0000)]
Remove REMOVE_UNUSED_ARG option from setup.h files.
This identifier wasn't used anywhere as WXUNUSED() is always defined as
nothing for all compilers since quite some time.
Also moved wxUSE_IOSTREAMH together with the other wxUSE_STD_XXX options and
removed the "compiler (mis)features" section which became empty after doing
this.
Vadim Zeitlin [Wed, 30 Mar 2011 14:16:19 +0000 (14:16 +0000)]
Add support for elements preceding the document node in wxXML.
This is mainly useful for parsing and generating processing instructions but
can be used for any kind of elements, e.g. also comments, occurring before the
document node in XML documents.
Update the internally stored position of a floating AUI frame even if the user
is dragging it too fast to update its position on screen. This prevents the
frame from snapping back to the initial position when movement is over.
Vadim Zeitlin [Wed, 30 Mar 2011 14:16:04 +0000 (14:16 +0000)]
Add wxUSE_STD_CONTAINERS and turn it on by default.
Previously, wxUSE_STL enabled both implicit conversion of wxString to
std::[w]string and use of standard containers for the implementation of their
wx equivalents. Split up the two roles now by allowing to enable the use of
the standard containers independently of (backwards incompatible) implicit
conversion in wxString and actually enable wxUSE_STD_CONTAINERS by default.
Jaakko Salli [Sun, 27 Mar 2011 18:30:56 +0000 (18:30 +0000)]
Instead of just deleting m_popupInterface, call Destroy() of its wxWindow-based popup control obtained via GetControl() member function. Also still delete m_popupInterface if there was no popup control, or if it was implemented as a separate class (versus being multiple-inherited along side wxComboPopup, as has been the common practice).
Václav Slavík [Sun, 27 Mar 2011 17:23:43 +0000 (17:23 +0000)]
Always use gtk2-compat.h definitions.
We support building against newer GTK+ version and using an older
one at runtime, so we must provide our implementations of these
functions even if GTK_CHECK_VERSION would indicate the function is
already available in GTK+.
Václav Slavík [Fri, 25 Mar 2011 11:00:56 +0000 (11:00 +0000)]
Revert r67137.
GTK_DISABLE_SINGLE_INCLUDES causes trouble with other included
libraries (libgnomeprint this time) too. This check for trivially fixed
problems is not worth the continuing trouble.