Commit Graph

57699 Commits

Author SHA1 Message Date
Václav Slavík
74af3fcecc Workaround OS X crash when closing FDs in wxExecute.
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
2013-10-07 11:43:10 +00:00
Václav Slavík
d92a17f52d Fix wxExecute() default priority if wxProcess is not used.
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
2013-10-07 11:43:06 +00:00
Stefan Csomor
36656b6ce2 adding getURL hook
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 11:23:12 +00:00
Stefan Csomor
c902d81d44 completing OnInit rework for getURL and printFiles callback
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 11:12:41 +00:00
Vadim Zeitlin
62fe7a015a Fix unwanted ribbon expansion on focus loss.
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
2013-10-07 09:59:03 +00:00
Vadim Zeitlin
d3a9b6a331 Make the test for wxBUFFER_VIRTUAL_AREA in wxBufferedDC code more clear.
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
2013-10-07 09:59:01 +00:00
Vadim Zeitlin
9273033d5a Partially account for the shifted origin in wxBufferedDC.
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
2013-10-07 09:58:56 +00:00
Vadim Zeitlin
d32895c5d8 Generate events with specific wxFSW_WARNING_OVERFLOW type if applicable.
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
2013-10-07 09:58:51 +00:00
Vadim Zeitlin
1fd9d44670 Correct sorting order for doubles and wxDateTime in wxDataViewModel.
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
2013-10-07 09:58:46 +00:00
Vadim Zeitlin
1efdf9cd65 Handle comparisons of boolean and icon-text items in wxDataViewModel.
For some reasons these types were not handled in wxDataViewModel::Compare(),
unlike all the other standard ones.

Closes #15407.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-07 09:58:41 +00:00
Stefan Csomor
7c7cfb16d3 get OnInit with complete functionality without loosing sequence for MacOpenFile being called after OnInit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-06 21:12:45 +00:00
Vadim Zeitlin
a05ae051d8 Fix capturing non-ASCII output using wxExecute().
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
2013-10-05 23:30:52 +00:00
Vadim Zeitlin
8155d71a7d Improve handling of keyboard entry using IME.
Pass the keyboard events to the IME before generating our events for them, the
IME may need them for its own use.

Closes #15384.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 23:30:45 +00:00
Julian Smart
69a36314cd Use the correct attributes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 19:50:36 +00:00
Julian Smart
9dc7358017 wxRTC: fixed bug with columns with unspecified widths, and column spans, being sized too small
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 16:31:30 +00:00
Paul Cornett
a599b4b5d7 Fix default size of un-resizable windows, broken in r74685
see #14870
closes #15549


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 16:20:06 +00:00
Julian Smart
42b2ebfdbb Provide a fallback text colour for text in wxRTC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 16:15:12 +00:00
Julian Smart
a4f491405d Changed the capitalisation of 'span' of Set/GetRow/Colspan to be less jarring
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 15:35:05 +00:00
Vadim Zeitlin
e3d4bdd52b Don't skip handled mouse wheel events in wxVScrolledWindow.
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
2013-10-05 15:05:41 +00:00
Vadim Zeitlin
1d31e79e5d Replace c_str() with t_str() in wxWinCE code.
This should work correctly even in UTF-8 build, should someone want to use it
under Windows CE.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 15:05:38 +00:00
Vadim Zeitlin
5dcfc82cca Don't call SetDllDirectory() when loading dynamic libraries in wxMSW.
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
2013-10-05 15:05:32 +00:00
Julian Smart
f58377dde1 Implemented collapsed borders for wxRTC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-05 15:01:20 +00:00
Vadim Zeitlin
52afc093fd Fix crash when accessing wxThreadInfo during global initialization time.
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
2013-10-05 00:05:36 +00:00
Vadim Zeitlin
15a1c3b2ef Work around g++ atomic builtins detection in configure when -Os is used.
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
2013-10-04 23:48:22 +00:00
Vadim Zeitlin
37da97096b Turkish translations update from Kaya Zeren.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74933 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-04 23:48:19 +00:00
Vadim Zeitlin
9bd574841d Remove unnecessary forward declarations from the docview sample.
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
2013-10-04 23:48:15 +00:00
Julian Smart
5d72892ebc Added conversion from points
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-04 12:34:41 +00:00
Julian Smart
070af26558 Corrected border drawing to avoid clipping
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-04 07:57:26 +00:00
Julian Smart
fc8a2ec1f6 wxRTC table layout now uses cell content to calculate column widths if no other widths specified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-04 05:51:36 +00:00
Julian Smart
0d60cffa2e Include wxWANTS_CHARS style unless wxTE_READONLY is specified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-03 12:12:07 +00:00
Václav Slavík
60f8d69a98 Add RELAX NG schema for XRC files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-03 11:08:57 +00:00
Václav Slavík
62795f413a Misc validity fixes to samples/xrc/rc/*.xrc.
Fix invalid XRC markup.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-03 11:08:54 +00:00
Václav Slavík
f6ac9c6240 XRC spec: document wxRibbon* XRC handler.
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
2013-10-03 11:08:48 +00:00
Václav Slavík
497bf19285 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.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-03 11:08:44 +00:00
Václav Slavík
4675b83aad XRC spec: document the "title" property for wxWizard.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-03 11:08:42 +00:00
Václav Slavík
5b079588a0 XRC spec: document the "focused" window property.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-03 11:08:39 +00:00
Vadim Zeitlin
da6f998486 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.

Closes #15551.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-03 10:34:49 +00:00
Vadim Zeitlin
4e21ce0825 Romanian translations fixes from Catalin Raceanu.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-03 10:34:46 +00:00
Vadim Zeitlin
e118367990 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.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 23:32:06 +00:00
Vadim Zeitlin
736692f3a4 No changes, just fix a typo in a comment in wx/docview.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 23:32:03 +00:00
Vadim Zeitlin
e90d566109 No changes, just fix a typo in a comment in docview event handling code.
This code is non-trivial enough without confusingly calling a view "new".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 23:32:00 +00:00
Vadim Zeitlin
94aceba7f9 A couple of fixes to Brazilian Portuguese translations from Felipe.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 22:55:08 +00:00
Vadim Zeitlin
4521f6c88c 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.

Closes #15516.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 16:25:04 +00:00
Vadim Zeitlin
30a7e91fb0 Fix incorrect event handler functions casts in wxRibbonPanel code.
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
2013-10-02 16:24:59 +00:00
Vadim Zeitlin
42ed9e53ad Add more checks for Intel compiler.
This should have been part of r74888.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 23:04:51 +00:00
Vadim Zeitlin
9ed99f82da 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.

Closes #15517.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 17:09:02 +00:00
Paul Cornett
afab8b85c4 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


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 16:33:30 +00:00
Julian Smart
4b263e5ef3 Further refine of #15226: wxRichTextCtrl: Implement setting properties with undo for objects e.g. wxRichTextTable (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 16:33:24 +00:00
Vadim Zeitlin
c9c6a86918 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.

Closes #15452.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 16:08:55 +00:00
Vadim Zeitlin
c136209446 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.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 16:08:50 +00:00