Vadim Zeitlin [Wed, 2 Oct 2013 16:25:04 +0000 (16:25 +0000)]
Add wxActivateEvent::GetActivationReason().
This method is implemented for wxMSW-only currently and allows to check
whether the window is being activated by a mouse click or in some other way
there.
Vadim Zeitlin [Tue, 1 Oct 2013 17:09:02 +0000 (17:09 +0000)]
Remove support for Gnome printing from wxGTK.
It was replaced by GTK+ printing several years ago and is almost never used
any longer anyhow, so any problems in this code (and there are some) would
never be found and fixed.
Also update the message catalogs to avoid having the strings not used any
more, as they were only used in Gnome printing code.
Paul Cornett [Tue, 1 Oct 2013 16:33:30 +0000 (16:33 +0000)]
Go back to using a fixed value of 3 for lines/columns per action for mouse wheel event.
The native value is too large. Reverts the effect of r74805. Closes #15527
Vadim Zeitlin [Tue, 1 Oct 2013 16:08:55 +0000 (16:08 +0000)]
Install wxrc with proper library dependencies under OS X.
In addition to changing the libraries themselves to point to the dependencies
in their installed location, we also need to do the same thing for wxrc when
installing it under OS X, otherwise it wouldn't run once the libraries are not
available in their original location any more.
Vadim Zeitlin [Tue, 1 Oct 2013 16:08:50 +0000 (16:08 +0000)]
Remove unused debian subdirectory.
All Debian-based distributions use their own files for creating their
packages, so get rid of our own "debian" subdirectory to avoid confusing
people and to not have to maintain them any more.
Vadim Zeitlin [Tue, 1 Oct 2013 13:03:20 +0000 (13:03 +0000)]
Use wxListCtrl screenshots for wxListView as well.
wxListView appears identically to wxListCtrl in report mode and the existing
wxListCtrl screenshots show it exactly in this mode, so it doesn't make much
sense to duplicate them.
This also avoids Doxygen warnings about missing wxListView screenshots for
MSW and OSX.
Václav Slavík [Tue, 1 Oct 2013 12:19:56 +0000 (12:19 +0000)]
Destroy the wxDialog::ShowWindowModalThenDo() functor a.s.a.p.
Previously, the functor was kept in a helper event handler that was bound to
wxEVT_WINDOW_MODAL_DIALOG_CLOSED and only marked as already called, but never
unbound. Consequently, the functor object remained allocated for as long as the
event table existed and was only freed with the dialog instance.
Change the logic to destroy the functor object as soon as it was called and is
no longer needed for anything.
This is particularly important when used with C++11 lambdas that capture the
dialog in a wxWindowPtr pointer, because the pointer would be retained forever
otherwise.
Fix crash when auto-sizing a wxDataViewCtrl column.
The code was confused about the difference between the model and view columns
indices and incorrectly used the former as the latter, which could result in
an out of bound array access.
Define __MINGW64_TOOLCHAIN__ and __MINGW32_TOOLCHAIN__ symbols.
__MINGW64_TOOLCHAIN__ macro is more readable and shorter than the standard
predefined __MINGW64_VERSION_MAJOR and __MINGW32_TOOLCHAIN__ is defined for
the symmetry and also because it will make many tests simpler as we often
need to test not so much for MinGW-w64 for its own sake but rather to disable
the workarounds for MinGW32 when using it.
Fix problem with COMDLG_FILTERSPEC declaration with MinGW-w64 4.8.
Forward declaring as a struct a symbol previously defined as a typedef results
in an error when using MinGW-w64 4.8.1, so forward declare the struct itself
instead.
Use GetParamAsXXX() accessors instead as they combine the calls to HasParam()
and GetParam() and make the code shorter and avoid the duplication of the tag
name.
wxRTC: fixed guidelines overwriting adjacent cell borders; corrected capitalisation in command labels; now sends text update event when an object is changed.
Václav Slavík [Sat, 21 Sep 2013 10:11:08 +0000 (10:11 +0000)]
Make public headers compatible with Objective-C++ with ARC.
OSXGetViewOrWindow() virtual methods were defined in headers and were casting
NSView*/NSWindow* to void*, which the compiler complains about with ARC
enabled. Rather than writing conditional code in the header, move the
implementations into .cpp files. They were virtual anyway, so this is no less
efficient, and doesn't leave any problematic code in public headers.
Václav Slavík [Sat, 21 Sep 2013 09:28:47 +0000 (09:28 +0000)]
Revert "using #ifdef wxABORT_ON_CONFIG_ERROR not just #if as elsewhere"
This reverts commit r74656, because it breaks initialization order by
calling OnInit() too late. See
https://groups.google.com/d/topic/wx-dev/H5vgc2VO7K4/discussion
Use std::isfinite() for wxFinite() for C++11 compilers.
This should fix compilation with MinGW 4.8.1 cross-compiler in C++11 mode as
it doesn't seem to provide finite() any more then.
Also, only defined wxFinite() and wxIsNaN() for C++, not C. This makes the
checks for __cplusplus >= 201103 simpler and is consistent with how
wxIsSameDouble() and wxRound() were already only defined for C++ (this is also
the source of most of the changes in this diff, viewing it ignoring whitespace
will show the only real changes).
Václav Slavík [Wed, 18 Sep 2013 16:03:31 +0000 (16:03 +0000)]
Add wxTranslations::GetTranslatedString().
Replace GetString(), which always returns something (possibly the
original string) with GetTranslatedString() that returns either a
pointer to translated string or NULL.
This simplifies the code a bit, all handling of missing translations is
now done in wxGetTranslation().
Václav Slavík [Wed, 18 Sep 2013 16:03:20 +0000 (16:03 +0000)]
Make _() and friends safe to call from any thread.
The GetUntranslatedString() hack keeps a global copy of all strings, so
that it can return a const reference as wxGetTranslation() return value.
A global wxHashSet instance shared by all threads won't do, even guarded
with a critical section, because it may internally copy values on any
insert and thus invalidate pointers that may still be used on another
thread.
Add wxDataViewRendererBase::GetEffectiveAlignment() and use it.
This helper method falls back on the alignment of the column if the renderer
alignment is not specified. This is almost always what should be used instead
of GetAlignment() to determine the alignment that really should be used in the
drawing code.
In particular, using GetEffectiveAlignment() in wxDataViewCustomRenderer fixes
the problem with bitmap columns ignoring column alignment for their bitmaps.
Show full screen windows with WS_POPUP style in wxMSW.
This doesn't make any difference for most windows but fixes a problem with
wxGLCanvas windows using stereo support of Nvidia cards and generally it does
make sense to use WS_POPUP with full screen windows as they are definitely not
overlapped, so just use this style unconditionally.
Propagate the event handling fixes to wxVarScrollHelperBase.
Merge the fixes to wxScrollHelperBase::ProcessEvent() of r64358, r64370,
r64464, r72939 and possibly a few more in wxVarScrollHelperBase to fix its
behaviour too, as it wasn't generating the correct events any longer.
Unfortunately the fix right now is to physically copy the code from one class
to the other. This should be avoided, of course, and a more in depth
refactoring should be done to move the code common to both classes into
wxAnyScrollHelperBase after 3.0 release. But for now continuing to duplicate
code is better than not having a working wxVarScrollHelperBase.
Add wxAnyScrollHelperBase to reduce code duplication in wxVarScrollHelperBase.
This is just a small refactoring to move some trivially common parts of
wxScrollHelperBase and wxVarScrollHelperBase in a new common base class.
This will make it possible to apply other corrections to wxVarScrollHelperBase
without having to physically duplicate the code from wxScrollHelperBase in it.
Fix flickering of wxStaticBox background in wxMSW.
First of all, don't erase background in WM_ERASEBKGND at all if we erase it
anyhow in WM_PAINT, this is totally useless and is what wxBG_STYLE_PAINT is for.
Second, clip out not only the siblings of the static box but also its children
when erasing the background to avoid painting over the controls created as the
box children, which is the preferred way to create them now.