Commit Graph

56361 Commits

Author SHA1 Message Date
Stefan Csomor
f666995892 support SDK < 10.6, fixes #14902
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-14 20:04:57 +00:00
Stefan Csomor
9e1bfb3c2a supporting private types in DnD on osx_cocoa, fixes #14884
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-14 16:21:17 +00:00
Vadim Zeitlin
2346ca0853 Fix libtiff compilation with MinGW.
At least some versions of MinGW don't define 64 bit integer types resulting in
errors when they're used in libtiff code, so explicitly include basetyps.h to
make sure these types are defined.

Closes #14897.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-14 12:29:07 +00:00
Stefan Csomor
4ca0bca0f3 avoid double up events for static text, fixes #14902
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73189 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-14 10:42:06 +00:00
Paul Cornett
cbe6a493b6 compute scrollbar spacing the same way GtkScrolledWindow does it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-14 06:29:54 +00:00
Paul Cornett
ffc28384ca Get DC size from GDK window if possible, client size can unfortunately be wrong
This should fix wxDC::Clear() not clearing the whole window on Ubuntu 12.04 with overlay scrollbars
see #14871


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-14 06:25:00 +00:00
Robin Dunn
12c6bfab40 Patch from niki@vintech.bg allowing builds for Python 2.5 (using MSVC 7.1) to work again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-14 02:10:15 +00:00
Paul Cornett
2c64b066ea decrease number of skipped frames in assert dialog backtrace, 7 is not the minimum, closes #14690
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-13 04:41:52 +00:00
Vadim Zeitlin
011875afad Brazilian Portuguese translations update from Felipe.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-12 13:52:36 +00:00
Paul Cornett
faad53d187 use correct signature for callback
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-11 06:43:19 +00:00
Paul Cornett
26ec6be735 make local functions static
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-11 06:37:14 +00:00
Paul Cornett
3eabbbcc5d add wrappers to avoid compiling code which will never be used
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-11 06:31:23 +00:00
Vadim Zeitlin
9f987630e2 Handle IN_MOVE inotify events better.
Set the new path correctly for moved or renamed files.

Closes #14889.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-11 01:32:42 +00:00
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