Update AUI pane resizable status even when it is floating.
Making a pane (e.g. a toolbar) [not] resizable didn't have any effect when it
was floating, fix this by explicitly updating its style to match the internal
state.
Fix over aggressive clipping in generic wxListCtrl header drawing.
Clipping out 4 pixels vertically resulted in truncating any letters with
descent (e.g. "g" or "q") under OS X where the native header size is just tall
enough to show the text.
Simply don't clip that much but use the entire header width.
Fix crash in wxListbook if image list is assigned after adding pages.
The generic wxListCtrl didn't properly support switching between report and
non-report modes without invalidating the control contents, the required in
non report view geometry info pointers were not allocated when the control was
switched to a, say, list mode and not created in it.
Fix this by updating all list control lines when the report mode changes.
Use string sort order with CompareString() in wxString::CmpNoCase().
Using the default word sort order may fail to define a strict weak order using
this function, thus breaking algorithms such as std::sort which rely on its
properties. It's also more consistent with the fallback manual implementation.
These trivial helper functions are available in all builds (provided that
wxUSE_STD_STRING is not explicitly set to non-default 0 value) unlike implicit
conversions to std::[w]string which are only available when wxUSE_STL==1.
Define element_type for consistency with other classes (wxSharedPtr, weak_ptr)
and to allow accessing the type from the template code.
Also remove the apparently unnecessary template assignment operator:
assignment from an expression convertible to type T* works even without it and
while assigning something implicitly convertible to T* wouldn't work now, it's
for the best as we don't want to rely on such implicit conversions.
Discard fully transparent alpha channel when loading bitmaps.
Some bitmap files declare themselves to be 32bpp, normally indicating that
they have an alpha channel, but have only zeroes in their alpha data. Hence
loading them used to create fully transparent images which wasn't the desired
effect.
Fix this by simply discarding the alpha channel entirely if it turns out that
all pixels were fully transparent.
Václav Slavík [Fri, 9 Apr 2010 06:55:19 +0000 (06:55 +0000)]
Add system libs in msvc/wx/setup.h too.
This makes it possible to use static build of wx from VC++ by just
including its headers. Even though it's common to have these libs in
your settings, it's not always the case.
Václav Slavík [Wed, 7 Apr 2010 18:59:51 +0000 (18:59 +0000)]
Fixed wxFileSystem::FileNameToURL() regression with UNC paths.
We cannot use wxURI to do the escaping, because wxFileSystem depends on
use of nonstandard escaping and prefixes (wxURI eats away
file:// prefix, while wxFileSystem uses it to signify UNC paths;
wxFileSystem needs to escape #,: as well).
Suppress dummy gcc warnings in regex library code.
These warnings are harmless (variables are always initialized when they are
used) but they unfortunately prevent buildbot from reporting any new warnings
(which may not be harmless) during the library compilation step so suppress
them in the least intrusive way possible.
Work around "possibly uninitialized variable" warning in wxFileName.
Initialize multiplier to its default value in GetHumanReadableSize() to avoid
a "warning: 'multiplier' may be used uninitialized in this function" from g++.
Use this method to forward the status of text events in the implementation of
wxComboBox in wxOSX/Carbon. This ensures that the events are correctly [not]
generated when various wxComboBox methods are called.
Fix text text changed events sending in OS X combo box and text control.
Don't duplicate needlessly wxTextEntry functionality in wxTextCtrl.
Don't clear the combobox text entry part twice in wxComboBox::DoClear(), it is
supposed to only clear the item container contents as the base class Clear()
already calls wxTextEntry::Clear().
Do send text updated events from wxTextEntry itself as it applies to
wxComboBox just as well as to wxTextCtrl.
The unit tests now pass under wxOSX/Cocoa, not breaking them again would be
appreciated.
Attempt to correct mysterious MSVC6 compilation error.
For some reasons MSVC6 refuses to compile TestData struct initialization. Try
to work around it by not using wxULongLong as this looks like the only thing
which might be confusing it.
Add support for IEC and SI size units to wxFileName::GetHumanReadableSize().
Allow choosing the multiplier to use (1000 or 1024) and the names of the units
(SI or IEC). By default, still use traditional convention, i.e. multiplier of
1024 but SI unit names. This will probably need to be changed to use IEC units
in the future.
Add default constructor to wxGraphicsGradientStop.
It may be convenient to create wxGraphicsGradientStop first and initialize it
later so allow doing this by providing the default argument for constructor
parameters and thus allowing to use it as the default constructor.
Václav Slavík [Mon, 5 Apr 2010 17:19:04 +0000 (17:19 +0000)]
Fix text input and completion in wxComboCtrl and wxOwnerDrawnComboBox.
Both wxEVT_KEY_DOWN and wxEVT_CHAR must be handled and only the latter
used for completion (or any characters input). Don't make incorrect
assumptions about wxEVT_CHAR keycodes either, it's only the Unicode
character and printability that matter.
Otherwise, completion in readonly controls wouldn't work correctly
for e.g. numbers on numpad or non-ASCII characters.
Václav Slavík [Mon, 5 Apr 2010 17:18:55 +0000 (17:18 +0000)]
Pass events around with ProcessEvent(), not AddPendingEvent().
The latter adds the event for later processing. As a result, the event
appears to be processed to the caller, even if the handled it was passed
to called Skip() on it. ProcessEvent() doesn't suffer from this problem,
it may modify the event as expected.
Václav Slavík [Mon, 5 Apr 2010 17:18:41 +0000 (17:18 +0000)]
In wxPopupFocusHandler, watch for EVT_CHAR, not EVT_KEY_DOWN.
We should close the popup only if neither of these events was processed;
previously, EVT_CHAR would never reach the popup in open state, as it
would be closed automatically.
Add support for gradient stops to wxGraphicsContext.
Allow specifying a set of gradient stops instead of just the beginning and
ending colours. Add the new wxGraphicsGradientStop(s) classes and new
wxGraphicsContext::Create{Linear,Radial}GradientBrush() overloads. Also change
the same methods of wxGraphicsRenderer to take wxGraphicsGradientStops instead
of a pair of colours.
Implement the new API for MSW and Cairo. OS X still uses just the two colours
for now.
Jaakko Salli [Sun, 4 Apr 2010 15:22:43 +0000 (15:22 +0000)]
Resolve GCC's 'type-punned pointer will break strict-aliasing rules' warning by breaking up code in wxAny GetValue() and SetValue() functions into several lines (fixes #11865)
Fix wxTaskBarIcon to work under all Windows versions.
When the code was compiled using a new SDK, creating wxTaskBarIcon failed
under older Windows systems because of a too big NOTIFYICONDATA size specified
by the program.
Fix this by using the fixed NOTIFYICONDATA_V2_SIZE to get old version of the
struct which nevertheless contains everything we need and even fall back to
NOTIFYICONDATA_V1_SIZE for Win9x if needed.
Allow using wxGraphicsContext with MinGW if gdiplus.h is available.
MinGW doesn't include gdiplus.h but it can be installed independently by the
user. Allow to use it if it's available:
- Include windows.h when checking for it in configure as this is apparently
needed for its compilation.
- Don't reset wxUSE_GRAPHICS_CONTEXT to 0 for non-Microsoft compilers, instead
just define it as 0 by default for them, allowing the user to simply change
the definition in wx/msw/setup.h.
Fix crash in wxMediaCtrl::GetDownloadProgress() with ActiveMovie backend.
IActiveMovie::get_FilterGraph() may return S_FALSE, i.e. succeed, while
leaving the output pointer NULL. Check for this and don't dereference the
pointer before checking for its validity.
Also do it for the other call in this function just in case. And rearrange the
code to be slightly more readable.