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).
Václav Slavík [Thu, 28 Feb 2013 13:31:58 +0000 (13:31 +0000)]
Don't include Common-Controls manifest in wxBase apps.
If only the non-GUI portions of wxWidgets are used, the dependency on
Microsoft.Windows.Common-Controls assembly shouldn't be automatically
added to Visual C++. Only do it when compiling GUI code.
Vadim Zeitlin [Sun, 24 Feb 2013 13:48:57 +0000 (13:48 +0000)]
Fix, or at least make less common, deadlock in the thread sample.
Don't always deadlock when "Stop the last spawned thread" menu command is
selected. There is still a problem with a race condition which could result in
a crash when dereferencing an invalid pointer, but at least this doesn't
happen all the time, unlike the current bug.
Of course, the real solution would be to properly rewrite the sample to show
how thread deletion should be handled correctly...
Vadim Zeitlin [Thu, 21 Feb 2013 14:32:04 +0000 (14:32 +0000)]
Fix crash when drawing bitmaps with mask in wxGTK with GTK+ < 2.20.
r73386 introduced a crash in wxGTK drawing code when using old GTK+ versions
by releasing the mask pixmap prematurely. Apparently GTK+ itself was fixed at
some time in 2.19.x time frame but work around the bug for the sake of older
GTK+ versions in wxGTK itself by simply releasing the pixmap at the end of
DoDrawBitmap(), as pre-r73386 code did.
Vadim Zeitlin [Thu, 21 Feb 2013 13:22:31 +0000 (13:22 +0000)]
No real changes, just suppress a harmless warning.
g++ warned about possibly uninitialized variable, so initialize it in its
declaration even if it was actually already always initialized in the branches
where it could be used.
Vadim Zeitlin [Fri, 15 Feb 2013 12:40:13 +0000 (12:40 +0000)]
Don't connect to the same signal multiple times in wxGTK wxClipboard.
We called g_signal_connect("selection_get") in wxClipboard code each time its
AddData() method was called. This resulted in progressive but noticeable
slowdown as the handler was called more and more times.
Vadim Zeitlin [Sun, 10 Feb 2013 16:14:03 +0000 (16:14 +0000)]
Account for scrolling when setting the background brush origin in wxMSW.
We must use physical coordinates for the brush origin to account for the
coordinates offset in scrolled windows, so add MSWAdjustBrushOrg() and call it
from MSWGetBgBrushForChild().
Vadim Zeitlin [Sun, 10 Feb 2013 16:13:53 +0000 (16:13 +0000)]
Erase the entire virtual area of the window in the erase sample.
Just clearing the DC is not enough when the window is scrolled, so clear the
entire virtual area. We should be able to optimize it by clearing just the
rectangle currently scrolled into view but this is at least correct, i.e.
doesn't result in corrupted display, even if it's suboptimal.
Vadim Zeitlin [Sun, 10 Feb 2013 16:13:50 +0000 (16:13 +0000)]
Compilation fix for !wxHAS_MSW_BACKGROUND_ERASE_HOOK case.
This doesn't actually change anything as wxHAS_MSW_BACKGROUND_ERASE_HOOK is
always defined, except under WinCE where this file is not used anyhow, but do
test it here for completeness.