Commit Graph

57172 Commits

Author SHA1 Message Date
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
Robin Dunn
7e05f038b9 Comment out the CIAbot script, the site has been dead a long time.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-11 01:28:56 +00:00
Vadim Zeitlin
38534f5969 Implement monitoring of file descriptors in wxMotif event loop.
This allows applications using wxMotif to link again after the changes of
r74350 -- and wxExecute() unit tests actually pass, too.

Closes #15305.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 23:43:57 +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
5b526f4b85 Fix typo in wxGUIEventLoop::ScheduleExit() in wxMotif.
This was broken in r74335.

See #15305.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 21:18:29 +00:00
Vadim Zeitlin
c5453c7956 Add wxX11EventLoopSourcesManager stub implementation to fix wxX11 linking.
Asynchronous wxExecute() still doesn't work in wxX11 but at least the programs
using the library can be linked now.

See #15305.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 21:15:18 +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
Vadim Zeitlin
497b4e64ce Fix checking for GTK+ 3.0 in configure.
Update gtk-3.0.m4 to work correctly with gthread module and regenerate
configure using the new version of this file.

Closes #15319.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 20:48:48 +00:00
Vadim Zeitlin
46629a0a1c Ukrainian translations update from Yuri Chornoivan.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 20:35:25 +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
Václav Slavík
661698e54f Define WXBUILDING in Xcode projects.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 16:35:07 +00:00
Paul Cornett
cc7d80fee2 non-pch build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 13:17:02 +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
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
Vadim Zeitlin
a98d057434 Ignore WM_MENUSELECT messages indicating that the menu was closed.
Don't update the help string in this case, this is not necessary and can clear
the help string set elsewhere.

See #15315.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74467 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 12:24:54 +00:00
Vadim Zeitlin
4db65a4202 Vietnamese translations update from Trần Ngọc Quân.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 12:00:31 +00:00
Vadim Zeitlin
2b2e2af78f Update translations template for 2.9.5 release.
No real changes, just removed a one character string that is not marked as
translated any longer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 11:57:20 +00:00
Vadim Zeitlin
0646084eb2 Allow retrieving the descent and external leading of empty strings.
This used to work before wxTextMeasure changes so make it work again instead
of optimizing the case of empty string away and not returning anything in the
descent and externalLeading output parameters in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 01:28:18 +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
Vadim Zeitlin
f92099657f Check axis number in the received joystick messages.
Closes #15313.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-09 16:44:37 +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
Stefan Csomor
bc9dcd9fd4 fixing forced link of quicktime backend on osx_cocoa
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-09 15:55:29 +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
Vadim Zeitlin
2e6bfeb903 Check for buffer being big enough in wxPathOnly().
Just return NULL or empty string if the input path is too long. This is
probably not ideal but it fixes a buffer overflow and all this code needs to
be rewritten to use wxFileName() anyhow so it's not worth doing anything more
at this moment.

Closes #15302.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-08 21:44:06 +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
6e87dba9e5 Regenerate configure after libwxscintilla linking changes.
This should have been done together with the changes of r74425, as
autoconf_inc.m4 had changed, configure should have been regenerated too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 16:35:44 +00:00
Vadim Zeitlin
d53c1e7b09 Define XML_STATIC in Expat header instead of Expat projects.
This reverts r74444 and defines XML_STATIC unconditionally in Expat sources
themselves as we always use the built-in Expat as a static library, so this
solution is simpler and more portable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 14:44:56 +00:00
Václav Slavík
a66bf817a6 Compilation fix for r74440 and STL builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 14:13:01 +00:00
Vadim Zeitlin
23cebdf4f5 Define XML_STATIC for Expat build to fix linking of Windows DLLs.
The new Expat assumes it's built as a DLL by default, define XML_STATIC to
indicate that this is not the case as we always build it as a static library.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 13:58:33 +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
Václav Slavík
ea160f01c6 Don't look for catalogs in AddCatalogLookupPathPrefix() path directly.
Previously, the prefix directory itself for searched for catalogs, in
addition to prefix/lang/LC_MESSAGES and prefix/lang.  This never made
much sense, because only one catalog could be in such place, instead of
multiple catalogs for more languages.  It also prevented successful
identification of catalog's language and didn't work with
GetAvailableLanguages().

Remove this misfeature and update the documentation accordingly.  Update
OS X-specific code so that it continues to work (it previously depended
on this behavior).  As a side effect, *.lproj directories are now
recognized in all search prefixes, not just in Resources.

See #12498, #15253.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 13:42:50 +00:00
Václav Slavík
92d609f4b6 Improve translations lookup logging.
Log match directory in GetAvailableTranslations().  Log search paths
with one directory per line, for better readability when debugging.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 13:42:27 +00:00
Václav Slavík
3f84459166 Correct wxTranslations docs: CWD is not searched.
The documentation incorrectly stated that the current working directory
is searched for translations.  This isn't the case (and wouldn't be a
good thing to do).

See #12498.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 13:42:02 +00:00
Vadim Zeitlin
0053219faf Remove the TOOLKIT test from msvc-headers-setuo-h definition.
This is unnecessary now that TOOLKIT is back to being a constant again and
results in errors if GTK TOOLKIT is enabled.

Closes #14965.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 12:58:45 +00:00
Vadim Zeitlin
1b7751aaa9 Add files necessary to run Expat configure.
This should have been part of the previous commit (r74436).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 12:47:34 +00:00
Vadim Zeitlin
11a3e7b6da Update the version of Expat used to 2.1.0.
Merge with the latest version, mostly discarding our changes to 1.95.6 as they
seem to be unnecessary any longer, keep just bakefile-specific addition to
configure.

Also update our own makefile to define HAVE_EXPAT_CONFIG_H which is now needed
by Unix build.

Closes #11677.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74436 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 12:45:30 +00:00
Václav Slavík
e7b6bef7c5 Use wxConvAuto() in wxStyledTextCtrl::DoLoadFile().
This is both more reasonable than the current runtime encoding (the
input file is from unknown source) and more robust (it can handle UTF-*
encoded files transparently).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 11:47:17 +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
8ac8eb6fda Don't pretend that wxAnyButton::SetBitmap() supports invalid bitmaps.
Because it doesn't under MSW.

See #13569.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 00:39:05 +00:00
Vadim Zeitlin
8472511246 Avoid using buffer of already deallocated string in wxHTMLDataObject.
Ensure that the temporary string inside which the pointer returned by
utf8_str() may point remains alive for long enough.

Closes #15279.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-07 00:38:41 +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
ccaf2891c9 Reuse wxMessageOutputStderr for wxLogStderr implementation.
In addition to avoiding (tiny) code duplication, this ensures that both places
use the stream in the same orientation, i.e. either both use the narrow
functions or the wide ones. Thus, it fixes a problem with output simply
disappearing if wxLogStderr and wxMessageOutputStderr were both used: the one
used first disabled any output by the other one.

Closes #14782.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 22:57:05 +00:00
Vadim Zeitlin
700256bbdb Correctly restore the originally used C locale in wxLocale dtor.
Save the original locale used before we changed it instead of "restoring" the
same locate that this wxLocale object was using.

Add a unit test to verify that this does work as expected.

Closes #14873.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 22:48:20 +00:00
Vadim Zeitlin
c80ae45452 Only link with libwxscintilla if using Scintilla is enabled.
Correct the changes of r74408 to avoid using libwxscintilla if we don't build
it at all.

See #13837.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 19:14:59 +00:00
Vadim Zeitlin
2d5efafe74 Disable test for setting the creation time under Unix.
Also document that this doesn't work there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 19:14:20 +00:00