Commit Graph

6569 Commits

Author SHA1 Message Date
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
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
Václav Slavík
07aec89fe1 Misc XRC format docs corrections.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-26 12:55:23 +00:00
Václav Slavík
c4c885f043 XRC: make wxStaticText's wrap property a dimension.
Parse it as dimension type (including dlg units) and not just integer.
This is backward compatible.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74864 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-26 12:55:20 +00:00
Václav Slavík
85d64f6aa1 XRC: make wxSplitterWindow's sashpos and minpanesize dimensions.
Parse them as dimension type (including dlg units) and not just integers. This is backward compatible.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-26 12:55:17 +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
Vadim Zeitlin
0d60699143 Use mask when drawing bitmaps in generic wxDataViewCtrl.
This allows to have bitmaps with transparent areas in them.

Closes #15510.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74826 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-17 15:25:52 +00:00
Václav Slavík
83e1811732 Fix wrong type information for {v,h}gap in XRC format docs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-16 15:15:37 +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
4de25822f3 Don't crash when laying out wxGridBagSizer with only hidden elements.
wxGridBagSizer lay out algorithm needs at least a single row and a single
column to work, so simply don't run it at all if there is nothing to lay out.

Closes #15475.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:14:51 +00:00
Vadim Zeitlin
0d17c5b66a Improve composite flags handling in the property grid wxFlagsProperty.
Don't consider that a flag is on just because one of its bits is enabled in
the current flags, for the composite flags (e.g. something like "BOTH = ONE |
TWO") all the bits composing the flag must be on for it to be enabled.

Closes #15499.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-15 00:14:41 +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
a03cf28b35 Don't lie about wxImageList in XRC format spec.
The documentation for setting image lists on controls was a complete
fabrication.  It pretended that image lists were created as child
<object>s, while in reality they are properties just as e.g.  fonts are.
Fix this and also better document the related 'image' property.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 15:20:21 +00:00
Václav Slavík
e07cbe6f7d Minor corrections to XRC format description.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 15:20:19 +00:00
Václav Slavík
697c1d39be Fix incorrect XRC format docs for wxMenu(Bar)'s "style" property.
It is not true that no standard properties are allowed, "style" is.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 15:20:16 +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
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
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
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
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
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
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
6c0d5a69e9 Don't use any icon for items inserted without one in wxMSW wxListCtrl.
Previously we erroneously used the first icon in the image list for them
instead. This was inconsistent with wxGTK and didn't make much sense, even if
it is the default behaviour of the native control, so don't do this any more
and explicitly specify I_IMAGENONE for the icon if it wasn't given.

Closes #15421.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 22:49:23 +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
777469ca93 Don't use DDEExec registry key in wxMSW wxExecute() if it's empty.
Some file types have DDEExec subkey in the registry but no value for it, don't
use DDE for launching the files of these types in this case as this only
results in errors.

Closes #15388.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 11:08:12 +00:00
Vadim Zeitlin
ccef4c3ad1 Fix column sorting UI in wxDataViewCtrl under wxOSX.
Use -outlineView:didClickTableColumn: delegate method instead of
mouseDownInHeaderOfTableColumn: one to ensure that:

(a) We don't sort the column if it's being dragged/resized (closes #15340).
(b) We sort the column on mouse up, not down (closes #15386).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:36:17 +00:00
Vadim Zeitlin
945a5ae749 Fix a couple of spelling mistakes in the documentation.
Closes #15382.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:36:12 +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
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
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
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
2767360fa8 Check the number of points in the image map in wxHTML.
Don't crash if an <area> element is incorrect and doesn't have the required
number of coords attributes.

Closes #15348.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-17 17:27:09 +00:00
Vadim Zeitlin
1404853498 Mention more announcement channels in the release making instructions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-17 12:57:44 +00:00
Vadim Zeitlin
1b192bb2b8 Document the release scripts really used for making releases.
End the polite fiction that build/tools/create-archive.py is used to build the
release because it isn't and all the last releases were built using different
scripts. Document their use in more details.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-17 12:57:29 +00:00
Vadim Zeitlin
13626cf01a Update binaries release notes for 2.9.5.
Correct the compiler versions used and update the checksums.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-17 12:57:21 +00:00
Vadim Zeitlin
be22ff2db4 Update SHA1 sums for 2.9.5 release files.
Add CHM and wxMSW setup, remove Headers.7z which is in binaries subdirectory.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-17 12:57:18 +00:00
Vadim Zeitlin
e748424e6c Mention that wxWidgets-x.y.z_Headers.7z must be uploaded to binaries subdir.
This file goes with the binaries, not the sources. Also fix its extension.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-17 12:57:13 +00:00
Vadim Zeitlin
1d40540f06 Updated release notes for 2.9.5.
Change the version and update sha1sums.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 19:16:45 +00:00
Vadim Zeitlin
27d79a5027 Fix insertion of radio menu items in wxOSX wxMenu.
Deal correctly with updating the indices when a radio item is inserted into an
existing radio group (which wasn't done previously and resulted in a unit test
failure in MenuTestCase::RadioItems()) and also with inserting the normal
items before an existing radio group as the stored indices were not updated
correctly.

The code is still ugly and it probably wouldn't be a bad idea to reuse
wxMenuRadioItemsData used in wxMSW for similar purposes, but at least the unit
tests pass now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:39 +00:00
Vadim Zeitlin
9ba66aea31 Don't hard code "2.9.3" in the release preparation instructions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 01:48:57 +00:00
Vadim Zeitlin
5b608795d4 Use "MSW" and "Windows" more accurately to avoid confusion.
"MSW" is used as the name of toolkit using the standard Windows UI while
"Windows" is the name of the OS under which wxGTK can be now used too (in
addition to wxMSW).

This terminology is not perfect but at least let's keep it unambiguous.

Closes #15328.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-13 20:07:51 +00:00
Vadim Zeitlin
58dc544700 Use Cocoa by default under OS X in configure.
Carbon is deprecated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-13 14:58:45 +00:00
Vadim Zeitlin
659991ac34 Mention that wxGTK can be built with Wayland backend too.
It is supported just as well as the already Broadway is.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-12 11:20:02 +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
dbf67d66ae Add documentation for building wxGTK under Windows.
Closes #15318.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 13:08:56 +00:00
Vadim Zeitlin
fff5f7d5d8 Merge libpng 1.6.2 into the trunk.
Add pngprefix.h file generated by libpng configure/make process (which we
don't run during wxWidgets build, so this is something that will need to be
redone manually whenever libpng is upgraded, the procedure for doing this is
documented in docs/tech/tn0025.txt) in order to use "wx_" prefix for all
libpng public symbols. This should avoid at least some problems due to the
conflicts between the built-in libpng and shared libpng loaded into the
process as GTK+ libraries dependency under Unix.

Also rename wx_png_{warning,error} to use upper case PNG for consistency with
wx_PNG_stream_{reader,writer} and to avoid conflict with png_{warning,error}()
which we now rename to have "wx_" prefix.

Closes #14157.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 17:44:15 +00:00
Vadim Zeitlin
01588a9e31 Add instructions for upgrading third party libraries.
Describe the process for upgrading the libraries for which we already use svn
vendor branches.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 17:35:18 +00:00
Vadim Zeitlin
704c084ad7 Correct typo in a link in i18n documentation page.
See r74442.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 13:47:39 +00:00
Václav Slavík
02aa5a6481 Clarify .mo deployment in i18n overview.
Fixes #15253.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 13:43:13 +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
Vadim Zeitlin
55ab731681 Fix FILETIME <-> wxDateTime conversions while DST is in effect in wxMSW.
The result was (consistently, so the tests still passed) off by an hour when
the program was ran while DST was in effect. Fix this by avoiding the use of
FileTimeToLocalFileTime() and LocalFileTimeToFileTime() and just directly
converting FILETIME values to wxDateTime. Not only this is more correct but
it's also simpler and more efficient as well.

Also add a unit test for wxFileName::SetTimes() too.

Closes #13098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 18:21:10 +00:00
Vadim Zeitlin
85db5fc87a Update announcement and readme files for 2.9.5 release.
Fill in the release date and update the changes description in the
announcement.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 14:46:03 +00:00
Vadim Zeitlin
d1c063b90f Don't ignore child process output if it exits with -1 exit code.
While this code is used by us if the program couldn't be launched at all, it
doesn't mean that it didn't run as -1 could also be returned by the child
process to indicate an error after outputting something, so we should still
read its output in this case.

Closes #15205.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:33:04 +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
d3ad22bdb3 Add wxEventLoop::ScheduleExit().
This method allows to request exiting from the given event loop even if it's
not the currently active one, unlike Exit() which would assert in this case.
With it, it becomes possible to ask the loop to terminate as soon as possible
even if a nested loop is currently running.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:26:13 +00:00
Vadim Zeitlin
7c60222510 Add wxTimer::StartOnce().
This is a simple wrapper for wxTimer::Start(timeout, wxTIMER_ONE_SHOT) but is
often more readable and is definitely better than Start(timeout, true) which
many people still use in spite of wxTIMER_ONE_SHOT existence.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:24:10 +00:00
Vadim Zeitlin
1b7f2c727d Optimize wxImage::Scale() by pre-calculating the values used.
Precompute the values used by various resampling algorithms once instead of
doing it for each pixel. This dramatically speeds them up: more than 3 times
faster in wxImage benchmark with the small images and up to 5 times faster
with larger images.

Closes #15281.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 14:48:24 +00:00
Vadim Zeitlin
1d84348c5a Add support for horizontal mouse wheel scrolling in wxSTC.
Handle horizontal mouse wheel scrolling events in a similar (but simpler, as
they always scroll and never change the font size) way to the vertical ones in
wxStyledTextCtrl.

Closes #15266.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:52:58 +00:00
Vadim Zeitlin
0ec98fd6c9 Improve wxGrid cell wrapping in wxGridCellAutoWrapStringRenderer.
Wrap the words too long to be shown on one line on several lines.

Also take the line breaks and TABs into account.

Closes #15249.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-16 10:50:54 +00:00
Vadim Zeitlin
5833988cb7 Add wxMouseEvent::GetColumnsPerAction().
This is similar to the existing GetLinesPerAction() but is for, surprise,
columns.

Also change the documentation to say that the value returned by both of these
methods is 3 under "most platforms" as some wxOSX currently uses 1 and not 3.

Closes #15239.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-10 15:53:29 +00:00
Vadim Zeitlin
926df8a162 Add wxFileDialog::GetCurrentlySelectedFilename().
Also send wxEVT_UPDATE_UI events for the extra controls in wxFileDialog.

The combination of these changes allows extra controls to update their state
depending on the current selection in the dialog. Show a simple example of
doing it in the dialogs sample.

Closes #15235.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:27 +00:00
Vadim Zeitlin
1054bcb21f Fix wxStyledTextCtrl::SetInsertionPointEnd().
This relied on SetInsertionPoint(-1) working like in wxTextCtrl but it didn't.
Add an explicit check to it for consistency with the other classes and to make
SetInsertionPointEnd() work.

Closes #15234.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:16 +00:00
Vadim Zeitlin
0a72cae73d Improve horizontal scrolling in wxRibbonControl.
Scroll by entire "sections", i.e. panes of the ribbon, instead of scrolling by
a fixed number of pixels as it's much more useful and user-friendly to uncover
the next section entirely instead of asking the user to press on the arrow
several times before being able to use it.

Closes #15232.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:11 +00:00
Vadim Zeitlin
1a986642f5 Add wxWindow::BeginRepositioningChildren() and EndRepositioningChildren().
This is just a refactoring of wxMSW code to make it possible to use deferred
window positioning from other places in subsequent commits.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:21:03 +00:00
Vadim Zeitlin
4300317631 Make wxSharedPtr::Release() really MT-safe.
Using wxAtomicDec() is not enough, its result also must be checked as it will
return 0 only in one of the threads if multiple threads call it in parallel,
while the old test for m_count==0 could pass for more than one thread,
resulting in deleting the same pointer more than once.

Closes #15227.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-31 23:20:58 +00:00
Vadim Zeitlin
a7587bc4a2 Fix printing multiple copies in wxMSW.
If wxPrinterDC was created by the native "Print" dialog for a printer that
supports printing multiple copies, we must not manually print multiple copies
ourselves as this results in too many copies being printed. However we still
need to loop explicitly for wxPrinterDC objects created manually or for the
printers without support for multiple copies (supposing they still exist).

Closes #10323.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-26 13:14:38 +00:00
Vadim Zeitlin
850a256b83 Use C locale representation for floating point numbers in wxAny.
Always use the decimal point, regardless of the current locale.

This completes the changes of r74019.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-26 13:14:35 +00:00
Stefan Csomor
552be5fd77 adding x server license terms for polygon methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 17:05:19 +00:00
Stefan Csomor
a8900da766 adding x server license terms for polygon methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 17:04:01 +00:00
Stefan Csomor
9f9305c0d2 adding x server license terms for polygon methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-24 17:01:54 +00:00
Vadim Zeitlin
691745ab41 Add a public wxModalDialogHook class for intercepting modal dialogs.
Extract wxModalDialogHook from wx/testing.h into its own wx/modalhook.h,
extend it to allow to be notified not only about showing modal dialogs but
also about dismissing them and document it and show its use in the dialogs
sample.

Also replace all the WX_TESTING_SHOW_MODAL_HOOK macros occurrences with
WX_HOOK_MODAL_DIALOG.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 13:15:41 +00:00
Vadim Zeitlin
9bc3af3e64 Fix return value of wxCountingOutputStream::LastWrite().
Don't reuse m_lastcount in wxCountingOutputStream to store the stream length,
this doesn't make any sense and results in LastWrite() returning completely
wrong results as it expects m_lastcount to be the number of bytes written by
the last operation.

Add m_lastPos member to store the stream length instead.

Also correct wxCountingOutputStream documentation.

Closes #15215.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 13:15:26 +00:00
Vadim Zeitlin
cc437b9654 Add wxInputStream::ReadAll() and wxOutputStream::WriteAll().
Unlike Read() and Write(), these functions always transfer exactly the
specified number of bytes or fail.

See #12056.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-20 13:15:16 +00:00
Vadim Zeitlin
4d623b67ee Add wxEVT_DIRCTRL_FILEACTIVATED wxDirCtrl event.
Allow processing double clicks on the files in the directory control.

Closes #15208.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:33:07 +00:00
Vadim Zeitlin
40c7c7f473 Rename wxEVT_DIRCTRL_CHANGED to wxEVT_DIRCTRL_SELECTIONCHANGED.
This is more consistent with the existing wxEVT_FILECTRL_SELECTIONCHANGED.

Closes #15209.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:33:01 +00:00
Vadim Zeitlin
c6dae1699e Allow associating a validator with wxGridCellTextEditor.
Add wxGridCellTextEditor::SetValidator() for finer control over text input in
wxGrid.

Closes #15176.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:32:55 +00:00
Vadim Zeitlin
f7ef20685f Add wxVector<>::const_reverse_iterator.
Provide this type too for compatibility with std::vector<>.

Closes #15192.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-08 11:21:32 +00:00
Vadim Zeitlin
789ab84044 Add IEEE 754 single/double precision support to wxDataStream classes.
Allow to optionally raed/write float/double values in IEEE 754 single/double
precision formats, respectively, instead of always using the extended
precision format for both of them.

This makes the code more flexible, allowing for better interoperability with
the other programs, and also allows to implement floating point functions in
these classes even when wxUSE_APPLE_IEEE is turned off (as can be the case
because of the licencing concerns for the code in extended.c).

Closes #10625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-06 00:31:03 +00:00
Vadim Zeitlin
a7c0de8a98 Fix event handling order in doc/view framework.
Ensure that the events are always (provided there is an open document)
processed in the following order:

1. wxDocument
2. wxView
3. wxDocManager
4. wxDocChildFrame
5. wxDocParentFrame
6. wxApp

Do this by forwarding the events from wxDocParentFrame to wxDocChildFrame
first and forward them from there to wxDocManager which -- and this part
remains unchanged -- in turn forwards them to the active wxView which finally
forwards them to wxDocument. This requires another condition in the event
handling code as we still must forward from wxDocParentFrame to wxDocManager
itself if there are no active children at all, but this is the only way to
have the same event order in all cases, whether the event is originally
received by wxDocChildFrame or wxDocParentFrame.

Document this and add a unit test verifying that things indeed work like this.

See #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-04 23:59:56 +00:00
Vadim Zeitlin
4ed3f4abd8 Pass menu events to the handler in the associated menu bar.
We handled the menu events in the menu itself and the associated window, but
not in the menu bar that the menu belonged to. This was unexpected, so allow
handling the events in the menu bar itself too.

Closes #15095.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-04 23:59:32 +00:00
Vadim Zeitlin
0492f62e0b Mention using wxString::c_str() with vararg functions in the change log.
This is sufficiently important to be mentioned here in addition to the main
documentation. Especially considering that this results in run-time crashes
instead of (just) compile-time errors with MSVC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-02 22:08:19 +00:00
Vadim Zeitlin
4322906f97 Copy max width of wxGridCellTextEditor when cloning it.
Previously the max number of characters that could be entered into the editor
was lost when it was cloned, making it impossible to really limit the user
entry.

Closes #15175.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-01 20:53:26 +00:00
Vadim Zeitlin
e78209f6a8 Fix wxFont test compilation after wxFont(int flags) ctor removal.
Also mention this incompatible (since 2.9.4) change in the change log.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-30 11:13:21 +00:00
Vadim Zeitlin
b960795ea8 Add wxFontInfo class to allow using named parameters for wxFont creation.
This helper class allows to create wxFonts using shorter and more readable
code, e.g.

	wxFont font(12, wxFONTFLAG_DEFAULT,
		    wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, true,
		    "DejaVu Sans");

can now be written simply as

	wxFont font(wxFontInfo(12).FaceName("DejaVu Sans").Underlined());

Remove the ctor from font flags added in r70445 as it's not needed any longer
now that we have this one and adding it resulted in compilation errors in the
existing code which compiled with 2.8 because of ambiguities between that ctor
and wxFont(int size, int family, int style, int weight. bool underlined, ...)
one, e.g.

	wxFont(12, wxFONTFAMILY_SWISS, wxNORMAL, wxNORMAL)

didn't compile any more but it does compile again now.

See #9907.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-30 10:27:38 +00:00
Vadim Zeitlin
67315c8bf9 Add support for wxICON_AUTH_NEEDED to wxMessageDialog.
Allow showing the standard "Authentication needed" dialog in the message boxes
under MSW.

Closes #15121.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-29 12:54:08 +00:00
Vadim Zeitlin
ce7fe42e84 Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).

The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.

Closes #10661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 10:11:03 +00:00
Vadim Zeitlin
0623b0f001 Add wxSocketBase::GetSocket().
Provide direct access to the underlying socket descriptor.

Closes #8829.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-22 10:45:30 +00:00
Vadim Zeitlin
62a58fbef5 Add wxTextEntryDialog::SetMaxLength().
Allow restricting the maximal number of characters that can be entered in
wxTextEntryDialog.

Closes #15158.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-20 22:13:33 +00:00
Vadim Zeitlin
b89e528d70 Standardize on using "Added" instead of "Add" in the change log.
As all the other verbs were used in the infinitive and not past tense, do the
same thing for this one too, especially as we already had a mix of both forms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-20 22:13:30 +00:00
Vadim Zeitlin
2d3636405a Added chainable wxWizardPageSimple::Chain() overload.
Add the simplest and most fool proof of chaining the pages in static wizards:
just chain several calls to the new, non-static, wxWizardPageSimple::Chain()
overload.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73806 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-10 12:12:57 +00:00
Vadim Zeitlin
7d8741ed2d Use API_VERSION_NUMBER for debug help API version check.
This symbol is not documented but seems to be defined in all the existing
versions of imagehlp.h, so use it instead of relying on a hack with checkng
whether DBHLPAPI symbol is defined.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-08 14:15:35 +00:00
Vadim Zeitlin
4daceaacbd Check that files returned from wxDir::FindXXX() match the filter.
Native Windows functions used by wxDir check the filter against both the short
and the long name resulting in unexpected results, e.g. searching for
"foo.baz" would find "foo.bazaar".

Fix this by explicitly rechecking that we have a valid match ourselves.

Closes #3432.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-08 10:03:48 +00:00
Vadim Zeitlin
6f58f3d7e0 Allow to customize wxGrid column auto-sizing.
By default the columns are auto-sized to fit just their label, which is fast
but not very user-friendly. Allow customizing this behaviour by handling the
(new) wxEVT_GRID_COL_AUTO_SIZE event.

Closes #15077.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-05 21:11:59 +00:00
Vadim Zeitlin
6b33db8f56 Added wxSearchCtrl to list of currently non-native wxGTK controls.
It could be implemented using the native GtkSearchEntry in GTK+ 3.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-31 01:12:12 +00:00