Václav Slavík [Thu, 3 Oct 2013 11:08:44 +0000 (11:08 +0000)]
XRC spec: relax requirements on some commonly omitted properties.
Some properties documented as required, such as labels on wxStaticText
or wxCheckBox or the size of wxSizer spacers, are frequently omitted in
practice.
Rather than strictly requiring them, forcing the markup to include dummy
empty elements, loosen the restriction in the spec and make them
optional. Nothing changes about actual acceptance of files by
wxXmlResource: it would already silently deal with the lack of these
properties.
Vadim Zeitlin [Thu, 3 Oct 2013 10:34:49 +0000 (10:34 +0000)]
Fix install_name_tool calls in OS X "make install".
Unfortunately the changes of r74909 (see #15452) don't seem to have been
tested and broke "make install" completely as libraries were not found in the
"bin" directory where the script was looking for them. Fix it to use "lib"
subdirectory as intended.
Vadim Zeitlin [Wed, 2 Oct 2013 23:32:06 +0000 (23:32 +0000)]
Avoid dropping events in wxDocParentFrameAnyBase in some circumstances.
The code trying to avoid forwarding duplicate events to wxDocManager was over
eager and in some situations filtered out the events which hadn't been sent to
it yet and were, in fact, not handled at all. This could be seen, for example,
by running the docview sample with "--sdi" command line option, creating one
child frame and then trying to create another one from the parent frame menu:
this failed because the existence of a valid child was considered to be enough
for the event to have been already processed in it which was false in this case.
Unfortunately there is no obvious fix to this problem, notably because of the
very roundabout way the toolbar events are processed in MDI windows: the
toolbar itself is a child of the parent frame but the events from it are still
sent to the currently active child frame by wxMDIParentFrameBase. So we can't
rely on any kind of parent-of-originating-window checks.
Instead, remember the last event handled in the child and avoid processing the
same event in wxDocManager again. This should at least avoid the false
positives (like the one fixed by this commit), although it could still result
in false negatives (i.e. some duplicated events) if an event handler generated
other events while skipping the original one. This is a lesser evil though and
should be relatively rare in practice, so live with this ugliness until
someone comes with another idea of fixing the bug described above.
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.