wxWidgets.git
12 years agoRemove use of "size-request" signal for wxWindow sizing.
Paul Cornett [Thu, 17 May 2012 15:29:50 +0000 (15:29 +0000)] 
Remove use of "size-request" signal for wxWindow sizing.
This signal has been removed from GTK3. Instead have wxPizza keep track of child
size, and use gtk_widget_set_size_request() for wxWindows in native containers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoInterface fixes for Phoenix
Robin Dunn [Thu, 17 May 2012 02:47:34 +0000 (02:47 +0000)] 
Interface fixes for Phoenix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoMake variable containing port number an ushort in the sockets sample.
Vadim Zeitlin [Wed, 16 May 2012 15:10:05 +0000 (15:10 +0000)] 
Make variable containing port number an ushort in the sockets sample.

A port number is an unsigned short, not long, so don't make it long just
because wxCmdLineParser doesn't provide a convenient way to get the value of
an unsigned short option (it would be nice if it did...).

This fixes the problem with using "%d" format specifier with a long variable
as this resulted in an assert under LP64 systems.

See #14311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix wxWakeUpIdle() in Unix console application broken by r71089.
Vadim Zeitlin [Wed, 16 May 2012 15:10:01 +0000 (15:10 +0000)] 
Fix wxWakeUpIdle() in Unix console application broken by r71089.

Initialize m_pipeIsEmpty to true as we don't have anything in the pipe
initially and if this variable was false, nothing was ever written to the wake
up pipe and it was never set to true as nothing was read from it neither.

Closes #14166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDon't use printf() with non-literal string as format.
Vadim Zeitlin [Wed, 16 May 2012 13:24:49 +0000 (13:24 +0000)] 
Don't use printf() with non-literal string as format.

Replace calls to printf() with puts() in the typetest sample.

See #14311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoThe object size page now has full position attribute editing.
Julian Smart [Wed, 16 May 2012 10:59:30 +0000 (10:59 +0000)] 
The object size page now has full position attribute editing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix pasting large amounts of text in wxGTK.
Vadim Zeitlin [Tue, 15 May 2012 10:04:11 +0000 (10:04 +0000)] 
Fix pasting large amounts of text in wxGTK.

We need to process GDK_PROPERTY_NOTIFY events when yielding for
wxEVT_CATEGORY_CLIPBOARD, otherwise we never receive large selections.

As GDK_PROPERTY_NOTIFY can be also used for non-clipboard stuff, exceptionally
assign 2 categories to it and process it in either case.

Closes #14284.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoCorrect the documentation of wxSpinCtrl initial and value arguments.
Vadim Zeitlin [Tue, 15 May 2012 10:04:07 +0000 (10:04 +0000)] 
Correct the documentation of wxSpinCtrl initial and value arguments.

It does make sense to specify "initial" if "value" is empty.

See #13589.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdd support for wxArrayString to wxVariant-to-OLE conversion.
Vadim Zeitlin [Tue, 15 May 2012 10:04:03 +0000 (10:04 +0000)] 
Add support for wxArrayString to wxVariant-to-OLE conversion.

This allows to call COM methods taking arrays of strings easily.

Also remove support for the old and non-existent any more "stringlist" variant
type.

And add more error checking.

Closes #14296.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoEnable variadic macros for VC9 and later.
Vadim Zeitlin [Tue, 15 May 2012 10:04:01 +0000 (10:04 +0000)] 
Enable variadic macros for VC9 and later.

VC9 and 10 support variadic macros so define HAVE_VARIADIC_MACROS for them
too. This currently only affects wxLog{Debug,Trace} definitions in wx/log.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix keyboard navigation in wx{List,Choice,Tree,Tool}book controls.
Vadim Zeitlin [Tue, 15 May 2012 10:03:57 +0000 (10:03 +0000)] 
Fix keyboard navigation in wx{List,Choice,Tree,Tool}book controls.

Inherit from wxNavigationEnabled<wxBookCtrlBase> instead of just
wxBookCtrlBase to ensure that the keyboard navigation works correctly for
these controls.

The toolbar in wxToolbook still doesn't accept focus from keyboard but at
least the pages can be TAB-bed too and from. And the rest of the controls
are now fully accessible using only the keyboard.

Closes #14303.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoUse iterators instead of indices in wxStripMenuCodes().
Vadim Zeitlin [Tue, 15 May 2012 10:03:53 +0000 (10:03 +0000)] 
Use iterators instead of indices in wxStripMenuCodes().

Make the function more efficient when using UTF-8 wxStrings by using iterators
instead of indices in the loop searching for "&".

Closes #14307.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoClear styles popup if there is no style sheet
Julian Smart [Mon, 14 May 2012 17:23:56 +0000 (17:23 +0000)] 
Clear styles popup if there is no style sheet

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoSimplify wxEventLoopManual pending events processing logic.
Vadim Zeitlin [Sun, 13 May 2012 22:13:43 +0000 (22:13 +0000)] 
Simplify wxEventLoopManual pending events processing logic.

Don't try to process any remaining pending events in ProcessEvents() itself as
this was inconsistent: we only processed low-level toolkit pending events in
the main event loop itself if the loop was exited from a normal event handler
but only processed the wxApp-level pending events if it was exited from a
pending event handler. It also required more code than the new version that
simply processes all the remaining pending events, of both kinds, after the
main event loop termination.

This corrects changes of r71304 and replaces those of r71329.

Closes #14250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix wxDateTime unit test after the changes of r71430.
Vadim Zeitlin [Sun, 13 May 2012 22:05:57 +0000 (22:05 +0000)] 
Fix wxDateTime unit test after the changes of r71430.

Don't test the return value of ParseFormat(wxCStrData) any more as this
function is void now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDon't return a dangling pointer from wxDateTime::ParseXXX(wxCStrData).
Vadim Zeitlin [Sun, 13 May 2012 21:37:25 +0000 (21:37 +0000)] 
Don't return a dangling pointer from wxDateTime::ParseXXX(wxCStrData).

We don't have any sufficiently long-lived pointer to return from this
overload, so don't return anything from it -- it's better to break the
compilation of the existing code rather than make it crash during run-time.

Closes #14214.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoNo changes, just simplify the code using wx2stc() a little.
Vadim Zeitlin [Sun, 13 May 2012 21:37:23 +0000 (21:37 +0000)] 
No changes, just simplify the code using wx2stc() a little.

Assign wx2stc() return value to a suitably const variable instead of using
ugly casts to get rid of constness.

Also use wxCharBuffer/char* explicitly inside explicit wxUSE_UNICODE checks,
using wxWX2MBbuf here doesn't gain us anything and just confuses the reader of
this code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix wxStyledTextCtrl compilation in non-Unicode build.
Vadim Zeitlin [Sun, 13 May 2012 21:37:18 +0000 (21:37 +0000)] 
Fix wxStyledTextCtrl compilation in non-Unicode build.

The value returned by wx2stc() in non-Unicode build is a simple "char*" and we
can't call length() method on it, add a helper wx2stclen() function to get the
length from the original wxString itself in this case.

Closes #14013.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDon't assert if no icon is specified for a wxDataViewCtrl item.
Vadim Zeitlin [Sun, 13 May 2012 21:37:16 +0000 (21:37 +0000)] 
Don't assert if no icon is specified for a wxDataViewCtrl item.

An item in a column using wxDataViewIconTextRenderer might not have any valid
icon associated with it, don't assert in case it doesn't in the native GTK
version.

Notice that the generic wxDataViewCtrl implementation already supports this
but not perfectly: no space is reserved for the icon in the images without
one, so giving the image to only some of them looks ugly. The GTK version
aligns both the items with and without icon properly and simply leaves the
image part blank and it would be better to modify the generic version to do
the same thing in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoMinor change to wxString pretty-printer for gdb.
Vadim Zeitlin [Sun, 13 May 2012 21:37:13 +0000 (21:37 +0000)] 
Minor change to wxString pretty-printer for gdb.

Calling string() explicitly isn't necessary, at least not with gdb 7.2, and is
actually harmful when using Python 2.5 (which doesn't support UTF-32) with
wide strings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDon't handle branches specially when sorting items in wxDataViewCtrl.
Vadim Zeitlin [Sun, 13 May 2012 21:37:10 +0000 (21:37 +0000)] 
Don't handle branches specially when sorting items in wxDataViewCtrl.

The generic version of wxDataViewCtrl tried to put all branches before the
leaves when sorting. This had a couple of problems: first, it didn't do it
correctly and actually placed the branches after the leaves which didn't make
any sense. Second, this was only done in the generic version and not the
native GTK one making the behaviour inconsistent between platforms. Finally,
this behaviour just doesn't make sense in general (i.e. when items don't
necessarily represent anything in the file system and maybe even sometimes
when they do) and there doesn't seem any good reason to do it by default.

So stop doing it, partially reverting the changes of r47562.

Closes #14100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDisable the use of UTF-8 by default in Unix builds.
Vadim Zeitlin [Sun, 13 May 2012 13:17:25 +0000 (13:17 +0000)] 
Disable the use of UTF-8 by default in Unix builds.

Add up-to-date description of UTF-8 support to the Unicode overview.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoRemove wxDECLARE_APP() from wxIMPLEMENT_APP_NO_MAIN().
Vadim Zeitlin [Sun, 13 May 2012 13:17:22 +0000 (13:17 +0000)] 
Remove wxDECLARE_APP() from wxIMPLEMENT_APP_NO_MAIN().

There is no need for a separate declaration inside wxIMPLEMENT_APP() as
wxGetApp() is defined by it and redeclaring it immediately after definition
results in a warning with some compilers/environments (Eclipse CDT).

The move of wxGetApp() to the beginning of the macro is only to ensure that a
semicolon is still required after wxIMPLEMENT_APP_NO_MAIN() and the other
macros terminating with it, such as wxIMPLEMENT_APP() itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFixed layout and hit-testing problem particularly with centred lines
Julian Smart [Fri, 11 May 2012 22:15:39 +0000 (22:15 +0000)] 
Fixed layout and hit-testing problem particularly with centred lines

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDocument that wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED is OSX-specific.
Vadim Zeitlin [Fri, 11 May 2012 22:10:28 +0000 (22:10 +0000)] 
Document that wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED is OSX-specific.

This even is not generated by neither generic nor GTK version right now.

See #14297.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix extra event sent by wxTextEntry::ChangeValue() since r71308.
Vadim Zeitlin [Fri, 11 May 2012 22:10:25 +0000 (22:10 +0000)] 
Fix extra event sent by wxTextEntry::ChangeValue() since r71308.

The changes of r71308 sent the event unconditionally in case the text didn't
really change but no events should be sent if the flags don't include
SetValue_SendEvent, add a check for it.

Re-closes #13936.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoEnable access to the native bitmap object wrapped by wxGraphicsBitmap
Robin Dunn [Fri, 11 May 2012 22:06:50 +0000 (22:06 +0000)] 
Enable access to the native bitmap object wrapped by wxGraphicsBitmap

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoEnsure a 32-bit cairo surface is created if it is needed
Robin Dunn [Fri, 11 May 2012 22:06:37 +0000 (22:06 +0000)] 
Ensure a 32-bit cairo surface is created if it is needed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agofixes SetFirstItem, Thanks to David Wright
Stefan Csomor [Fri, 11 May 2012 06:28:54 +0000 (06:28 +0000)] 
fixes SetFirstItem, Thanks to David Wright

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoMore interface fixes for Phoenix
Robin Dunn [Thu, 10 May 2012 22:38:14 +0000 (22:38 +0000)] 
More interface fixes for Phoenix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdd wxFormatInvalid, and tweak the docs for wxDataObject::GetDataHere and SetData
Robin Dunn [Thu, 10 May 2012 22:34:46 +0000 (22:34 +0000)] 
Add wxFormatInvalid, and tweak the docs for wxDataObject::GetDataHere and SetData

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdd doc for wxCliboard::Get
Robin Dunn [Thu, 10 May 2012 22:34:39 +0000 (22:34 +0000)] 
Add doc for wxCliboard::Get

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdded wxRichTextXMLHandler::RegisterNodeName so custom content classes can be added...
Julian Smart [Thu, 10 May 2012 11:59:59 +0000 (11:59 +0000)] 
Added wxRichTextXMLHandler::RegisterNodeName so custom content classes can be added without
breaking XML loading

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoSet LF EOL style for setup.h.in file.
Vadim Zeitlin [Thu, 10 May 2012 11:53:45 +0000 (11:53 +0000)] 
Set LF EOL style for setup.h.in file.

This file is only used under Unix so should have Unix EOLs, e.g. to allow
building Unix ports from the sources checked out under Windows.

Closes #14266.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdd missing wx/scopeguard.h include to fix the build.
Vadim Zeitlin [Wed, 9 May 2012 17:16:26 +0000 (17:16 +0000)] 
Add missing wx/scopeguard.h include to fix the build.

Closes #14285.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix wxGenericListCtrl best size calculation in report view.
Vadim Zeitlin [Wed, 9 May 2012 14:24:54 +0000 (14:24 +0000)] 
Fix wxGenericListCtrl best size calculation in report view.

Just let the base class do it instead of using hard coded default value in
wxGenericListCtrl::DoGetBestClientSize().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoUnconditionally define IID_IShellItem in wxMSW sources.
Vadim Zeitlin [Wed, 9 May 2012 14:24:51 +0000 (14:24 +0000)] 
Unconditionally define IID_IShellItem in wxMSW sources.

This GUID may not be defined in uuid.lib even when
__IShellItem_INTERFACE_DEFINED__ is defined in the headers, so just define it
always to avoid any problems.

Closes #14244.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoImplement constrained best size calculation in wxMSW wxListCtrl.
Vadim Zeitlin [Wed, 9 May 2012 14:24:47 +0000 (14:24 +0000)] 
Implement constrained best size calculation in wxMSW wxListCtrl.

This fixes wxListbook controller size to avoid spurious scrollbars.

Closes #13898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoImprove wxBookCtrlBase controller size calculations.
Vadim Zeitlin [Wed, 9 May 2012 14:24:44 +0000 (14:24 +0000)] 
Improve wxBookCtrlBase controller size calculations.

Use GetBest{Height,Width}() in wxBookCtrlBase to compute the controller
control size height/width from its known (from wxBookCtrlBase size itself)
width/height. This will allow to correctly compute the size of wxListCtrl used
by wxListbook once it provides the necessary support for width-from-height and
height-from-width calculations.

See #13898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdd wxWindow::GetBest{Height,Width}().
Vadim Zeitlin [Wed, 9 May 2012 14:24:37 +0000 (14:24 +0000)] 
Add wxWindow::GetBest{Height,Width}().

These functions will be used when it is necessary to determine the best size
of the control if one of its size components is fixed. Currently none of the
classes implements DoGetBestClient{Height,Width}() yet but wxListCtrl will do
it soon, see #13898.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoImprove wxWindow best size documentation, mention DoGetBestClientSize().
Vadim Zeitlin [Wed, 9 May 2012 14:24:34 +0000 (14:24 +0000)] 
Improve wxWindow best size documentation, mention DoGetBestClientSize().

Custom classes should typically override DoGetBestClientSize() instead of
DoGetBestSize() to avoid having to deal with the borders.

Also don't reference the deprecated SetInitialBestSize() unnecessarily and
document its non-deprecated replacement.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoMention wxFoobookEvent change from classes to #defines in the change log.
Vadim Zeitlin [Wed, 9 May 2012 14:24:30 +0000 (14:24 +0000)] 
Mention wxFoobookEvent change from classes to #defines in the change log.

These classes can't be forward-declared any more as they're not really classes
any longer but just compatibility #defines and can't be made classes again as
this would break the existing code using wxBookCtrlEvent in 2.9.

See #14242.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAllow entering more digits in wxSpinCtrl in wxMSW than fits into it.
Vadim Zeitlin [Wed, 9 May 2012 14:24:27 +0000 (14:24 +0000)] 
Allow entering more digits in wxSpinCtrl in wxMSW than fits into it.

Scroll the control automatically if there is not enough space. This is
consistent with (single line) wxTextCtrl and wxSpinCtrl under the other
platforms.

Closes #14211.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAttach MDI "Window" menu to the parent frame menu bar in wxMSW.
Vadim Zeitlin [Wed, 9 May 2012 14:24:23 +0000 (14:24 +0000)] 
Attach MDI "Window" menu to the parent frame menu bar in wxMSW.

This makes sense and fixes the regression with "Window" menu commands not
being processed any more after the changes of r71114.

Closes #14207.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoCorrect the initial value setting in wxMSW wxSpinCtrl.
Vadim Zeitlin [Wed, 9 May 2012 14:24:20 +0000 (14:24 +0000)] 
Correct the initial value setting in wxMSW wxSpinCtrl.

Always use value argument for the text control contents and also override the
initial numeric value with it if it's numeric.

This seems to be the only consistent thing to do, so document this behaviour
and add a unit test checking for it.

Closes #13589.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoRemove assert checking bitmap size in wxMenuItem drawing code in wxMSW.
Vadim Zeitlin [Wed, 9 May 2012 14:24:16 +0000 (14:24 +0000)] 
Remove assert checking bitmap size in wxMenuItem drawing code in wxMSW.

This assert was fatal, as usual when asserting from a WM_PAINT handler, as the
function was reentered resulting in nested asserts and program abort, so
remove it to at least let the program continue to run even if there is not
enough space for the bitmap in the menu.

There is, of course, still something wrong with the menu geometry calculations
if this happens but I can't even reproduce this any more so not sure what
exactly.

See #11657.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix creation of wxBitmap from wxIcon in wxMSW: premultiply the pixels.
Vadim Zeitlin [Wed, 9 May 2012 14:24:12 +0000 (14:24 +0000)] 
Fix creation of wxBitmap from wxIcon in wxMSW: premultiply the pixels.

wxBitmap in wxMSW is supposed to store its data in alpha-premultiplied format
but didn't do it when it was created from an icon (or a cursor), resulting in
wrong display of wxIcons with alpha channel when they were used for e.g. menu
items.

Fix this by ensuring that the data is always premultiplied. This is not the
best solution as in some cases (e.g. if this wxBitmap is added to wxImageList
later) we could need to undo this premultiplication later which is quite
inefficient but at least it's simple and straightforward.

Closes #11414.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix wxString unit test when not using UTF-8.
Vadim Zeitlin [Wed, 9 May 2012 14:24:10 +0000 (14:24 +0000)] 
Fix wxString unit test when not using UTF-8.

Restrict the tests added in r70987 to run when using UTF-8 strings only, they
test for something that is simply not true (and for a bug that can't happen)
with non-multibyte encodings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix compilation of wxVariant code with VC6.
Vadim Zeitlin [Wed, 9 May 2012 14:24:07 +0000 (14:24 +0000)] 
Fix compilation of wxVariant code with VC6.

This was broken by the changes in r71196 as the original VC6 SDK doesn't
define VARIANT::llVal.

See #14210.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoUse better face names first in wxGTK wxNativeFontInfo::SetFamily().
Vadim Zeitlin [Wed, 9 May 2012 14:24:03 +0000 (14:24 +0000)] 
Use better face names first in wxGTK wxNativeFontInfo::SetFamily().

Try better matches and not the most widespread ones first when building a list
of face names to try for the given family. This gives better results when
these better fonts are indeed available and doesn't change anything if they
are not.

See #14126.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoCheck that item ID is initialized when inserting it in wxListCtrl.
Vadim Zeitlin [Wed, 9 May 2012 14:24:01 +0000 (14:24 +0000)] 
Check that item ID is initialized when inserting it in wxListCtrl.

Using uninitialized ID happened to work by accident with 2.8 but it doesn't
work any more, try to detect this as early as possible and give a clear
explanation of why it doesn't to help fixing the broken code that used to
accidentally work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix wxStaticBitmap best size calculation in wxMSW.
Vadim Zeitlin [Wed, 9 May 2012 14:23:57 +0000 (14:23 +0000)] 
Fix wxStaticBitmap best size calculation in wxMSW.

Take the control borders into account by overriding DoGetBestClientSize()
instead of DoGetBestSize().

Also invalidate the default best size computed before we have any valid image
when setting the initial image in Create().

Closes #4099.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdded field implementation
Julian Smart [Wed, 9 May 2012 11:06:04 +0000 (11:06 +0000)] 
Added field implementation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoMoved default margins to buffer class Init; reduced chance of accidental selection...
Julian Smart [Tue, 8 May 2012 17:31:06 +0000 (17:31 +0000)] 
Moved default margins to buffer class Init; reduced chance of accidental selection when clicking

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoCorrected top-level object layout in paragraphs
Julian Smart [Mon, 7 May 2012 15:47:23 +0000 (15:47 +0000)] 
Corrected top-level object layout in paragraphs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFixed inconsistent calculation of line height in paragraph layout
Julian Smart [Mon, 7 May 2012 13:13:30 +0000 (13:13 +0000)] 
Fixed inconsistent calculation of line height in paragraph layout

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoNo real changes, just fix some typos in comments.
Vadim Zeitlin [Mon, 7 May 2012 13:12:27 +0000 (13:12 +0000)] 
No real changes, just fix some typos in comments.

Closes #14276.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdded non-breaking space to whitespace check
Julian Smart [Mon, 7 May 2012 13:12:27 +0000 (13:12 +0000)] 
Added non-breaking space to whitespace check

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoUse XkbKeycodeToKeysym() instead of deprecated XKeycodeToKeysym().
Vadim Zeitlin [Mon, 7 May 2012 13:12:23 +0000 (13:12 +0000)] 
Use XkbKeycodeToKeysym() instead of deprecated XKeycodeToKeysym().

XKeycodeToKeysym() is deprecated in new X11 headers because it doesn't work
correctly with all symbols (https://bugs.freedesktop.org/show_bug.cgi?id=5349).
Use XkbKeycodeToKeysym() instead, this should help with some keys and also
avoids deprecation warnings during compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoCreate a wrapper file for X11/XKBlib.h header.
Vadim Zeitlin [Mon, 7 May 2012 13:12:20 +0000 (13:12 +0000)] 
Create a wrapper file for X11/XKBlib.h header.

We need some hacks for the older systems before including this header, extract
them from src/x11/utilsx.cpp into a new private header to be able to reuse it
from wxGTK in the next commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoMake wxDocTemplate::CreateDocument() exceptions-safe.
Václav Slavík [Mon, 7 May 2012 12:23:09 +0000 (12:23 +0000)] 
Make wxDocTemplate::CreateDocument() exceptions-safe.

Don't create the document object if InitDocument() throws.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix performance of wxHtmlParser::SkipCommentTag() in UTF-8 build.
Václav Slavík [Mon, 7 May 2012 11:15:31 +0000 (11:15 +0000)] 
Fix performance of wxHtmlParser::SkipCommentTag() in UTF-8 build.

Avoid computing the difference between two potentially distant
iterators, which is O(1) in wchar_t build, but O(n) in UTF-8 one.

See #13445.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix r71367: don't set bgCol twice needlessly.
Václav Slavík [Sun, 6 May 2012 16:56:38 +0000 (16:56 +0000)] 
Fix r71367: don't set bgCol twice needlessly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix wxOwnerDrawnComboBox background on with classic theme.
Václav Slavík [Sun, 6 May 2012 13:10:34 +0000 (13:10 +0000)] 
Fix wxOwnerDrawnComboBox background on with classic theme.

In wxMSW, if the classic theme was used, read-only wxOwnerDrawnComboBox
had gray background, but native look should be the same for both
editable and read-only combo boxes: white text entry-like rectangle.

Apparently, a similar problem existed with non-classic themes too
before, as there was a workaround in place. Fixed by moving the
workaround into code used by both themed and classic rendering.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoNo changes, just spelling corrections in the comments.
Vadim Zeitlin [Sat, 5 May 2012 14:09:59 +0000 (14:09 +0000)] 
No changes, just spelling corrections in the comments.

Closes #14275.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoUpdate the field widths on demand in wxStatusBarGeneric.
Vadim Zeitlin [Sat, 5 May 2012 11:22:09 +0000 (11:22 +0000)] 
Update the field widths on demand in wxStatusBarGeneric.

This ensures that the value returned from GetFieldRect() is always up to date,
even when this method is called from the user-defined wxEVT_SIZE handler, i.e.
before our own OnSize() could run.

Also remove the now unneeded hack with calling the base class OnSize() from
the statbar sample.

Closes #14268.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agofixes crashes with embedded controls in toolbars after toolbar destruction, code...
Stefan Csomor [Sat, 5 May 2012 05:32:19 +0000 (05:32 +0000)] 
fixes crashes with embedded controls in toolbars after toolbar destruction, code was moved in r62988, but apparently Destroy doesn't have to be called, so do a last check, fixes #14258

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDon't return NULL widget from wxFileCtrl page of widgets sample.
Vadim Zeitlin [Fri, 4 May 2012 22:20:59 +0000 (22:20 +0000)] 
Don't return NULL widget from wxFileCtrl page of widgets sample.

This makes all the common operations such as setting tooltip, colours &c on
this page simply crash.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDerive wxGenericFileCtrl from wxControl.
Vadim Zeitlin [Fri, 4 May 2012 22:20:55 +0000 (22:20 +0000)] 
Derive wxGenericFileCtrl from wxControl.

wxFileCtrl -- which can be #define'd as wxGenericFileCtrl -- is documented to
inherit from wxControl and does derive from it in the native GTK version, so
do it for the generic version too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoImprove documentation of wxDataViewCtrl mouse event handling.
Vadim Zeitlin [Fri, 4 May 2012 20:35:52 +0000 (20:35 +0000)] 
Improve documentation of wxDataViewCtrl mouse event handling.

Explain that catching mouse events directly doesn't work.

Also make it clear that double clicking an item can be caught by processing
wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED.

See #14111.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix precompiled headers use with MSVC in wxGTK sources.
Vadim Zeitlin [Fri, 4 May 2012 20:35:48 +0000 (20:35 +0000)] 
Fix precompiled headers use with MSVC in wxGTK sources.

Don't use PCH for C sources, do include wx/wxprec.h from all wxGTK C++
sources.

Closes #14224.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDeclare variables before doing anything else in C code.
Vadim Zeitlin [Fri, 4 May 2012 20:35:44 +0000 (20:35 +0000)] 
Declare variables before doing anything else in C code.

Don't put statements before variable declaration in C source file. This fixes
compilation with non C99-compliant C compilers such as MSVC.

See #14224.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAllow using non-MSW toolkit in MSVC-specific auto-linking header.
Vadim Zeitlin [Fri, 4 May 2012 20:35:41 +0000 (20:35 +0000)] 
Allow using non-MSW toolkit in MSVC-specific auto-linking header.

This makes it possible to auto-link wxGTK library when using MSVC too.

Closes #14272.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDefine wxCONCATn() macro up to n=9 from n=5 previously.
Vadim Zeitlin [Fri, 4 May 2012 20:35:37 +0000 (20:35 +0000)] 
Define wxCONCATn() macro up to n=9 from n=5 previously.

We'll need it for n=6 for the next commit, so increase the max value of n a
bit more.

See #14272.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoUse GTK-based wxWebView when using GTK+, not under Unix.
Vadim Zeitlin [Fri, 4 May 2012 20:35:33 +0000 (20:35 +0000)] 
Use GTK-based wxWebView when using GTK+, not under Unix.

Test for the GTK+ toolkit, not Unix platform to determine whether GTK+
wxWebView version should be used.

Closes #14273.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdd wxDir::GetNameWithSep() and use it to avoid consecutive slashes.
Vadim Zeitlin [Fri, 4 May 2012 20:35:31 +0000 (20:35 +0000)] 
Add wxDir::GetNameWithSep() and use it to avoid consecutive slashes.

It is wrong to use dir.GetName()+"/" to obtain a slash-terminated directory
name as this results in (usually harmless but at best ugly) double slashes at
at the beginning of the string for the root directory. Add GetNameWithSep() to
obtain the correct result in all cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDocument wxTP_DEFAULT as a standalone constant.
Vadim Zeitlin [Fri, 4 May 2012 20:35:26 +0000 (20:35 +0000)] 
Document wxTP_DEFAULT as a standalone constant.

Make sure the declarations in the documentation header can be really parsed.

Closes #14270.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDon't remove the last slash from "/" directory name under Unix.
Vadim Zeitlin [Fri, 4 May 2012 18:31:48 +0000 (18:31 +0000)] 
Don't remove the last slash from "/" directory name under Unix.

This was totally wrong as it returned empty string as (invalid) directory
name.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdd wxDropSource::SetIcon for wxGTK to mimic SetCursor on the other ports.
Robin Dunn [Thu, 3 May 2012 23:30:40 +0000 (23:30 +0000)] 
Add wxDropSource::SetIcon for wxGTK to mimic SetCursor on the other ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years ago* Change "def" to defResult as def is a reserved word in Python
Robin Dunn [Thu, 3 May 2012 23:30:33 +0000 (23:30 +0000)] 
* Change "def" to defResult as def is a reserved word in Python
* Correct some methods that were marked pure virtual but which aren't.
* etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agofix incorrect default values
Robin Dunn [Thu, 3 May 2012 23:30:27 +0000 (23:30 +0000)] 
fix incorrect default values

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoDocument wxDataViewChoiceByIndexRenderer.
Vadim Zeitlin [Thu, 3 May 2012 10:17:19 +0000 (10:17 +0000)] 
Document wxDataViewChoiceByIndexRenderer.

At least briefly document this class too and not only its parent
wxDataViewChoiceRenderer one.

Closes #14265.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoNo changes, just remove duplicate flags checks in wxUniv wxTLW.
Vadim Zeitlin [Thu, 3 May 2012 10:17:15 +0000 (10:17 +0000)] 
No changes, just remove duplicate flags checks in wxUniv wxTLW.

For some reason (rename of the old wxTHICK_FRAME to wxRESIZE_BORDER?) we
tested for wxRESIZE_BORDER twice in a couple of places. Don't do it for
clarity.

Closes #14264.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agouse explicit WakeUp variant, too many errors using heuristics, fixes #14176
Stefan Csomor [Wed, 2 May 2012 19:38:58 +0000 (19:38 +0000)] 
use explicit WakeUp variant, too many errors using heuristics, fixes #14176

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agomake WakeUp variant explicit, too many errors using heuristics, like #14176
Stefan Csomor [Wed, 2 May 2012 19:30:11 +0000 (19:30 +0000)] 
make WakeUp variant explicit, too many errors using heuristics, like #14176

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agofixes #14178
Stefan Csomor [Wed, 2 May 2012 18:44:23 +0000 (18:44 +0000)] 
fixes #14178

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFixed parts of toolbar background not being drawn with older comctl32.dll.
Dimitri Schoolwerth [Wed, 2 May 2012 14:44:45 +0000 (14:44 +0000)] 
Fixed parts of toolbar background not being drawn with older comctl32.dll.

When using comctl32.dll versions older than 6.0 toolbar icons would not have their background drawn. Fix this in a rough way by always completely erasing the background like was done before. Regression since r62971.

Closes #13512.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoGerman translations update from Thomas Krebs.
Vadim Zeitlin [Wed, 2 May 2012 10:37:36 +0000 (10:37 +0000)] 
German translations update from Thomas Krebs.

Closes #14262.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoFix destruction of wxDataViewCtrl's editor control.
Václav Slavík [Mon, 30 Apr 2012 14:51:52 +0000 (14:51 +0000)] 
Fix destruction of wxDataViewCtrl's editor control.

Don't pop event handler from the control more than once.

See r70002 and r70005 (which this reverts) for reference.

Fixes #14215.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agowxDataViewCtrl: always update the header when col best width changes.
Václav Slavík [Mon, 30 Apr 2012 09:33:30 +0000 (09:33 +0000)] 
wxDataViewCtrl: always update the header when col best width changes.

Have an explicit per-column dirty flag and use that to determine whether
we need to call wxHeaderCtrl::UpdateColumn(). Previously, the lack of
computed best width was used as an indicator, but this didn't work
correctly if some code called GetWidth() after invalidation but before
wxDataViewCtrl::UpdateColWidths() was called at idle time. This resulted
in header's column widths getting out of sync with the control itself.

Fixes #14167.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoInvalidate wxDataViewCtrl bests widths on expand/collapse.
Václav Slavík [Mon, 30 Apr 2012 09:33:25 +0000 (09:33 +0000)] 
Invalidate wxDataViewCtrl bests widths on expand/collapse.

The best column widths are computed from "realized" items that are
available as rows in wxDataViewCtrl. This information changes when a
previously collapsed node is expanded and new items become available for
column width calculation.

Fixes #14167.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoRespect minimal width in wxDataViewCtrl::GetBestColumnWidth().
Václav Slavík [Mon, 30 Apr 2012 09:33:21 +0000 (09:33 +0000)] 
Respect minimal width in wxDataViewCtrl::GetBestColumnWidth().

See #14167.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoWork around the problem with not exiting event loop under MSW.
Vadim Zeitlin [Sun, 29 Apr 2012 23:48:20 +0000 (23:48 +0000)] 
Work around the problem with not exiting event loop under MSW.

Changes of r71304 broke the event loop termination under MSW, limit them to
only the case in which they were really needed, i.e. when loop is really
exited by a pending event handler.

This is only a temporary solution, we need something better in longer term.

See #14250.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoNo changes, just refactor common IsSorted() tests in wxGTK wxDataViewCtrl.
Vadim Zeitlin [Sun, 29 Apr 2012 23:22:34 +0000 (23:22 +0000)] 
No changes, just refactor common IsSorted() tests in wxGTK wxDataViewCtrl.

Add wxDataViewCtrlInternal::ShouldBeSorted() helper instead of testing for
both IsSorted() and wxDataViewModel::HasDefaultCompare() in several places.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoNo real changes, just make wxDataViewCtrlInternal::IsSorted() const.
Vadim Zeitlin [Sun, 29 Apr 2012 23:22:32 +0000 (23:22 +0000)] 
No real changes, just make wxDataViewCtrlInternal::IsSorted() const.

This is a simple accessor, should have been const since the beginning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoUse PCH in the tests in all Windows ports and not only when using wxMSW.
Vadim Zeitlin [Sun, 29 Apr 2012 23:22:28 +0000 (23:22 +0000)] 
Use PCH in the tests in all Windows ports and not only when using wxMSW.

This change doesn't actually change anything for the "normal" ports as it only
affects wxGTK/MSW which is not officially supported yet, so the make/project
files are unchanged by it.

Closes #14249.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoAdded wxDataViewEvent::SetDragFlags() and GetDropEffect() methods.
Vadim Zeitlin [Sun, 29 Apr 2012 23:22:25 +0000 (23:22 +0000)] 
Added wxDataViewEvent::SetDragFlags() and GetDropEffect() methods.

Allow specifying the drag operation flags and retrieving the drop effect when
it's over for wxDataViewCtrl drag-and-drop.

Currently this is only implemented in the generic version.

Closes #12583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoSet the data size in wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE in wxGTK.
Vadim Zeitlin [Sun, 29 Apr 2012 23:22:21 +0000 (23:22 +0000)] 
Set the data size in wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE in wxGTK.

Allow wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE handler to examine the data
being dragged by setting not only the pointer to it but also its size, as
otherwise it's impossible to do anything with it.

See #12583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoExplicitly document wxDrag_XXX flags.
Vadim Zeitlin [Sun, 29 Apr 2012 23:22:18 +0000 (23:22 +0000)] 
Explicitly document wxDrag_XXX flags.

They were mentioned in DoDragDrop() documentation but not documented on their
own. Do it now to be able to refer to them from elsewhere.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 years agoRemove internal only methods from wxDataViewEvent documentation.
Vadim Zeitlin [Sun, 29 Apr 2012 23:22:16 +0000 (23:22 +0000)] 
Remove internal only methods from wxDataViewEvent documentation.

SetDataXXX() methods are only meant to be used by wxDataViewCtrl itself, so
don't document them as part of public API. Their documentation was pretty
useless anyhow as it didn't say anything not already contained in the method
name.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775