wxExecute() closes all file descriptors in the forked child process.
This is a common practice, but it unfortunately breaks in combination
with libdispatch on OS X, which - instead of gracefully handling the
situation - intentionally(!) crashes when something closes its kevent
file descriptor in OS X 10.8.
There's doesn't seem to be a simple way to get this descriptor and
there's no telling when libdispatch is pulled into the executable, so
just leave the file descriptors be when running under Darwin, until a
better fix is found.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code mistakenly assigned the lowest possible priority (0, in wx's
numbering), while the intention probably was to have the same default as
wxProcess, which is 0 in POSIX numbering and 50== wxPRIORITY_DEFAULT in
wx's.
Fixes permission denied errors if lowering priority is not permitted.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The ribbon unexpectedly showed itself on focus loss when it was minimized.
Fix this and also use switch statement on m_ribbon_state to ensure that the
compiler warns us if we forget to add the code for handling any new elements
of wxRibbonDisplayMode enum.
Closes#15381.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
While "!a & b" is the same as "!(a & b)" when "b" is a single bit, the latter
is much more standard and more clear, so write this test (added in r71704)
like this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This change slightly improves wxBufferedDC and wxBufferedPaintDC behaviour
when the origin of the DC is shifted, but they still don't work quite right in
this case as they don't use the buffer area of correct size in this case,
which results in cropping the final bitmap (as can be seen in the drawing
sample, which was modified to show wxBufferedPaintDC in action).
Closes#15497.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows the program to distinguish between some other, unspecified,
warnings and this one which can and does happen whenever too many changes
occur too quickly but which has a clearly defined work around: the state kept
inside the program just needs to be refreshed by rescanning the directory anew.
See #12847.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
They were compared inconsistently with the numbers and strings, -1 is supposed
to be returned if the first element is less than the second one, not 1.
Closes#15406.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explicitly use wxConvLibc with wxTextInputStream to make sure we correctly
decode non-ASCII data in the subprocess output.
This is a hack, the real solution would be to make wxTextInputStream work
properly with wxConvAuto.
See #14720.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make the code consistent with wxScrolledWindow and fix the problem with wheel
events always being skipped by wxVScrolledWindow which could result in
processing them multiple times, e.g. for the window itself and its parent as
it happened with wxPGChoiceEditor cells in wxPropertyGrid.
Closes#15547.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
SetDllDirectory() modifies the per-process DLL loading behaviour which is
already unexpected as it can affect other threads, running code completely
unrelated to wxWidgets, but, even worse, we can't undo its effect as calling
SetDllDirectory(NULL) as we used to discarded any changes to the DLL directory
done by the program itself, while restoring the result of GetDllDirectory()
would never restore the "compatible" algorithm for DLL search used by default.
So the simplest, and the only 100% correct solution, is to not call this
function at all from here and call it from some higher level code only, either
in the user application or wxPython itself.
Closes#15534.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We can't rely on our own globals being already constructed if we're called
during another global initialization, so use the usual trick with wrapping
them in accessor functions to ensure that they are.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Assigning __sync_sub_and_fetch() result to an unused variable can result in it
being optimized away and the function support is then not really tested for,
see #4542. So do make sure this variable is kept by making it volatile.
Closes#15555.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
MyFrame doesn't exist at all and was just confusing; DrawingView does exist
but is declared in view.h and is not needed in this header.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Format documentation was nonexistent (the few words present were
incorrect). Document my best guess about the intended usage.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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.
Closes#15551.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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.
Closes#15516.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use wxMouseEventHandler() instead of (wrongly) casting a method taking
wxMouseEvent to wxEvent-taking wxObjectEventFunction.
Closes#15550.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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.
Closes#15517.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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.
Closes#15452.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775