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.
Vadim Zeitlin [Sat, 2 Mar 2013 12:11:53 +0000 (12:11 +0000)]
Reset accelerator table after removing last accelerator in wxMSW wxMenuBar.
We didn't update the accelerator table if no more accelerators were left in it
but we still need to do it to stop handling the previously active accelerators.
Vadim Zeitlin [Sat, 2 Mar 2013 12:11:40 +0000 (12:11 +0000)]
Don't give error message for non-existent paths in wxFileSystemWatcher.
The file we're trying to watch might have been just deleted, this is an
unavoidable (and not only in theory but also in practice when watching busy
directories) race condition so don't give an error message if this does happen
but simply return false from Add().
Vadim Zeitlin [Thu, 28 Feb 2013 20:41:14 +0000 (20:41 +0000)]
Use thread ID and not thread handle in the error messages in wxMSW.
The ID is in general more useful than the handle and this also fixes an assert
failure due to mismatch between the HANLDE type and "%x" format specifier.
Václav Slavík [Thu, 28 Feb 2013 16:29:05 +0000 (16:29 +0000)]
Add wxPreferencesEditor class.
Implements native UI for preferences editing. In particular, the API
handles the differences between modal (Windows) and non-modal (OS X) preferences windows and provides platform's native look.
Currently implemented natively for wxOSX/Cocoa, wxGTK and Windows (the latter is used as a fallback generic implementation as well).