Restore explicit conversion of wxString to char*, there is no implicit
conversion in wxUSE_STL build.
Use utf8_str() instead of c_str() removed by r71467 however as this is what we
need for wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "%ld" instead of "%d" to format long values, using "%d" results in an
assert failure under LP64 systems as int and long have different sizes there.
Closes#14311.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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