Commit Graph

15910 Commits

Author SHA1 Message Date
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
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
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
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
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
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
35d6156ba4 Don't enable dialog navigation inside wxFrame by default.
This was done, apparently accidentally, by r68366 and resulted in cursor arrow
keys not being sent by default to the wxFrame children under MSW any more as
they were used for dialog navigation instead.

So don't derive wxTopLevelWindow from wxNavigationEnabled<> any more and only
derive from it at wxDialog level.

Closes #15445.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 22:49:53 +00:00
Vadim Zeitlin
da0a2aca6b Handle custom configurations in MSVC-specific setup.h.
Account for wxCFG when building the paths used for MSVC autolinking. This
variable should be defined to the same value as CFG during (command line)
build.

Closes #15431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 22:49:44 +00:00
Vadim Zeitlin
029a401d74 Make wxWindow::HasScrollbar() respect wxScrolled::ShowScrollbars().
Override CanScroll() in wxScrolled to return the real state of the scrollbar
instead of just relying on the wx[HV]SCROLL styles.

Closes #15440.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 13:12:38 +00:00
Vadim Zeitlin
3d777efedc No real changes, just make wxWindow::CanScroll() virtual.
This will allow overriding it in wxScrolled<>, see #15440.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 13:12:31 +00:00
Stefan Csomor
d73efa0b9c proper default for iphone
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-24 19:20:03 +00:00
Paul Cornett
092162bc12 wxDialogBase only has one ctor, so just do initialization in ctor instead of Init()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-24 05:04:11 +00:00
Vadim Zeitlin
af2372b95d Don't set even try to set focus to wxPopupWindow itself in wxMSW.
This doesn't work anyhow with our popup window implementation (it's a child of
the desktop and we can't set focus to it) and provokes error messages due to
::SetFocus() failures, so simply don't do this at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:13 +00:00
Vadim Zeitlin
ae1cdb2d07 No changes, just move mouse capturing bookkeeping data out of wxWindow.
All mouse capture-related data doesn't have to be declared in wxWindow itself
and can just be global in wincmn.cpp, so move it there, this will facilitate
further changes as they won't require recompiling everything any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-18 13:28:02 +00:00
Paul Cornett
c37b0f0907 Avoid calling gtk_window_get_position() from "configure-event" handler, if possible.
This avoids a round trip to the X server, which is expensive over a remote connection.
Closes #15116


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-17 16:25:13 +00:00
Stefan Csomor
b0fa6efc8b using #ifdef wxABORT_ON_CONFIG_ERROR not just #if as elsewhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-14 09:15:16 +00:00
Stefan Csomor
c8841d1493 using #ifdef wxABORT_ON_CONFIG_ERROR not just #if as elsewhere
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-11 06:39:20 +00:00
Vadim Zeitlin
9d94efd8b0 Remove never implemented wxDateTime::IsGregorianDate().
This method was declared and even documented but never actually implemented,
and GregorianAdoption enum used by it had many incorrectly defined elements.

Just remove both the method and the enum instead of fixing/implementing them
as they are not that important (as witnessed by the fact that nobody has
complained about the method being missing since almost 15 years).

Closes #15400.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-09 20:55:20 +00:00
Vadim Zeitlin
401aad6ce8 Define __VISUALC__ for ICC under Windows again.
During the refactoring of r74496, the logic of the check for Intel compiler
was slightly altered resulting in not defining __VISUALC__ for it any longer
which broke compilation with it.

Restore this definition now to fix it, even though it could admittedly be
better to explicitly check for __INTELC__ in the places where we currently
only check for __VISUALC__ and reserve the latter only for the case when we
are really using MSVC.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 11:08:33 +00:00
Vadim Zeitlin
5bd6ad08a7 Add wxFileName::SetPermissions().
This is a simple wrapper for the POSIX chmod().

Closes #12951.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 11:08:28 +00:00
Vadim Zeitlin
dcbf35f87c Use RIAA wrapper for wxSpinCtrl event disabling in wxGTK.
The use of wxSpinCtrlEventDisabler class ensures that we never forget to
reenable the events after disabling them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:00:10 +00:00
Vadim Zeitlin
b736d59eb5 Don't generate any events from wxSpinCtrl and wxSpinCtrlDouble methods.
After the changes of r53758 wxMSW didn't generate any wxEVT_TEXT events but
this was still the case for the generic version (and hence for
wxSpinCtrlDouble under MSW too) and wasn't documented.

Fix all versions to avoid sending events for programmatic actions, add unit
tests checking this behaviour and document it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:00:00 +00:00
Vadim Zeitlin
33d953e748 Add wxPropertyGridPageState::GetColumnFullWidth().
This method allows to get the full width needed by wxPropertyGrid and is
useful for determining the space to allocate for it, e.g. when creating a
popup showing the property grid, as shown by the changes to the sample.

Closes #15368.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 13:05:42 +00:00
Julian Smart
d4d83a46a9 Comment-only update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-04 07:58:47 +00:00
Paul Cornett
cbabf356ce remove ancient defines left over from GTK1
and some minor cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-03 04:48:46 +00:00
Paul Cornett
59f76658d3 remove obsolete check for GTK 2.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-03 04:39:45 +00:00
Paul Cornett
4ae5ada038 defer calling SetCanFocus() on wxGTK until after creation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-31 16:03:51 +00:00
Stefan Csomor
f7105c8fe2 adapting to new event version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-28 14:52:47 +00:00
Stefan Csomor
0e4a6d339a using Run of base class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-28 14:32:35 +00:00
Vadim Zeitlin
f54debbae5 Work around missing mode_t definition with ICC.
Just handle it in the same way as MSVC.

Closes #15361.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-28 13:08:23 +00:00
Stefan Csomor
cf126cf22b using Run of base class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-27 20:22:40 +00:00
Václav Slavík
5d9b5db01e Make wxComboCtrlBase::Set*groundColour() methods public.
SetForegroundColour() and SetBackgroundColour() were -- presumably
accidentally -- protected in wxComboCtrlBase, even though they are
documented public virtual methods of wxWindow. This prevented their
use from user code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-27 19:39:37 +00:00
Stefan Csomor
33c07ec774 bracketing for correct builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-27 19:15:38 +00:00
Stefan Csomor
a8123c1359 OSX adaptions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-27 19:00:25 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
6535170f3d Allow using custom method names in wxHTTP.
Add wxHTTP::SetMethod().

Also simplify the code by determining the method to use in Connect() instead
of doing it in BuildRequest() itself.

Get rid of the now unused wxHTTP_Req enum.

Closes #15354.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-25 21:55:13 +00:00
Vadim Zeitlin
7e81e3a796 Fix build with wxUSE_FFILE=0.
Add the missing "#if wxUSE_FFILE" checks and add fallbacks to wxFile if it's
available.

Closes #15353.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-25 21:55:06 +00:00
Vadim Zeitlin
11bf9fea53 Define wxLongLong_t for Intel compiler.
It supports the same __int64 type and printf() format specifier for it as
MSVC does under Windows.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-25 21:54:58 +00:00
Stefan Csomor
b8f0ac88a5 adding OnLaunched
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 17:57:05 +00:00
Vadim Zeitlin
1b7c3d909a Compilation fix for PCH-less build after r74586.
Don't use wxWindow methods in wx/container.h, move AcceptsFocus()
implementation to containr.cpp.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 13:18:30 +00:00
Vadim Zeitlin
bd6ca54f63 Fix tab navigation bug with radio boxes without enabled items.
There was a bug similar to the one in the preceding commit with radio boxes
under wxMSW too: if all radio box buttons were disabled (or hidden, although
this should be much more rare in practice, unlike the disabled case which was
deemed to be rare in r74583 commit message but turned out to actually happen),
the radio box still pretended to accept focus but didn't really do it.

Fix this by allowing to override wxWindow::CanBeFocused() and do it in
wxRadioBox to check whether we have any enabled visible items.

Also add a check for CanBeFocused() to wxControlContainer code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 12:44:33 +00:00
Vadim Zeitlin
dee22e3198 Fix tab navigation bug with static boxes without enabled children.
wxControlContainer::AcceptsFocusFromKeyboard() returned true even if the
control didn't have any currently enabled -- and hence accepting focus --
children. This resulted in strange wxEVT_NAVIGATION_KEY propagation as it
unexpectedly wasn't handled in the control which pretended to accept focus and
instead bubbled up back into the parent, resulting in the focus returning to
the first child of the parent instead of skipping the static box with disabled
children and going to the next enabled child.

Fix this by checking that we have children that can be focused right now and
not only children that are focusable. Notice that this doesn't take care of
calling wxWindow::SetCanFocus() correctly when the children enabled/disabled
state changes so there might still be other problems, notably under wxGTK
where SetCanFocus() does something non-trivial, but it at least improves
things under wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 12:44:29 +00:00
Vadim Zeitlin
043ad13ffe Fix tab navigation into radio boxes in wxMSW.
Radio boxes refused to take focus from keyboard as their
wxControlContainer::AcceptsFocusFromKeyboard() always returned false because
the base wxStaticBox class disabled setting the focus to the control itself
and wxRadioBox doesn't have any children at wx level in wxMSW.

Fix this by reenabling "self focus" in wxRadioBox to make it possible to
accept focus from keyboard. This is not ideal as it doesn't take into account
e.g. radio boxes without any items or with all items disabled or hidden, but
this should be rare and would require virtualizing all children access at
wxControlContainer level, i.e. would be quite non-trivial so don't do this for
now as this, at least, fixes the navigation in common/normal case.

Also remove the unnecessary AcceptsFocus() override from wxRadioBox as this is
now done at wxControlContainer level.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 00:43:33 +00:00
Vadim Zeitlin
2c750daecd No real changes, just refactor wxControlContainer code a little.
Extract the call to wxWindow::SetCanFocus() into a separate
UpdateParentCanFocus() function as it can be necessary to do it from places
other than UpdateCanFocusChildren() too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-23 00:43:29 +00:00
Vadim Zeitlin
da6239561d Rearrange Windows checks in wx/platform.h to be more logical.
Use __WINDOWS__ symbol as the primary symbol indicating Windows instead of
using all of _WIN32, __WIN32__ and __WINDOWS__.

Also automatically define __WINDOWS__ if __WXMSW__ is defined as this port
only can be used under Windows and doing it like this fixes compilation in the
case when the platform ends up being not defined at all, closes #15342.

Finally, don't assume Windows by default but give an error if we can't detect
the platform. This shouldn't happen in practice but seems a safer thing to do
if it ever does happen.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-22 23:37:24 +00:00
Stefan Csomor
15160da216 further routing into wxApp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-22 18:33:01 +00:00
Stefan Csomor
038c99477c wiring osx native notification during launch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-22 16:17:27 +00:00
Václav Slavík
cbc8576a9b Add functor-taking overload of CallAfter().
This is a generalization of the existing method-calling overloads.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-21 10:05:03 +00:00
Vadim Zeitlin
4c8acbdfd5 Just forward Stricmp() in wx/string.h to wxCRT_StricmpA().
Don't redo the tests already done in wx/wxcrtbase.h in wx/string.h too,
especially as they were not done correctly there (they didn't take into
account the case of MinGW in strict ANSI mode). Just call wxCRT_StricmpA().

This also allows us to get rid of HAVE_STRCASECMP_IN_STRING[S]_H tests in
configure.

Closes #15349.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-17 17:27:20 +00:00