Check that files returned from wxDir::FindXXX() match the filter.
Native Windows functions used by wxDir check the filter against both the short
and the long name resulting in unexpected results, e.g. searching for
"foo.baz" would find "foo.bazaar".
Fix this by explicitly rechecking that we have a valid match ourselves.
By default the columns are auto-sized to fit just their label, which is fast
but not very user-friendly. Allow customizing this behaviour by handling the
(new) wxEVT_GRID_COL_AUTO_SIZE event.
Use LF eol-style svn property for all Unix-only files.
At least with some of them (e.g. tiffconf.h) using native EOLs under Windows
confuses MinGW/MSYS and results in build failures. As all these files are only
used under Unix or in Unix-like environments, use Unix EOLs for them
everywhere.
Fix wxTextEntryDialog::GetValue() when using SetTextValidator().
Associating a validator with the text control in wxTextEntryDialog resulted in
GetValue() always returning an empty string which was completely unexpected.
Fix this by setting the value string manually to avoid interfering with any
possibly used validators.
Václav Slavík [Wed, 3 Apr 2013 18:13:30 +0000 (18:13 +0000)]
Use the same wxDEBUG_LEVEL settings for Xcode projects as elsewhere.
Use the same debug flag default settings in the build/osx Xcode projects
as are used by all other makefiles and projects - that is,
wxDEBUG_LEVEL=1. This is done automatically by the headers, no need to
define any extra symbols when building.
Vadim Zeitlin [Sun, 31 Mar 2013 01:12:27 +0000 (01:12 +0000)]
Make wxToolBar styles consistent and add wxTB_DEFAULT_STYLE.
Don't include wxBORDER_NONE in neither wxToolBar ctor and Create() nor
wxFrame::CreateToolBar() flags parameter, override GetDefaultBorder() in
wxToolBar itself instead to use the border style appropriate for the current
platform by default. This has the same effect -- the default border style is
used unless another one is explicitly specified -- but is more clear and
consistent.
Also add wxTB_DEFAULT_STYLE for consistency with the other classes.
Vadim Zeitlin [Sun, 31 Mar 2013 01:12:21 +0000 (01:12 +0000)]
Remove wxTextCtrl::OnEnabled() hack from wxGTK.
Don't change the background colour when the control is being enabled or
disabled, it doesn't seem necessary and it's unclear why was this added by
r10179 in the first place. It does result in problems however as it could
somehow make the selection of wxTextCtrl invisible when it lost focus and so
fixes a serious usability problem which happened to all wxTextCtrls for which
a wxEVT_UPDATE_UI handler using wxUpdateUIEvent::Enable() was defined.
Vadim Zeitlin [Sun, 31 Mar 2013 01:12:15 +0000 (01:12 +0000)]
Explicitly trigger wxNotebook layout in wxMSW to ensure it is correct.
Due to an apparent bug in the native control implementation, space could be
reserved for the second row of tabs even when the notebook was big enough to
need it. Sending it an extra WM_SIZE seems to be enough to fix this.
Vadim Zeitlin [Sun, 31 Mar 2013 01:11:50 +0000 (01:11 +0000)]
Remove remaining occurrences of wxUSE_XPM_IN_MSW.
This symbol is not used since a very long time as XPM support is now always
available in wxMSW and most of its occurrences were removed almost 10 years
ago, just remove the remaining ones too.
Vadim Zeitlin [Fri, 29 Mar 2013 19:53:26 +0000 (19:53 +0000)]
Fix program not shutting down when using Ubuntu app menu.
Ensure that an idle event is generated after a menu event even when the latter
comes, via DBUS, from the out of process app menu and not from a real GTK menu.
Vadim Zeitlin [Wed, 27 Mar 2013 23:10:25 +0000 (23:10 +0000)]
Fix assert when constructing invalid wxGBSpan inside wxWidgets itself.
Various wxGridBagSizer methods returning wxGBSpan asserted when trying to
construct an invalid wxGBSpan as its components must now (since r66964) be
positive.
Fix this by adding a special new method to wxGBSpan for constructing such
invalid spans and use it now.
Vadim Zeitlin [Tue, 26 Mar 2013 00:59:27 +0000 (00:59 +0000)]
Use wxCONTROL_PRESSED instead of wxCONTROL_SELECTED in wxOSX renderer code.
wxCONTROL_SELECTED is supposed to only apply to the selected items in a
listbox and similar cases whereas the buttons use wxCONTROL_PRESSED flag to
indicate whether they are toggled.
Correct the code in wxRendererMac to use the latter, for consistency with the
other platforms.
Vadim Zeitlin [Thu, 21 Mar 2013 22:37:06 +0000 (22:37 +0000)]
Allow using either single or multi line wxTextCtrl in keyboard sample.
These controls are implemented quite differently in wxGTK, so it's convenient
to be able to test both of them in the sample to check that they both behave
correctly.
Vadim Zeitlin [Thu, 21 Mar 2013 22:37:01 +0000 (22:37 +0000)]
Refactor wxGTK IM-related code to allow future modifications.
No real changes, just make it possible to use a different IM than the one
allocated in wxWindow for input handling. This will be used in the upcoming
changes to wxTextEntry and the related classes.
Vadim Zeitlin [Thu, 21 Mar 2013 22:36:57 +0000 (22:36 +0000)]
Tweak wxGTK keyboard handling to allow accelerators to work again.
Accelerators were broken by the changes of r72640 which were done to ensure
that the focused window gets the keyboard event first, before its top level
parent. Fix them now by still passing the events to the focused window first
but also passing them to the parent top level if it hasn't been handled by the
focused child.
Unfortunately this is still not fully compatible with wxMSW because in wxGTK
wxEVT_CHAR handler must skip the event in order to allow the accelerator using
the same key to work, while in wxMSW the accelerator can only be suppressed by
overriding wxWindow::MSWShouldPreProcessMessage(). We will need to make the
two ports behave in the same way when the event is not skipped in the future.
But for now, at least make them both behave correctly when the handler does
skip the event.
Vadim Zeitlin [Thu, 21 Mar 2013 22:36:52 +0000 (22:36 +0000)]
Use flat generic status bar by default and add wxSB_SUNKEN.
GTK+ applications don't use sunken status bars since many years, do don't do
it in wxWidgets neither by default any more. Add wxSB_SUNKEN style that can be
explicitly used if the old appearance is desired.
Vadim Zeitlin [Thu, 21 Mar 2013 22:36:46 +0000 (22:36 +0000)]
Disable Unity global menu while native modal dialogs are shown in wxGTK.
We need to use wxOpenModalDialogLocker even with native GTK+ dialogs to
prevent the menu commands from being available while they're shown, so do it
in wxMessageDialog and wxColourDialog which call gtk_dialog_run().
Vadim Zeitlin [Tue, 19 Mar 2013 02:58:33 +0000 (02:58 +0000)]
Fix WM_UNINITMENUPOPUP missing definition for VC6.
The previous workaround of defining it explicitly if it's not defined was left
in src/msw/frame.cpp while the code using WM_UNINITMENUPOPUP was moved to
src/msw/toplevel.cpp in r73562. Move the fallback definition there too.
Vadim Zeitlin [Wed, 13 Mar 2013 13:47:38 +0000 (13:47 +0000)]
Remove obsolete parts of autoconf_inc.m4.
This file has accumulated a lot of condition checks which were not relevant
any more, remove and recreate it (by running bakefile_gen) to get rid of them.
Vadim Zeitlin [Sun, 10 Mar 2013 01:09:41 +0000 (01:09 +0000)]
Disable sorting of generic wxDataViewCtrl while it is frozen.
Don't sort the contents of wxDataViewCtrl while it is frozen and resort it
only when it is thawed. This dramatically speeds up adding items to the
control when sorting is used as we only sort it once now instead of doing it
after adding every item.
Vadim Zeitlin [Sun, 10 Mar 2013 01:09:37 +0000 (01:09 +0000)]
Use symbolic constants instead of magic numbers in wxDataViewCtrl code.
No real changes, just add SortColumn_XXX symbolic constants which are somewhat
more clear than -1 and -2 used before. Although the code based on the global
variables remains as bad as before.
Vadim Zeitlin [Sat, 9 Mar 2013 15:08:31 +0000 (15:08 +0000)]
Use generic spin control itself as parent for its children.
This fixes a problem with using wxSpinCtrlGeneric in toolbars under wxOSX,
using the toolbar itself (i.e. the parent of the spin control) as parent for
the children didn't work there and no windows were visible at all.
Also use wxNavigationEnabled as base class of wxSpinCtrlGeneric to fix
keyboard navigation.
And override SetBackgroundColour() to set it for the text control part of the
spin control only.
Vadim Zeitlin [Sat, 9 Mar 2013 15:08:13 +0000 (15:08 +0000)]
Fix compilation for MinGW with wxUSE_IPV6==1.
MinGW doesn't provide wspiapi.h header, so only include it when using MSVC and
include ws2tcpip.h which directly declares the functions used for the other
compilers.
This doesn't have quite the same semantics but it's better than failing to
compile at all.
Vadim Zeitlin [Sat, 9 Mar 2013 15:08:09 +0000 (15:08 +0000)]
Don't cache HDC used by wxPaintDCEx in wxMSW.
This avoids the problem with mistakenly using wrong HDC in wxBitmapComboBox
code which was due to assuming that we can only ever have one paint HDC for
the given window -- while in wxBitmapComboBox case we are passed different
HDCs for the same window via WM_DRAWITEM.
Instead of fixing the cache, just don't use it at all for wxPaintDCEx as we
don't gain anything from doing it anyhow.
Vadim Zeitlin [Sat, 9 Mar 2013 15:08:00 +0000 (15:08 +0000)]
Don't set cell value in wxDataViewEvent in one place only.
We should either set the cell value in the event object everywhere or not do
it anywhere and as currently the native GTK and OS X versions don't do it at
all and the generic version only does it for ITEM_CONTEXT_MENU events, it's
easier to not do it at all.
This method couldn't be overridden by the classes deriving from wxLogWindow
because it was called (indirectly) from wxLogWindow ctor itself and so was
completely useless. Just remove it to avoid confusion.
Vadim Zeitlin [Mon, 4 Mar 2013 18:19:41 +0000 (18:19 +0000)]
Unselect all wxDataViewCtrl items when clicking outside of the item area.
This is consistent with Windows behaviour and as the generic wxDataViewCtrl is
mostly used under Windows, it makes sense to follow Windows convention in it.
Vadim Zeitlin [Sun, 3 Mar 2013 22:44:17 +0000 (22:44 +0000)]
Fix handling of wxST_NO_AUTORESIZE in wxOSX.
We do need to set the size of wxStaticText initially even when this style is
specified, it only tells us to not update it later. Otherwise even the initial
label was never shown in full.