Commit Graph

55757 Commits

Author SHA1 Message Date
Václav Slavík
616ae1e843 Fix VC6 compilation after r72430.
VC6 doesn't handle for loop scope correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 10:53:40 +00:00
Václav Slavík
c4dae34da8 Add MUI_LANGUAGE_NAME to wx/msw/missing.h.
Fixes VC6 compilation after r72430.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 10:53:16 +00:00
Václav Slavík
01f953efb2 Add wxTranslations::GetBestTranslation().
Implement preferred language selection on modern systems (OS X, Windows
Vista+). User settings for locale (aka "regional settings") and UI
language are independent there and the UI language shouldn't be
determined from the locale.

Moreover, the OS provides a list of preferred languages, not a single
value (as with locale), so we should use the best language given user's
preferences and available translations. A Czech user may prefer Slovak
UI over English, for example, and we should use Slovak translation in
absence of Czech one in that case instead of falling back to English.

On Unix, locale is language and so things remain as before.

Notice that calling wxLocale::Init(wxLANGUAGE_DEFAULT) does the right
thing now: it sets the locale to whatever the user has configured in
regional settings and loads translations corresponding to default
wxTranslations language, which is determined as described above.
Previously, UI would be translated using a language corresponding to the
regional settings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-08 08:58:38 +00:00
Dimitri Schoolwerth
8566fe6edf Regenerated Xcode projects.
Updated the Xcode projects for Scintilla 3.21 and removal of src/osx/spinctrl_osx.cpp.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-07 20:15:29 +00:00
Dimitri Schoolwerth
1ee968ea97 Updated instructions for XML Tools.
A newer version of XML Tools has been released (2.9.4) which supports OS X 10.6 and later. As such a link to the beta version of 2.9.4 is not needed anymore.



git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-07 20:11:00 +00:00
Václav Slavík
c9a695b777 wxMSW: Fix incorrect subitem rect calculation in wxListCtrl.
HandleSubItemPrepaint() calls wxGetListCtrlSubItemRect() (a thin
replacement of ListView_GetSubItemRect) with subitem argument
corresponding to MSDN documentation: it should be 0 for the whole item
and 1-based for subitems.

Unfortunately, as pointed out in an explanatory comment for
wxGetListCtrlSubItemRect(), MSDN lies and the index actually is 0-based.

The bug causes wxListCtrl's content to be shifted by one column and
rendered with additional artifacts as soon as custom drawing is used,
e.g. when a custom font is used.

This bug was introduced in r55378; the code correctly accounted for this
before that. This change partially reverts that commit.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-07 09:51:10 +00:00
Stefan Csomor
b7e3daf441 restrict change from r71719 because otherwise apps like docview sample in ddi mode are not allowing their different child frames to be z-reordered
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-06 14:24:28 +00:00
Steve Lamerton
58f513e990 Disable wxWebView::Find and associated functions under MinGW and VC6 to fix compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-06 08:39:12 +00:00
Vadim Zeitlin
81b93d3e85 Fix wxVLogStatus definition.
This macro can be used with 2 arguments (format and argptr) or 3 (the frame
pointer as an additional first argument), so don't define it as taking 2
arguments but as a macro without arguments, as we already do for
wxVLogSysErrorfor the same reasons.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-01 22:38:40 +00:00
Vadim Zeitlin
9a1b36af5a Fix example of using GetUnicodeKey() in the documentation.
A Unicode key is not always printable, it can be a control character as well.

Closes #14622.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-31 12:31:44 +00:00
Václav Slavík
f5462b02b8 Fix compilation after r72375 - LC_CTYPE requires locale.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-31 10:45:45 +00:00
Vadim Zeitlin
35b8c1a0a7 Correct wxAuiManager library in documentation.
It's wxAUI, not wxBase.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:26:09 +00:00
Vadim Zeitlin
22d00dbb82 Fix opening URLs in new window with recent Firefox under Windows.
Don't fail if we can't replace "-1" in the WWW_OpenURL topic value stored in
the registry with "0", it can be already "0" for the recent Firefox versions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:25:46 +00:00
Vadim Zeitlin
9ecc6bc2f1 Explicitly reject the use of wxTE_PASSWORD in generic wxSpinCtrl.
wxTE_PASSWORD has the same value as wxALIGN_CENTRE_VERTICAL which could be
implicitly specified as part of wxALIGN_CENTRE, but should never be used with
wxSpinCtrl, so explicitly filter it out when creating the associated
wxTextCtrl.

Closes #14452.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:25:24 +00:00
Vadim Zeitlin
9bd25c8670 Generate wxEVT_COMMAND_TEXT_ENTER events for generic wxSpinCtrl.
Pass wxTE_PROCESS_ENTER to wxSpinCtrlTextGeneric if it's specified for
wxSpinCtrl itself and also forward wxEVT_COMMAND_TEXT_ENTER events from it to
wxSpinCtrl itself.

This fixes lack of these events for wxSpinCtrlDouble under MSW and also lack
of them for any kind of wxSpinCtrl in the ports using generic version (notably
wxOSX).

Closes #14604.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:25:01 +00:00
Vadim Zeitlin
9e565667d0 Add wxSpinCtrl::SetBase() to allow entering hexadecimal numbers.
Add a generic SetBase() API even though right now only bases 10 and 16 are
supported as we might support other ones (e.g. 8?) in the future. Implement it
for MSW, GTK and generic versions.

Add controls allowing to test this feature to the widgets sample.

Add "base" property support to the XRC handler for wxSpinCtrl, document it and
test it in the xrc sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:24:38 +00:00
Vadim Zeitlin
36090ae57e Remove wxOSX implementation of wxSpinCtrl and use the generic one.
wxOSX doesn't provide a native spinner+text control so it used a generic
implementation of wxSpinCtrl but a different one to the version found in
src/generic/spinctlg.cpp.

Just use the real generic version instead, it doesn't make sense to have two
different versions of the same generic control.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:24:12 +00:00
Vadim Zeitlin
62f96636b5 Refactor text to/from double conversion in wxSpinCtrlGenericBase.
The code always used ToDouble() and Format("%g") which was a bit strange for
integer-valued wxSpinCtrl. Move the conversions to their own virtual functions
for clarity, perhaps correctness and, especially, flexibility as they will be
overridden in wxSpinCtrl soon.

Also move wxSpinCtrlGenericBase::m_format to wxSpinCtrlDouble as the base
class really doesn't need it at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:23:49 +00:00
Vadim Zeitlin
b9b1eec604 Remove wxRTTI macros from wxSpinCtrlGTKBase.
This is not a public class and it doesn't need to be appear in wxRTTI.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:23:26 +00:00
Vadim Zeitlin
63420bcccf Fix position carried in wxSpin{Button,Ctrl} events for 32 bit values in wxMSW.
Don't use WM_VSCROLL message parameter as the position because it's a 16 bit
value and is not enough for the spin controls using 32 bit range. Just use the
current value available from the control itself instead.

This fixes assert failures in the spin page of the widgets sample when
changing the value of a control when it is > SHRT_MAX.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:23:03 +00:00
Vadim Zeitlin
d15e514e84 Use wxSOCKET_WAITALL in wxHTTP to ensure that all data is sent.
POST-ing sufficiently big amounts of data in wxHTTP didn't work because it
couldn't be sent all at once to the server. Use wxSOCKET_WAITALL to ensure
that we do send all of the data.

Closes #14598.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:22:40 +00:00
Vadim Zeitlin
8421cb3c7c Fix bugs in parsing wxLongLong values starting with zeroes.
wxCRT_StrtoullBase(), used by wxString::To[U]LongLong(), didn't handle leading
zeroes nor leading 0x correctly: it never auto-detected base 8; didn't ignore
the leading 0 even if base 8 was specified explicitly; didn't recognize "0X"
prefix at all (only "0x").

Fix all these bugs and add test cases for parsing numbers in other bases to
the unit tests.

Closes #14596.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:22:17 +00:00
Vadim Zeitlin
cc699de848 Added wxSimplebook class: a wxBookCtrl without controller.
This new control allows the program to show one of the several pages without
allowing the user to change them (or even see that there are several of them)
himself.

This class is fully inline, so it doesn't add anything to the library and
hence doesn't need neither wxUSE_SIMPLEBOOK nor the corresponding configure
option.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:21:54 +00:00
Vadim Zeitlin
2e18fe7139 Virtualize showing/hiding the pages in wxBookCtrlBase.
No real changes, just make it possible to change how the pages are hidden and
shown in the derived classes. This is not used by any of them yet, but will be
used by wxSimplebook soon.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:21:29 +00:00
Vadim Zeitlin
9ed3454e3d Remove unnecessary TranslateBookFlag() from the notebook sample.
It probably was needed before, when the flags had different values for
different controls, but is simply unused now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:21:06 +00:00
Vadim Zeitlin
3ebf38b3b4 Document that menu item bitmaps must be set before appending them.
At least in MSW we need to know in advance whether we're going to use normal
items or owner-drawn ones currently.

Closes #3641.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:20:44 +00:00
Vadim Zeitlin
5f9f6b4742 Don't lay out the window being destroyed unnecessarily.
This is just a small optimization: it's useless to waste time on redoing the
layout of a window that is going to be destroyed soon anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:20:20 +00:00
Vadim Zeitlin
bfa78c63b9 Use wmain() if supported by the compiler/CRT instead of main().
This avoids a needless conversion from (originally Unicode) command line to
ANSI by the CRT and conversion back by wxWidgets and, especially, ensures that
there is no data loss if the Unicode command line arguments can't be converted
into the current charset.

See #14580.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 20:19:57 +00:00
Vadim Zeitlin
6ae941a68c Dutch translations update from Thomas De Rocker.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 10:18:35 +00:00
Václav Slavík
ee915a646f Include gettext MO files in distribution archives.
It's the usual thing to do. Ideally, we'd also compile them as part of
build process, at least on Unix, but this is better than nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-30 09:59:14 +00:00
Stefan Csomor
f43a398892 avoid duplication in native dialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-29 12:17:31 +00:00
Stefan Csomor
8556919437 use global NSLayoutManager
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-29 12:16:36 +00:00
Stefan Csomor
befe64edb4 add global NSLayoutManager instance
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-29 12:15:50 +00:00
Stefan Csomor
ee6a122fa3 fixes #13557
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-29 12:01:19 +00:00
Stefan Csomor
3e43dbc6c7 temporary workaround
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-29 11:20:23 +00:00
Stefan Csomor
18d5c52d67 propagating font to the individual columns, changing row heights according to font size, fixes #14578
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-29 09:00:51 +00:00
Stefan Csomor
87fcb4945a remove duplicate code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-29 07:11:20 +00:00
Stefan Csomor
0d50568033 fixing usage of load states, set controller visible correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-28 19:00:23 +00:00
Steve Lamerton
66ac040060 Add support for searching and highlighting a wxWebView.
Currently supports WebView on GTK and IE. Closes #14045.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-28 17:13:13 +00:00
Jouk Jansen
de3d7096fe Update of OpenVMS compile support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-28 06:27:50 +00:00
Jouk Jansen
117f3eaaa7 compilation fix for case that wxHAS_RAW_BITMAP is NOT defined
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-28 05:57:14 +00:00
Vadim Zeitlin
95bf8d1b76 Refreshed all source message catalogs.
Ran "make allpo" to update the catalogs with the new strings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-27 09:53:46 +00:00
Vadim Zeitlin
717ca626ae Chinese translations update from Jiawei Huang.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-27 09:53:08 +00:00
Stefan Csomor
43321b802f reverting for the moment, original problem #12227, this leads eg in the mediaplayer sample to a non-show of the noteobook page
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-27 06:36:40 +00:00
Vadim Zeitlin
45f0926d41 Avoid crashes when creating initially hidden MDI child under Unity.
Ignore "hide" signals for the menus without associated shown window. Ubuntu
Unity sends them and we crashed because of a recursive assert in the
corresponding signal handler before.

Now the code doesn't crash any more but the menus still don't behave correctly
when the last MDI child is destroyed.

Closes #13593.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-26 16:35:02 +00:00
Julian Smart
e64dd5d652 Fixed typo in dialog project file
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-25 18:04:11 +00:00
Julian Smart
31f95a7faf Fixed a problem with text effects flag always being set on dialog exit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-25 18:03:23 +00:00
Václav Slavík
270bae200d Make sure wchar_t CRT functions work on OS X.
In OS X and iOS, wchar_t CRT functions convert to char* and fail under
some locales. The safest fix is to set LC_CTYPE to UTF-8 to ensure that
they can handle any input.

Note that this must be done for any app, Cocoa or console, whether or
not it uses wxLocale.

See http://stackoverflow.com/questions/11713745/why-does-the-printf-family-of-functions-care-about-locale

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72375 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-25 11:14:44 +00:00
Václav Slavík
bb0907b743 Test if wxString::Format() works with non-ASCII format string.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-25 11:14:17 +00:00
Stefan Csomor
ebefc86eae simpler implementation that also works over remote connections by Kevin O.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-25 09:38:12 +00:00