Commit Graph

56372 Commits

Author SHA1 Message Date
Vadim Zeitlin
55fd62c1e3 Open debugger at the location of failing assert, if possible.
Break into the debugger in the function containing the assert that failed
instead of inside wxWidgets assert handler which is several (~8) levels below
the last line of the user code. This is much more useful in practice and also
less confusing.

Currently this only works for MSVC as the other compilers don't have any
__debugbreak intrinsice equivalent.

Also update the except sample to test wxTrap() directly too.

Closes #11184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-04 00:39:29 +00:00
Paul Cornett
f3ddefc1ad Remove SashHitTest() "tolerance" parameter
Mouse events (LeftDown in particular) will only occur if the mouse is over the
sash, so it does not make sense to have a fudge factor


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-03 18:14:55 +00:00
Paul Cornett
bea20f8d7a Avoid setting sash resize cursor when mouse is still over border of second pane with wxGTK
This made it possible to have the resize cursor, but not be able to drag the
sash, and happened because wxGTK sends a leave event when mouse leaves client
area instead of outer border of window. Setting the useless SashHitTest()
"tolerance" parameter to zero avoids the problem.
Fixes #1397


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-03 18:04:46 +00:00
Paul Cornett
59ee332f1e Fix SashHitTest() returning true one pixel past the sash
If the sash is n pixels wide, the last position over the sash is start + n - 1, not start + n


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-03 17:37:54 +00:00
Vadim Zeitlin
f1021a56a6 Exclude files in vendor branches from svn hook checks.
These files correspond to upstream sources and shouldn't be subject to our
checks.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-03 17:05:07 +00:00
Vadim Zeitlin
5b82415eba wxGTK linking fix after r73102.
Remove SendSelectionChangedEvent() declaration, it's now in the base class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-03 00:34:28 +00:00
Vadim Zeitlin
5edaa5ebb0 Correct lookup of Explorer-specific file association information.
The code added in r52154 never worked because it was looking for the Progid
value in a wrong place, look for it under UserChoice subkey where it really
is.

Also add a way to look up the command to open files with the given extension
to the exec sample.

Closes #12302.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 23:50:33 +00:00
Vadim Zeitlin
e9f012bc4c No changes, just reorganize the menu slightly in the exec sample.
Move all file association related commands under "File" menu from the "Exec"
one, having them there makes more sense and "Exec" menu is already quite big.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 23:50:10 +00:00
Vadim Zeitlin
d180df5c43 Allow specifying -1 as font size to mean "default" in wxMSW.
This has never been officially documented but used to work in 2.8 and still
works in wxGTK, so make it works in wxMSW too for consistency.

Closes #12541.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 23:49:48 +00:00
Vadim Zeitlin
65676a2882 Make wxChoice and wxComboBox behaviour same as in native controls in wxMSW.
Keep the item selected from the drop down using keyboard when switching away
from the control by pressing TAB: although this generates CBN_SELENDCANCEL
notification, the selection is actually kept by the native controls in this
case, so don't reset it ourselves -- even though it makes sense, it makes wx
applications behave differently from the native ones.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 23:49:25 +00:00
Vadim Zeitlin
7bc740719c Add wxControlWithItems::SendSelectionChangedEvent() helper.
Reuse the same event generation code for wxChoice in wxMSW, wxGTK and wxOSX
and also wxComboBox in wxMSW and wxGTK instead of duplicating it (incompletely
and so partially incorrectly in wxOSX case).

This is just a refactoring so no changes in behaviour.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 23:48:59 +00:00
Vadim Zeitlin
4d3845c073 Avoid using "do { ... } while ( wxFalse )" pseudo-loop.
This loop can't be optimized away by the compiler because wxFalse is an extern
variable which can't be known to be always false. Additionally, this creates
many false positives from Coverity as it assumes that the loop can be executed
more than once.

Define wxSTATEMENT_MACRO_BEGIN/END macros abstracting the exact solution used
and replace wxFalse with "(void)0, 0" for now as this seems to placate MSVC
(which warns about using a bare "0" as a condition) while still allowing the
loop to be completely optimized away.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 23:48:36 +00:00
Vadim Zeitlin
aa29d293df Warn, don't assert, about unexpected inotify events.
In practice we seem to be getting some unexpected inotify() events during
heavy IO activity. This shouldn't happen but it does, so at least don't
prevent the program from running by popping up the assertion dialog when it
happens.

Closes #14854.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 20:24:38 +00:00
Paul Cornett
ba49d2acf9 simplify code so it always returns the same object
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 05:48:24 +00:00
Paul Cornett
46421f2471 clean up wxCairoRenderer initialization mess
Remove unused Unload(), wxCairoCleanUp(), m_loaded and gCairoRenderer, and redundant Load()
and EnsureIsLoaded(). Just call wxCairoInit() directly, and for GTK do nothing at all.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 05:11:25 +00:00
Paul Cornett
b3ee9f4d2e remove unnecessary include of wx/cairo.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 03:35:37 +00:00
Paul Cornett
9f692b010e Remove nearly empty wx/cairo.h header
It does so little now it's not worth having. And it should not have been a public header.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-02 02:28:48 +00:00
Paul Cornett
ea92bb677d use stock colour/pen/brush objects in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 23:06:50 +00:00
Paul Cornett
0856cb2562 use new pen/brush style names in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 22:34:07 +00:00
Paul Cornett
de91443612 remove colour/pen/brush arguments which are the default in the samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 22:14:36 +00:00
Vadim Zeitlin
c4c87bf22b Use disabled colour for the dropdown arrow of disabled ribbon.
Previously the normal colour was used for the arrow in MSW art provider even
if the ribbon was disabled.

Closes #14864.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 00:14:54 +00:00
Vadim Zeitlin
04783062e2 Miscellaneous spelling and typo fixes in the documentation.
Closes #14866.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 00:14:31 +00:00
Vadim Zeitlin
0824e36969 Fix premature truncation of brief descriptions in Doxygen comments.
Don't end the brief description at the first period if it's a period which is
part of "i.e." or "e.g.": escape the space following it to prevent Doxygen
from recognizing it as an end of sentence.

See #14866.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 00:14:07 +00:00
Vadim Zeitlin
faadbe6f39 Fix documentation of wxGridBagSizer::Add() spacer overload.
Describe the width and height parameters.

See #14866.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 00:13:40 +00:00
Robin Dunn
c1bd5a6d3f Interface fixes for Phoenix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-30 22:28:11 +00:00
Paul Cornett
88932ec82d simplify code to return from the end of the function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-30 18:21:45 +00:00
Paul Cornett
40a66cfd6a indentation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-30 18:01:53 +00:00
Paul Cornett
f81bc2ba5e move wxGet{Colour,Font}FromUser() out of utilscmn.cpp so they don't have to be in every app that links statically
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-30 06:56:50 +00:00
Vadim Zeitlin
dab61056c8 Don't assert when stopping watching a just renamed file.
(Almost) silently ignore renames of the files which we don't watch any longer
instead of asserting if this happens.

Closes #14863.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-29 22:03:21 +00:00
Vadim Zeitlin
0a41f17e0b Log invalid inotify() events without a valid watch descriptor.
Apparently we can get events without any valid watch descriptor, even though
this is not supposed to happen. At least warn about them.

See #14854.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-29 22:02:58 +00:00
Vadim Zeitlin
8ded8d08ab Correct handling of IN_Q_OVERFLOW in wxFileSystemWatcher Linux code.
Don't use wd field if it's -1 which can happen for IN_Q_OVERFLOW.

See #14854.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-29 22:02:36 +00:00
Julian Smart
94323b60e3 Cope with the common case of utf-8 being specified in the .hhp file, and convert the book title.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-29 10:17:00 +00:00
Paul Cornett
8c1c11d689 declare wxQsort in vector.h as well as utils.h to work around circular header dependency mess
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-29 07:53:21 +00:00
Jouk Jansen
baf60823a6 Do not use GTKIsUsingGlobalMenu when compiled against gtk1.x
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-29 07:00:39 +00:00
Vadim Zeitlin
0c2e6e8b36 Fix bezel used for bitmap buttons in wxOSX/Cocoa.
Don't use NSRoundedBezelStyle for bitmap buttons as this bezel has fixed
height. Instead, use NSRegularSquareBezelStyle which can used with buttons of
any size and is the correct bezel to use for the buttons mostly identified by
their icon according to Apple docs.

Notice that we still use the standard bezel for the "small" (where "small" is
arbitrarily defined by the hard coded 20 pixels height) icons as those are
usually used in addition to the text and not replacing it and so it makes more
sense to use the same bezel as for the normal buttons for them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 23:56:38 +00:00
Vadim Zeitlin
6ceeeafd56 Select the entire spin control contents when changing its value.
Selecting the entire contents makes it more convenient for the user to enter
the new value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 23:56:16 +00:00
Vadim Zeitlin
eff339168e Handle Shift-TAB correctly in wxOSX/Carbon wxComboBox.
The navigation event direction should depend on Shift key state.

See #3821.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 23:55:53 +00:00
Stefan Csomor
8e64b8fe6e adding some additional fixes for programmatic selection handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 20:57:59 +00:00
Robin Dunn
bc4a20051e Compilation fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 17:14:35 +00:00
Vadim Zeitlin
34ece4ff0e Compilation fixes after r73050.
See #14862.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 15:42:18 +00:00
Vadim Zeitlin
d3feb55c49 Add "rect" paramerer to wxRichToolTip::ShowFor().
Allow to show the tooltip at the exact specified position instead of placing
it automatically.

Closes #14862.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 14:18:17 +00:00
Vadim Zeitlin
0555b2a0a3 Add missing wxUSE_OLE checks to safearray.cpp.
Fix compilation with wxUSE_OLE==0.

Closes #14860.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 14:17:53 +00:00
Vadim Zeitlin
8f2a8df48f Compilation fix for wxDocManager after r73004.
Define GetXXXVector() methods after all the classes are fully declared to
ensure that static_cast<> inside wxList::AsVector() they use compiles with the
OpenVMS compiler.

See #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 14:17:30 +00:00
Stefan Csomor
cb04da13bd support for inheriting non-standard attributes (explicit fonts instead of window variants), fixes #3583
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 10:13:41 +00:00
Stefan Csomor
1e70e497e2 supporting selection methods when not focused, closes #1480
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-28 08:51:56 +00:00
Stefan Csomor
f731483ded simulating focus events, see #13495
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-27 19:16:21 +00:00
Stefan Csomor
3af58289f5 support for simulating focus events since not all controls can be focused
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-27 19:09:41 +00:00
Stefan Csomor
e5021b23c9 emulating wx' focus-lost behavior
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-27 13:23:46 +00:00
Stefan Csomor
9656c0dd1b spell error fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-27 13:22:26 +00:00
Stefan Csomor
96943967a5 workaround, see #14856
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-27 08:29:24 +00:00