Commit Graph

56398 Commits

Author SHA1 Message Date
Vadim Zeitlin
45b7796de5 Initialize wxRibbonBar::m_help_button_hovered.
This variable was never initialized, do it now.

See #14868.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-11 01:32:38 +00:00
Vadim Zeitlin
7c211441f4 Use wxSetWorkingDirectory() instead of chdir().
This fixes compilation of wxGTK under Windows after the changes of r72779 and
r72780, where _wchdir() would need to be used but we don't currently have a
wxChdir() CRT function wrapper so use wxSetWorkingDirectory() instead.

Closes #14886.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-10 14:41:31 +00:00
Vadim Zeitlin
6a5c9ff8e8 Readded tiffconf.h removed by libtiff 4.0.3 merge.
This file is needed by Windows builds.

Should have been part of r73157, see #12301.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-10 14:30:37 +00:00
Vadim Zeitlin
8f9acf6cc9 Bakefile updates for libtiff 4.0.3 merge.
This should have been part of r73157,

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-10 14:27:44 +00:00
Vadim Zeitlin
80ed523f33 Merged libtiff 4.0.3 changes into the trunk.
This should help with making libtiff work better in 64 bit builds as libtiff 4
is supposed to support them much better.

Closes #12301.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-10 14:01:44 +00:00
Robin Dunn
3497ab0e3b typo fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 21:04:50 +00:00
Vadim Zeitlin
548b4ce1ce Document wxXmlResourceHandler::GetFloat().
Closes #14879.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 13:47:45 +00:00
Vadim Zeitlin
223862cbd3 Also account for EOL chars correctly in wxStyledTextCtrl::GetLineLength().
Make GetLineLength() consistent with GetLineText() after the changes of
r73140.

Closes #13646.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 13:27:55 +00:00
Vadim Zeitlin
84c6c2121b Document wxWindow::Get{Min,Max}{Width,Height}().
These methods were not documented and somehow inherited the description of the
first method of the group they were in, which didn't make any sense for them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 13:22:28 +00:00
Vadim Zeitlin
adba5bab81 Don't test for key code being valid unnecessarily.
The key code was already found to be valid just above, so suppress Coverity
warning about an always true test by not checking it again. This also makes
the code more clear.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:38 +00:00
Vadim Zeitlin
b215dafcf1 Remove unnecessary default from a switch statement.
Don't check for impossible enum element value, it's better to not have the
default clause at all to get a warning from g++ if this enum ever changes
later. And for now the presence of default results in a warning from Coverity
about unreachable code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:36 +00:00
Vadim Zeitlin
30915cf22f Fix copy/paste error in UnsetConstraints().
"top" was mistakenly used in the code dealing with "left" constraint.

Thanks to Coverity for finding this one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:33 +00:00
Vadim Zeitlin
bcfe86f0b5 Check gtk_tree_model_iter_nth_child() return value in wxChoice code.
This is probably harmless but check the return value just to suppress Coverity
warning about not doing it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:31 +00:00
Vadim Zeitlin
4d35172f52 Don't use values returned by lstat() if it failed in wxFileCtrl code.
The buffer may be uninitialized or at least not contain the correct data if
lstat() failed, don't use it in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73144 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:28 +00:00
Vadim Zeitlin
bd9fd76ec7 Check wxDir::GetNext() return value in wxFindNextFile().
This doesn't really change anything as the returned value would be empty
anyhow in case of an error, but suppresses Coverity warning about not checking
the return value of a function whose return value is checked in other places.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:25 +00:00
Vadim Zeitlin
e0e4b2b0e9 Add a wxHtmlTag helper parsing both absolute values and percents.
This allows to avoid some code duplication in different handlers.

Closes #14868.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:21 +00:00
Vadim Zeitlin
935693c484 Don't unnecessarily NUL-terminate wxCharBuffer contents.
wxCharBuffer already initializes the last byte of the buffer it allocates to 0
so there is no need to do it explicitly.

Also don't allocate an extra byte, wxCharBuffer already adds one to the length
passed to it for the trailing NUL.

See #13885.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:17 +00:00
Vadim Zeitlin
cd41ef6f51 Strip EOL characters from wxStyledTextCtrl::GetLineText() return value.
For consistency with all the other wxTextCtrl-like classes, the value returned
by this method must not include line terminator characters (like '\n'). Notice
that Scintilla-specific GetLine() does still include them, for consistency
with the Scintilla API itself.

Closes #13646.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:13 +00:00
Vadim Zeitlin
e0fddcefb6 Catch attempts to create a window with itself as parent.
This doesn't happen often but when it does, the results are catastrophic and
not always easy to debug, so try catch this as soon as possible.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:10 +00:00
Vadim Zeitlin
97e5a1969f Remove check of eof() return value validity.
It's useless and resulted in a warning from Coverity as it correctly
determined that this code could never be executed under Unix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-08 00:37:08 +00:00
Paul Cornett
e871f02a68 disable Ubuntu "overlay scrollbar", see #14871
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-06 05:33:43 +00:00
Paul Cornett
8edc3a43c7 fix tests for valid pen and brush, broken in r73099
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-05 17:38:30 +00:00
Julian Smart
c4168888e3 wxRTC text box layout fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-05 16:23:12 +00:00
Vadim Zeitlin
739c5499fc Compilation fir for VC6 after r73124.
VC6 doesn't have __debugbreak().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-04 12:28:28 +00:00
Vadim Zeitlin
176da26d22 Explicitly set margins for single line text controls in wxMSW.
The margin used by them was inconsistent and depended on the initial size the
control was created with for some reason. Call EM_SETMARGINS explicitly to
ensure consistent appearance in all cases.

Closes #2438.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-04 00:39:37 +00:00
Vadim Zeitlin
3fb8a2bcfb Add missing critical section locking before accessing shared variable.
WinThreadStart() in wxMSW wxThread implementation accessed the variable
containing the thread state without locking which was wrong, do it only inside
the critical section.

Notice that there is still an unavoidable race condition between exiting the
thread and starting it, so it's not clear at all if we should try to avoid
calling DoThreadStart() here.

Closes #14865.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-04 00:39:33 +00:00
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