Commit Graph

16058 Commits

Author SHA1 Message Date
Vadim Zeitlin
736692f3a4 No changes, just fix a typo in a comment in wx/docview.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 23:32:03 +00:00
Vadim Zeitlin
4521f6c88c Add wxActivateEvent::GetActivationReason().
This method is implemented for wxMSW-only currently and allows to check
whether the window is being activated by a mouse click or in some other way
there.

Closes #15516.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-02 16:25:04 +00:00
Vadim Zeitlin
42ed9e53ad Add more checks for Intel compiler.
This should have been part of r74888.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 23:04:51 +00:00
Vadim Zeitlin
9ed99f82da Remove support for Gnome printing from wxGTK.
It was replaced by GTK+ printing several years ago and is almost never used
any longer anyhow, so any problems in this code (and there are some) would
never be found and fixed.

Also update the message catalogs to avoid having the strings not used any
more, as they were only used in Gnome printing code.

Closes #15517.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 17:09:02 +00:00
Julian Smart
21d0340384 Applied #15226 wxRichTextCtrl: Implement setting properties with undo for objects e.g. wxRichTextTable (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 15:47:49 +00:00
Václav Slavík
5ca59eb82e Destroy the wxDialog::ShowWindowModalThenDo() functor a.s.a.p.
Previously, the functor was kept in a helper event handler that was bound to
wxEVT_WINDOW_MODAL_DIALOG_CLOSED and only marked as already called, but never
unbound. Consequently, the functor object remained allocated for as long as the
event table existed and was only freed with the dialog instance.

Change the logic to destroy the functor object as soon as it was called and is
no longer needed for anything.

This is particularly important when used with C++11 lambdas that capture the
dialog in a wxWindowPtr pointer, because the pointer would be retained forever
otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 12:19:56 +00:00
Vadim Zeitlin
38ececd4c3 Fix crash when auto-sizing a wxDataViewCtrl column.
The code was confused about the difference between the model and view columns
indices and incorrectly used the former as the latter, which could result in
an out of bound array access.

Closes #15420.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:49:26 +00:00
Vadim Zeitlin
5db33691be Do not define __VISUALC__ for Intel C++ compiler under Windows.
This is confusing and makes it more difficult to test for the "real" MSVC,
test for __INTELC__ explicitly wherever needed instead.

Also document __INTELC__ in our list of compilers.

Closes #15359.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:49:21 +00:00
Vadim Zeitlin
866a7cd7ca MinGW-w64 provides isfinite() in both 32 and 64 bit builds.
So use __MINGW64_TOOLCHAIN__ to test for it and not __MINGW64__, which is only
defined in 64 bits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:49:05 +00:00
Vadim Zeitlin
f7029489c1 Define __MINGW64_TOOLCHAIN__ and __MINGW32_TOOLCHAIN__ symbols.
__MINGW64_TOOLCHAIN__ macro is more readable and shorter than the standard
predefined __MINGW64_VERSION_MAJOR and __MINGW32_TOOLCHAIN__ is defined for
the symmetry and also because it will make many tests simpler as we often
need to test not so much for MinGW-w64 for its own sake but rather to disable
the workarounds for MinGW32 when using it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:49:02 +00:00
Vadim Zeitlin
486a0fa75f Add wxHtmlTag::GetParamAsString() convenience method.
This is more convenient to use than HasParam() + GetParam() and also slightly
more efficient as we search for the tag name only once.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-30 23:48:38 +00:00
Julian Smart
d0b6c0c527 Applied #15226 with modifications: wxRichTextCtrl: Implement setting properties with undo for objects e.g. wxRichTextTable (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-29 16:08:03 +00:00
Julian Smart
af4168e2cf Added wxRichTextTableBlock class to help with table UI operations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-29 13:35:58 +00:00
Julian Smart
f7f8a13c04 wxRTC: fixed guidelines overwriting adjacent cell borders; corrected capitalisation in command labels; now sends text update event when an object is changed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-27 13:36:46 +00:00
Julian Smart
e490db597a Added wxRichTextAction::SetOldAndNewObjects for clarity when submitting a wxRICHTEXT_CHANGE_OBJECT command.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-24 12:05:54 +00:00
Julian Smart
4f2d6692c7 Make wxRichTextRectArray usable by other parts of wxRTC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-23 09:07:16 +00:00
Julian Smart
057945a5cd Partial fix for #15196: wxRichTextCell caret issues (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-22 20:34:16 +00:00
Václav Slavík
1c2704fe7b Make public headers compatible with Objective-C++ with ARC.
OSXGetViewOrWindow() virtual methods were defined in headers and were casting
NSView*/NSWindow* to void*, which the compiler complains about with ARC
enabled. Rather than writing conditional code in the header, move the
implementations into .cpp files. They were virtual anyway, so this is no less
efficient, and doesn't leave any problematic code in public headers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-21 10:11:08 +00:00
Václav Slavík
d10fdec4b7 Revert "using #ifdef wxABORT_ON_CONFIG_ERROR not just #if as elsewhere"
This reverts commit r74656, because it breaks initialization order by
calling OnInit() too late.  See
https://groups.google.com/d/topic/wx-dev/H5vgc2VO7K4/discussion

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-21 09:28:47 +00:00
Václav Slavík
0d1903dbda Add virtual ~wxAnyScrollHelperBase() to fix compiler warning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-21 09:28:42 +00:00
Václav Slavík
59576592b8 Fix wxOSX warnings about int-to-void* casts.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-21 09:28:39 +00:00
Václav Slavík
a255c995a1 Try loading even English translations if provided.
Doing so has negligible cost and can be useful in some situations (e.g.
when using symbolic msgids despite gettext best practices).

Patch by tmsorensen.

Fixes #15522.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-20 17:27:59 +00:00
Julian Smart
7dd6983e0b Added setters for table row and column count
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-20 11:34:11 +00:00
Julian Smart
cb6b81bc94 The alignment controls are now left-aligned if the floating controls are not shown.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-19 18:23:37 +00:00
Vadim Zeitlin
bfdaa9173e Use std::isfinite() for wxFinite() for C++11 compilers.
This should fix compilation with MinGW 4.8.1 cross-compiler in C++11 mode as
it doesn't seem to provide finite() any more then.

Also, only defined wxFinite() and wxIsNaN() for C++, not C. This makes the
checks for __cplusplus >= 201103 simpler and is consistent with how
wxIsSameDouble() and wxRound() were already only defined for C++ (this is also
the source of most of the changes in this diff, viewing it ignoring whitespace
will show the only real changes).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 17:30:30 +00:00
Václav Slavík
f2959820a5 Add wxTranslations::GetTranslatedString().
Replace GetString(), which always returns something (possibly the
original string) with GetTranslatedString() that returns either a
pointer to translated string or NULL.

This simplifies the code a bit, all handling of missing translations is
now done in wxGetTranslation().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 16:03:31 +00:00
Václav Slavík
acebfdf052 Remove unused wxLocale::GetUntranslatedString().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 16:03:28 +00:00
Václav Slavík
5278469615 Deallocate wxThreadSpecificInfo when wxThread ends.
Cleanup wxThreadSpecificInfo after wxThread::Entry returns to be more
memory efficient.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 16:03:25 +00:00
Václav Slavík
d2740de55e Make _() and friends safe to call from any thread.
The GetUntranslatedString() hack keeps a global copy of all strings, so
that it can return a const reference as wxGetTranslation() return value.
A global wxHashSet instance shared by all threads won't do, even guarded
with a critical section, because it may internally copy values on any
insert and thus invalidate pointers that may still be used on another
thread.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 16:03:20 +00:00
Václav Slavík
92c0fc34c1 Make storing non-trivial data in wxThreadSpecificInfo possible.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-18 16:03:14 +00:00
Vadim Zeitlin
b0ad146aba Fix assorted typos in comments and other non-code.
Closes #15509.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-17 15:25:59 +00:00
Vadim Zeitlin
3e33568e0b Add wxDataViewRendererBase::GetEffectiveAlignment() and use it.
This helper method falls back on the alignment of the column if the renderer
alignment is not specified. This is almost always what should be used instead
of GetAlignment() to determine the alignment that really should be used in the
drawing code.

In particular, using GetEffectiveAlignment() in wxDataViewCustomRenderer fixes
the problem with bitmap columns ignoring column alignment for their bitmaps.

Closes #15498.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-17 15:25:47 +00:00
Vadim Zeitlin
7dbb435338 Revert "Make wxMSW stack walking methods work with Unicode identifiers."
This reverts r74817 because it broke compilation with VC8 and it doesn't seem
obvious to fix this.

See #15138, closes #15500.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 11:57:23 +00:00
Vadim Zeitlin
bf9ce7b55e Make wxMSW stack walking methods work with Unicode identifiers.
This allows to show the stack properly for e.g. Japanese programs.

Closes #15138.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:16:34 +00:00
Vadim Zeitlin
4706252347 Make default keyboard handling available in wxVarScrollHelperEvtHandler too.
Factor out the keyboard handling code in wxAnyScrollHelperBase allowing its
reuse in wxVarScrollHelperEvtHandler.

Now wxVarScrollHelperBase handles cursor keys in a sane way by default
too and also allows disabling their handling, just as wxScrolledWindow.

See #15357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:15:17 +00:00
Vadim Zeitlin
dc2513650d Propagate the event handling fixes to wxVarScrollHelperBase.
Merge the fixes to wxScrollHelperBase::ProcessEvent() of r64358, r64370,
r64464, r72939 and possibly a few more in wxVarScrollHelperBase to fix its
behaviour too, as it wasn't generating the correct events any longer.

Unfortunately the fix right now is to physically copy the code from one class
to the other. This should be avoided, of course, and a more in depth
refactoring should be done to move the code common to both classes into
wxAnyScrollHelperBase after 3.0 release. But for now continuing to duplicate
code is better than not having a working wxVarScrollHelperBase.

See #15357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:15:12 +00:00
Vadim Zeitlin
010d821b31 Add wxAnyScrollHelperBase to reduce code duplication in wxVarScrollHelperBase.
This is just a small refactoring to move some trivially common parts of
wxScrollHelperBase and wxVarScrollHelperBase in a new common base class.
This will make it possible to apply other corrections to wxVarScrollHelperBase
without having to physically duplicate the code from wxScrollHelperBase in it.

See #15357.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:15:07 +00:00
Vadim Zeitlin
e91e1e3d5c Use wxGetTranslation() instead of _() in the public headers.
This allows the code in them to compile even when WXINTL_NO_GETTEXT_MACRO is
defined.

Closes #15443.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:15:02 +00:00
Steve Lamerton
fe7cefd493 Handle WebKitWebView create-web-view.
In some cases a new window is signalled using create-web-view rather than new-window-policy-decision-requested and so we need to handle it to emit the correct new window events.

Fixes #15447.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-13 12:55:08 +00:00
Vadim Zeitlin
37961915e7 Return the old file descriptor/pointer from wx(F)File::Detach().
Make Detach() more convenient to use.

Closes #15494.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-12 20:49:10 +00:00
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
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
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
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
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
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
Vadim Zeitlin
e24c4e1238 Set mouse cursor correctly over image map links in wxHTML.
The cursor didn't change to a link one when the mouse was over link areas in
an image map.

Fix this by generalizing wxHtmlCell::GetMouseCursor() into GetMouseCursorAt().

Closes #15350.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-17 17:27:14 +00:00
Vadim Zeitlin
150dcda942 Allow unsetting wxMenuItem as start of radio group too.
This must be called if another radio item is inserted before the current
starting one.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:35 +00:00
Vadim Zeitlin
924c9b4591 No changes, just fix some comments in wxOSX wxMenu header.
Mostly clarify DoInsertOrAppend() comment, the "is"/"if" typo made it rather
unclear.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:32 +00:00
Vadim Zeitlin
3b28ca6503 Get rid of wxMenu::m_startRadioGroup in wxOSX.
This code was probably copied from wxUniv but was wrong as we can't rely on
the items being always inserted in order. This commit on its own fixes
removing the first radio group menu item but it also makes possible to
properly implement the insertion of new items in the middle of an existing
radio group which couldn't be done with m_startRadioGroup approach at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:26 +00:00
Vadim Zeitlin
e3f4ca2e1e Add wxMenuItem::IsCheck() and IsRadio() accessors.
The latter will be convenient to use in the upcoming changes to wxOSX radio
items management code and add the former for the symmetry.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:20 +00:00
Vadim Zeitlin
b545d7ab09 Really fix wxUSE_PREFERENCES_EDITOR requirements check.
The changes of r74532 were incomplete/wrong and the fix of r74536 didn't
entirely fix the logic here, so try to do it again, hopefully correctly this
time.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 22:37:52 +00:00
Robin Dunn
6a4480ec29 Only disable wxUSE_PREFERENCES_EDITOR if wxUSE_NOTEBOOK is False, not if it's True.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 18:04:43 +00:00
Vadim Zeitlin
92e839baa4 Move HAVE_WCSXXX from wx/osx/config_xcode.h to wx/osx/chkconf.h.
The latter file is also used when building from the command line while the
former is only used in Xcode build, as its name indicates (which didn't help
me to notice it, however).

Also restore the test for wcsftime() in configure as it is available even on
older systems but do not test for strnlen() -- as it is not.

These changes amend those of r74523.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 16:42:10 +00:00
Vadim Zeitlin
a94529575a Add wxUSE_PREFERENCES_EDITOR and the corresponding configure option.
This was somehow forgotten when wxPreferencesEditor was added.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 15:14:59 +00:00
Vadim Zeitlin
ccf8bf20ca Fix new wxExecute() code compilation with wxUSE_CONSOLE_EVENTLOOP==0.
Nothing is going to work without the console apps/base traits support for the
event loop but at least make it compile.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 15:14:53 +00:00
Vadim Zeitlin
45c103404c Avoid including pipe stream headers when streams are disabled.
Fixes compilation with wxUSE_STREAMS==0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 15:14:46 +00:00
Vadim Zeitlin
166988aa35 Don't test for wide character functions in configure under OS X.
The tests for these functions may succeed on the system we're running under
but the functions may not be actually available on the system the application
is going to run under (if it's < 10.7).

So use our own replacements for these functions unless 10.7 was explicitly
chosen as the minimal possible version.

An alternative solution could have been to use weak linking but this is more
difficult and there is no real gain (performance would need to be measured
first).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 01:31:51 +00:00
Vadim Zeitlin
ad653fa230 Disable wxUSE_ENH_METAFILE for wxGTK builds.
This can happen to be defined in wxGTK builds under Windows.

Closes #15332.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-14 17:12:48 +00:00
Vadim Zeitlin
1f0edb5af0 Don't use wxCriticalSection in wxWakeUpPipeMT if wxUSE_THREADS==0.
In fact, don't define wxWakeUpPipeMT class at all when not using threads.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-14 11:34:27 +00:00
Stefan Csomor
44c8e75ba9 support for @2x notation for wxBITMAP_TYPE_PNG (non-resource) on retina displays
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-14 11:16:32 +00:00
Vadim Zeitlin
4de55d6f31 Restore embedding manifest when using MinGW.
The changes of r73483 broke inclusion of the manifest in the programs built
using MinGW because wxUSE_RC_MANIFEST was never defined. Somehow nobody
complained about it but this resulted in using comctl32.dll 5.80 instead of
6.0 and e.g. problems with toolbar appearance (see #13512).

Do use the manifest by default with MinGW and, in fact, all the other
compilers if any other ones still work, as only MSVC is known to embed the
manifest automatically and we take care of it separately.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74509 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-13 23:23:27 +00:00
Vadim Zeitlin
e87d78bb36 Move wx/msw/gccpriv.h inclusion back to wx/platform.h from wx/compiler.h.
Do keep compiler-specific wxCHECK_MINGW32_VERSION() in wx/compiler.h as it's
needed by wx/cpp.h which includes wx/compiler.h only. But put the rest of the
stuff in gccpriv.h in its old place as including it before wx/setup.h didn't
work correctly and was unnecessary anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-13 23:23:14 +00:00
Vadim Zeitlin
20125017a4 Extract compiler-specific macro definitions in a new wx/compiler.h.
This solves the problem with wx/defs.h -> wx/platform.h -> wx/setup.h which
resolves to msvc/wx/setup.h -> wx/version.h -> wx/cpp.h include path which
resulted in __VISUALC__ not being defined in wx/cpp.h.

This problem was not new but went unnoticed for a long time and was only
discovered when wxCHECK_VISUALC_VERSION() started being used in wx/cpp.h too
as now the compiler started warning about wrong #if syntax due to it being
undefined.

Putting the compiler-specific definitions in a separate file allows this file
to be included from wx/cpp.h to ensure that these symbols are always defined
in it and also makes things a little better organized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-13 02:30:21 +00:00
Vadim Zeitlin
9fe7a9ad57 Make destructors of COM interface classes virtual.
This is needed to at least silence g++ warnings but may actually even fix a
real problem as these classes can be inherited from and are deleted via a
pointer (to "this" itself, in Release() implementation).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-12 14:12:35 +00:00
Vadim Zeitlin
2aa54d47d6 Fix warnings about implicit float or double to int conversions in wxMSW.
Make the conversions explicit as these warnings are harmless.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-12 14:12:31 +00:00
Vadim Zeitlin
168d1f65c1 Reconcile HAVE_VARIADIC_MACROS and wxHAS_VARIADIC_MACROS definitions.
The main user-visible effect of this change is that giving configure
--disable-vararg-macros argument now really disables the use of variadic
macros whereas it didn't disable them in wx/cpp.h before.

It is, of course, also less confusing to not have two very similar but
different symbols.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-11 22:40:47 +00:00
Václav Slavík
19c453d0ac Use int instead of wxWindowID in wxNewId() and friends.
The functions are available in wxBase builds too, but wx/windowid.h
isn't. Rather than always including that header, just use int, for which
wxWindowID is a typedef. This keeps the functions available in wxBase
for compatibility and is consistent with how IDs are handled in other
parts of wxBase, particularly wxEvent.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-11 07:53:35 +00:00
Václav Slavík
1c6a98048b Use wxWindowID in wxNewId() and related functions.
wxNewId(), wxRegisterId() and wxGetCurrentId() functions all work with
window IDs, so they should use the dedicated type. Previously, they
worked with long, which is not even the same type (wxWindowID is int),
causing implicit type conversion warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-11 06:58:35 +00:00
Vadim Zeitlin
72c5855f5c Recognize VC12 (a.k.a. MSVS 2013) and define __VISUALC12__ for it.
Closes #15320.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 21:29:48 +00:00
Vadim Zeitlin
aad2997b67 Add default ctors and Create() to wxDirDialog and wxFileDialog in wxOSX.
Allow two-step creation of these classes.

Closes #15316.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 21:12:07 +00:00
Václav Slavík
17473a770a Fix lots of warnings reported by Clang.
Mostly potentially lossy implicit conversions in headers (long->int). Also dangling else warnings. Struct/class mismatches.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 16:41:34 +00:00
Václav Slavík
8778519200 Only return -1,0,1 from wxXmlResource::CompareVersion().
In other words, do as the comment says.  Also fixes an implicit
conversion warning.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 16:38:19 +00:00
Vadim Zeitlin
1e5b533ec0 Fix restoring the status bar help message after closing MSW menu from keyboard.
Add a hack to ignore WM_MENUSELECT messages we get for the top level menu
items: we must not clear the status bar help message when we get those because
it had just been restored to the original message that was there before the
menu was opened from the base class wxEVT_MENU_CLOSE handler, but this message
comes after it when keyboard is used to close the menu.

Closes #15315.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 12:28:06 +00:00
Václav Slavík
50d2908480 Fix VC++ warnings about __has_include().
The compiler warns about content after defined(__has_included), so avoid
the issue by putting these Clang tests inside one big #ifdef
__has_included block.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-09 17:29:02 +00:00
Václav Slavík
d459632844 Compilation fix for r74457.
Remove stray #endif from incorrectly merged changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-09 16:12:05 +00:00
Václav Slavík
3a07232f32 Fix OS X compilation in C++11 mode with libc++.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-09 15:47:13 +00:00
Václav Slavík
f256de1125 Work around wxFinite() definition conflict with <cmath>.
Using the GNU libstdc++ or Clang's libc++ implementations of the
standard library, <cmath> inclusion undefines the isfinite macro,
resulting in compilation errors when wxFinite() is used.  <cmath> can be
included unintentionally, e.g.  wx/hashmap.h may result in its inclusion
when using STD containers.

Work around this mess by checking if one of these <cmath>
implementations were already included and using std::isfinite() in that
case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-09 15:44:01 +00:00
Václav Slavík
f8c2c6f24d Use wxConvAuto in wxFile::Write().
For consistency with wxFFile.

No real change, as wxConvAuto will default to UTF-8 when writing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 11:46:53 +00:00
Vadim Zeitlin
38aae140ac Forbid creation of wxStandardPaths object directly.
This happens to work under MSW and Unix where there is only one
wxStandardPaths class for both the console and the GUI applications but
doesn't return the correct result under OS X where the Core Foundation
version, returned by wxStandardPaths::Get(), has to be used for the GUI
programs. And historically this confused a lot of people, so just ensure that
they can't accidentally create an object of the wrong type any more.

Closes #13537.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 23:14:21 +00:00
Paul Cornett
633e19307c avoid GTK+ prefixes for our tree entry code, it is not part of GTK+, should have been part of r74420
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 17:27:53 +00:00
Paul Cornett
11f1e38e26 avoid GTK+ prefixes for our tree entry code, it is not part of GTK+
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 16:35:40 +00:00
Paul Cornett
92d00a3615 remove symbol exports, this code is private to the library
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 16:04:28 +00:00
Paul Cornett
3540b72b5f remove empty GtkTreeEntryClass
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 15:58:42 +00:00
Paul Cornett
79bca169e5 move treeentry_gtk.h to include/wx/gtk/private/
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 15:44:21 +00:00
Vadim Zeitlin
5ac5e40e41 Prevent duplicate menu event processing in MDI windows.
Record the object propagating the given event upwards in the event object
itself and use it in wxMDIParentFrame to determine whether the event being
handled is already coming from wxMDIChildFrame and avoid sending it back for
processing it there again in this case.

This is ugly and makes wx event processing even more complex but this is the
only way I could find to ensure that

(a) Both the child and the parent frames get the events from the toolbar
    (even though the toolbar parent is the parent frame and hence normally
    the child wouldn't get notified about them at all and so the forwarding
    at wxMDIParentFrame level is required to make this work).

(b) The child gets the event only once, whether it comes from a toolbar (and
    hence indirectly via the parent frame) or from the child menu (and hence
    directly to the child, at least in wxMSW).

This commit fixes the event propagation unit test case, at least under MSW and
GTK.

See #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 22:18:42 +00:00
Vadim Zeitlin
821d856a61 Rewrite wxExecute() implementation under Unix.
This commit changes wxExecute() to handle SIGCHLD to be notified about the
child process termination instead of detecting when the file descriptor
corresponding to the other end of a pipe opened in the parent process was
closed in the child as this was not reliable and could (and did) result in not
detecting the termination of the child processes that closed all their file
descriptors before exiting.

This commit also removes a lot of platform-specific code duplicating the
generic event loop sources support and reuses it for wxExecute() purposes too.

Final big change is that wxEndProcessData was merged into wxExecuteData and we
don't have two similar but quite different classes any more but just one,
which is used both to pass the information from wxExecute() to wxAppTraits
methods and to store this information until the child termination.

Closes #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:32:16 +00:00
Vadim Zeitlin
76015a6bb7 Add a helper wxApp::GetValidTraits() method.
This method always returns some valid traits, even if we don't have wxTheApp
(which is possible in the console applications) or if its GetTraits() was
overridden to return NULL (which shouldn't be, but still guard against this).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:31:49 +00:00
Vadim Zeitlin
d5ab427f23 Make Unix wxAppConsole signal handling more flexible.
Instead of hardcoding the call to WakeUpIdle() in the signal handler itself,
just wake up the event loop when we catch a signal. This will still result in
WakeUpIdle() being called, before the next event loop iteration, but it will
also allow us to do other things on wakeup from signal as it will be done in
the upcoming wxExecute() changes to support wxEXEC_NOEVENTS in console
applications.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:31:03 +00:00
Vadim Zeitlin
39bc0168c3 Change wxWakeUpPipe to be a wxEventLoopSourceHandler.
No real changes but use wxEventLoopSource::AddSourceForFD() instead of
wxFDIODispatcher::RegisterFD() for this pipe because this is the preferred way
and because it will allow reusing this class for wxExecute() purposes later.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:30:39 +00:00
Vadim Zeitlin
64b4a35954 Include wx/evtloop.h from wx/evtloopsrc.h.
This is necessary to ensure that wxUSE_EVENTLOOP_SOURCE which wraps the entire
contents of this header is defined if it's included directly and not after
already including wx/evtloop.h.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:30:16 +00:00
Vadim Zeitlin
cd794127ff Include <fcntl.h> from a header using fcntl().
No real changes, just make the header self-containing instead of relying on
the file including it to include <fcntl.h> itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:29:53 +00:00
Vadim Zeitlin
cda5c26a48 Add wxStreamTempInputBuffer::ReadAll() helper.
This just reads everything remaining in the stream in a blocking way and will
be used to get the data remaining in the stream buffers after the child
process had been already closed (and hence can't write any more to it and
there is no risk of deadlock).

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:29:29 +00:00
Vadim Zeitlin
a25b76f5f9 Use CFSocket instead of CFFileDescriptor in wxCFEventLoopSource.
Use OS X socket APIs for monitoring file descriptors. They are more flexible
than CFFileDescriptor functions and can be used with any descriptors, not
necessarily the socket ones.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:29:05 +00:00
Vadim Zeitlin
71e9885be0 Make wxEventLoop::AddSourceForFD() static.
Any event sources should be registered with all the event loops, including the
ones that will be started in the future, and not only the current (and
potentially not even existing yet) one. So make AddSourceForFD() method static.

To still allow it to do different things in console and GUI applications, as
it must, virtualize it via the new wxEventLoopSourcesManager class which has
different implementations in the two cases, returned via wxAppTraits as usual.

Notice that this required moving the implementation of this method from
src/osx/core/evtloop_cf.cpp to src/osx/core/utilsexc_cf.cpp as the former file
is base-only and didn't have access to wxGUIAppTraits.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:28:42 +00:00
Vadim Zeitlin
5e38246378 Extract wxFDIOEventLoopSourceHandler in its own header.
No real changes, this is just in preparation for the further refactoring.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:28:16 +00:00
Vadim Zeitlin
bd7cea0ea6 Split wxWakeUpPipe class in MT-unsafe and MT-safe parts.
This class can also be useful when it's used in the main thread only, so
leave the lock-less part of the code in wxWakeUpPipe and derive a separate
wxWakeUpPipeMT from it for the use in wxConsoleEventLoop where it can be used
by multiple threads.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:27:53 +00:00
Vadim Zeitlin
2ccfebab09 Extract PipeIOHandler class into a header and rename to wxWakeUpPipe.
No real changes to the class, just make it possible to reuse it outside of
Unix wxEventLoop code.

See #10258.

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