Commit Graph

57442 Commits

Author SHA1 Message Date
Václav Slavík
fe94d0d06a Better name for wxXmlResource::GetDirection() argument.
'dir' is not very descriptive (of course it's a direction!), it's better
to include 'default' in the name to indicate this is the default value
to use in absence of a specific one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 15:20:13 +00:00
Václav Slavík
5bac960d40 Fix needlessly convoluted test in wxXmlResourceHandlerImpl::GetImageList().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 15:20:09 +00:00
Vadim Zeitlin
76b0f8384e Fix another crash when conversion fails in Unix PostScript code.
Returning 0 length from GetTextExtent() is hardly ideal but it's better than
crashing.

Closes #15489.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 15:06:04 +00:00
Vadim Zeitlin
58abb2327c Tamil translations update from Dinakar T.D.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 15:05:59 +00:00
Vadim Zeitlin
d7c37bdf33 Turkish translations update from Çağrı Doğan.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 15:05:55 +00:00
Steve Lamerton
11a23db531 Fix stc doxygen warnings and regen stc files.
We need to manually escape a few parts of the autogenerated documentation. 

See #15346.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 12:03:07 +00:00
Steve Lamerton
5ea01cd497 Fix doxygen warnings.
Using @since inside a style or event list causes doxygen warnings, replace with plain text.

See #15346.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 10:10:36 +00:00
Vadim Zeitlin
e7bdf0ac8d Change version to 3.0.0.
Keep "RC1" in the version string for now, but otherwise all version numbers
should be updated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 01:46:08 +00:00
Vadim Zeitlin
eb6b14dc71 Fix wrong in wxListCtrl::SetItemColumnImage() in r74716.
The check for "image == -1" was added to a wrong line.

See #15421.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-10 12:12:52 +00:00
Vadim Zeitlin
f83a9705cd Fix configure on GNU Hurd.
Closes #15480.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-10 12:12:47 +00:00
Vadim Zeitlin
17d698cca5 Consistently handle DST start time in wxDateTime::Set().
Always move the dates invalid due to DST (i.e. falling into the "missing" hour
on the DST start date) forward, as GNU libc does, even when using a different
CRT implementation, such as MSVC one which moves the invalid dates backwards.

This seems more expected and also fixes an especially bad problem which
happened due to moving the date backwards in Brazilian time zone where DST
starts at midnight as doing this changed the day and totally broke ParseDate()
assumption that setting wxDateTime to 00:00:00 at the given date really did
set it to this date.

Closes #15419.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-08 18:00:58 +00:00
Václav Slavík
d9b22d8fff wxMSW: return correct value from wxMessageDialog::GetReturnCode().
wxMessageDialog's native code didn't call SetReturnCode() as it should.
As a result, it didn't work with ShowWindowModal().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 17:09:23 +00:00
Václav Slavík
c5d4360fc9 Add lambda-friendly wxDialog::ShowWindowModalThenDo().
Add a convenience ShowWindowModalThenDo() variant of ShowWindowModal()
that takes a functor argument and calls it when the dialog is closed.

This is, of course, particularly useful when the argument is a C++11
lambda, especially when having more than one window-modal dialog invoked
from the same window, which can get messy quickly with all the
wxEVT_WINDOW_MODAL_DIALOG_CLOSED handlers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 17:09:20 +00:00
Václav Slavík
c80d4c1e20 Add wxWindowPtr smart pointer.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 17:09:16 +00:00
Václav Slavík
4852df90e2 Add basic deleter support to wxSharedPtr<T>.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74773 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 17:09:11 +00:00
Václav Slavík
36c5850bcf Document wxWindowModalDialogEvent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 17:09:07 +00:00
Václav Slavík
ceee1c4b3b Add wxCondition::Wait() overload that also tests the condition.
Add Wait() overload that takes a functor argument and doesn't return
until the condition is signaled _and_ the predicate returns true.  This
is useful for dealing with spurious wakeups and is modeled after C++11
std::condition_variable's corresponding method.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 17:09:05 +00:00
Václav Slavík
e549f179d1 Fix outdated comment for wxCondition::Wait().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 17:09:01 +00:00
Vadim Zeitlin
ee3dd6dd5f Fix bug with not selecting wxAuiNotebook page when its child was focused.
The code in OnChildFocusNotebook() handler only worked correctly if the page
itself was focused but not if the focus was given to one of its children --
which should still make the page itself current.

Closes #15471.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 12:27:04 +00:00
Steve Lamerton
111d847de5 Fix history storing in wxWebViewWebKit with custom schemes.
When the history has just been cleared there is no existing item so we should add the new history item even in this case.

Fixes #15446.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 09:50:58 +00:00
Vadim Zeitlin
6ba718d7ae Fix horizontal mouse wheel scrolling in wxGTK.
Change the value of the appropriate adjustment instead of always using the
vertical one.

Closes #15469.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-06 00:20:06 +00:00
Vadim Zeitlin
41fbdcedbb Export recently added wxRichTextXMLHelper to fix link errors.
This class is referenced from outside the library, see e.g. this build log:

http://buildbot.tt-solutions.com/wx/builders/Linux x86 wxGTK trunk/builds/2961/steps/compile utils/logs/stdio

and so must be exported, otherwise the build fails under Linux (and under
Windows when using DLL).

Perhaps it would be better to make it completely private to the library if it
is not meant to be public, but this would require more changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-05 14:10:39 +00:00
Vadim Zeitlin
ff701a5de9 Revert wxDO_LOG_IF_ENABLED() change for MSVC6 in r74735.
The old solution worked fine for that compiler and the new one fails when
wxLogXXX() is used inside a switch statement to the wrong rules used by VC6
for the scope of the variables defined inside the for loop.

Simply revert back to using the old version for it, this will be easy to
re-revert after 3.0 by simply removing the check for it.

See #11829.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-05 14:10:34 +00:00
Vadim Zeitlin
1948ff5f89 Just remove redundant wxDocument::SetDocumentTemplate() call.
This is already done from InitDocument() called from
wxDocTemplate::CreateDocument().

Closes #15467.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 13:07:11 +00:00
Vadim Zeitlin
588135982a Restore correct wx-config creation and work around MinGW lack of symlinks.
This undoes the changes of r72205 and r72249 (see #14517) as using relative
paths for wx-config symlink didn't work correctly if non-default values for
$bindir and/or $libdir were used (i.e. if they were not siblings).

Instead, fix the original problem of lack of symlinks when using MinGW
directly: just use "cp -p" if "ln -s" fails. This should work everywhere and
do the right thing.

Closes #15463.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:42 +00:00
Vadim Zeitlin
d9106ec5b6 Correct erasing of background behind controls in a toolbar in wxMSW.
We need to handle WM_PRINTCLIENT in wxToolBar itself as the default handler
for this message forwards to WM_ERASEBKGND of the parent window and our
handler for that message only erases the client part of the window, in wx
sense, i.e. including a relatively big vertical offset accounting for the
toolbar. This means that when we get WM_PRINTCLIENT from the embedded control
drawing code, we don't erase anything at all as the control rectangle height
is smaller than the offset.

This fix is not perfect as ideally the existing MSWGetBgBrushForChild() should
be taken into account automatically by the default MSWPrintChild()
implementation but at least it fixes the ugly visual artefacts.

Closes #12307.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:37 +00:00
Vadim Zeitlin
c4e9a71a14 Remove unnecessary wxHTML dependency from the notebook sample.
r70321 added html library to the notebook sample, apparently accidentally as
the commit message only mentioned aui one. Remove html and rebake.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:34 +00:00
Vadim Zeitlin
f1c4988215 Add a test for a tooltip for a control inside a static box.
Also create the controls as children of the static box, not its siblings, to
make the tooltip work under wxGTK and because this is how we recommend doing
things now.

See #9859.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:25 +00:00
Vadim Zeitlin
178635b62a Add wxDEPRECATED_MSG() and use it in a couple of places.
This macro should be used instead of wxDEPRECATED() for the new deprecations
as it allows to give a helpful explanatory message (if supported by the
compiler) and also is simpler to use as it doesn't require wrapping the entire
declaration in it but can be simply used before it.

Also add wxDEPRECATED() support for clang as a side effect.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:22 +00:00
Vadim Zeitlin
1c467e8804 Don't take hidden wxGrid row/columns into account when auto-sizing.
The contents not shown to the user shouldn't affect the fitting width/height
of the columns/rows that are shown.

See #15464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:15 +00:00
Vadim Zeitlin
c7ea5a0c7e Remove superfluous mouse capturing in wxGrid row/column labels windows.
This code recaptured the mouse in the window which had already had it, thus
triggering the (recently added, see r74677) asserts in CaptureMouse(). It also
didn't preserve the invariant of m_winCapture always having the capture. And
it was apparently completely unnecessary too.

So simply remove it to fix the asserts while drag-resizing wxGrid rows/columns.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:13 +00:00
Vadim Zeitlin
8965331963 Simplify wxGridCellAutoWrapStringRenderer::GetBestSize().
The code there was pretty wild, making clearly wrong assumptions (column size
doesn't, and AFAICS never did, include 20 pixel margin) and also was clearly
uncertain about what it was doing by trying to limit the number of iterations
to some arbitrary cutoff when it is pretty clear that the loop increasing the
width and decreasing the height on each iteration will reach the condition of
"width >= height*1.68" sooner or later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:10 +00:00
Vadim Zeitlin
85d2dec9f0 Don't crash in wxGridCellAutoWrapStringRenderer when the column is hidden.
Our methods should arguably not be called at all in this case, but if this
does happen, at least don't crash.

Closes #15464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-04 00:14:05 +00:00
Julian Smart
bd21f7eaf0 wxRTC: extracted XML utilities into a separate class for potential reuse.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-03 16:47:09 +00:00
Václav Slavík
71a25c1033 Add missing XRC format docs for wxComboCtrl and wxEditableListBox.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-03 14:45:07 +00:00
Václav Slavík
9b4d3190d5 Remove reduntant content from XRC format docs.
Window styles are documented globally, no need for control-specific
content for wxStatusBar.  Also, it was outdated and incorrect.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-03 14:45:04 +00:00
Paul Cornett
48829702f1 Fix referencing of cairo_t returned from wxDCImpl::GetCairoContext().
It was assumed that all callers were going to unref the cairo_t, but that is not
true, so callers that are going to unref it should ref it themselves.
See #15455


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-03 05:37:30 +00:00
Václav Slavík
ac3bf36958 Replace @since 2.9.6 with 3.0 in the docs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-02 12:17:06 +00:00
Vadim Zeitlin
66b370d05f Rewrite wxLogXXX() macros to avoid "ambiguous else" warnings.
Use a dummy for loop instead of an if statement to avoid all problems with the
dangling else clauses: both the need for an artificially inversed "if" to make
the code like

	if ( something )
		wxLogError("...");
	else
		something-else;

to work as expected and to avoid warnings given by some versions of g++ and
clang for the code above advising to add explicit braces.

Closes #11829.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-31 17:41:16 +00:00
Vadim Zeitlin
7980868347 Removed a method using wxColour from non-GUI benchmark code.
No idea how could this work before but the presence of this code in the
non-GUI benchmark project prevented it from building. As it's not used anyhow,
just remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-31 17:41:13 +00:00
Paul Cornett
cb41a69b15 Don't update position of widgets in a wxPizza from size_allocate handler.
The values in m_{x,y} are not the same as client coordinates if the wxPizza is scrolled.
Closes #15444


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-31 03:25:12 +00:00
Vadim Zeitlin
3c3e94dc01 Fix infinite loop in wxMSW with wxStaticBox inside non-wxTAB_TRAVERSAL parent.
We didn't ensure that the parent of a (native) control with WS_EX_CONTROLPARENT
had this style as well, unlike for our own windows. Fix this now to make
certain that we never call ::IsDialogMessage() on a window whose parent
doesn't have WS_EX_CONTROLPARENT as it simply hangs in this case, entering an
infinite loop searching for the default button.

Also try to reduce the possibility of such bugs in the future by checking for
WS_EX_CONTROLPARENT and not wxTAB_TRAVERSAL before calling ::IsDialogMessage()
even if this doesn't totally prevent them (it wasn't sufficient to fix even
this particular bug).

Closes #15458.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-30 23:32:42 +00:00
Vadim Zeitlin
69384772ac Fix wxMenu::GetTitle() before the menu is appended to the menu bar.
The mnemonics conversion was not done correctly when the menu title contained
them but the menu hadn't been appended to the menu bar yet.

Closes #15461.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-30 23:32:37 +00:00
Václav Slavík
45d66f592c Loosen the assert in IsScrollIncrement().
wxWindowGTK::GTKGetScrollEventType() tries to map GtkAdjustment's delta
to either step or page increment by comparing it with the respective
GtkAdjustment steps. Both of them can be 0, but this code is not
expected to be called in such case.

Yet, in practice, it occasionally is, see e.g.
http://devel.aegisub.org/ticket/979GTKGetScrollEventType (wxWebView is
prone to it as well).

Check for >= 0 instead, to be more robust when faced with unexpected
input from GTK+.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-30 13:14:50 +00:00
Vadim Zeitlin
8cf4b0651f Initialize wxImageFileProperty correctly when file is given in the ctor.
Previously the file had to be specified later and the value passed to the ctor
was ignored.

Closes #15456.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-29 20:44:58 +00:00
Vadim Zeitlin
66c2bf7b1d Don't define __STRICT_ANSI__, we should build both with and without it.
For some reason, wxDialUpManager code defined __STRICT_ANSI__ itself, don't do
it as __STRICT_ANSI__ can be predefined by the compiler resulting in the
redefinition warnings and, in any case, our code should build both with and
without it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-29 12:33:44 +00:00
Julian Smart
fca66f5985 Crash fix for inserting text into a buffer without an associated control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-29 11:41:48 +00:00
Vadim Zeitlin
873194f845 Only patch bk-deps in configure if dependency tracking is used.
Otherwise we get (harmless) errors when trying to patch a non-existent file.

See #15454.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-29 11:15:53 +00:00
Jouk Jansen
8059d88d80 wxGTK1 : another msiing include file in evtloop.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-29 06:39:38 +00:00
Vadim Zeitlin
2156762c14 Czech translations update from Zbyněk Schwarz.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-28 20:52:46 +00:00