Commit Graph

50921 Commits

Author SHA1 Message Date
Jaakko Salli
d517b60699 Modify float/double wxAny testing to use CPPUNIT_ASSERT_EQUAL() instead of CPPUNIT_ASSERT_DOUBLES_EQUAL(), so that we know the retrieved values are truly identical.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 17:21:50 +00:00
Vadim Zeitlin
64b62afea8 Don't accept focus in the dummy main generic spin control window.
This window is only used as a container for the sub-windows and shouldn't
accept focus, trying to set it to it doesn't work anyhow (see #12004).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:58:36 +00:00
Vadim Zeitlin
3a71210569 Don't send wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED when nothing changed.
The generic double spin control sent UPDATED events whenever it lost focus,
whether anything changed or not.

Don't send events unless the controls value has really changed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:58:32 +00:00
Vadim Zeitlin
5afb019a0c Always update the value of generic spin control when leaving it.
We could be left with an invalid value in the control when leaving it. E.g. in
the widgets sample whose double spin control has range from 0 to 10, 123 could
be entered in it and was not replaced by 10 when the control lost focus. This
happened because the code didn't bother to update the text control if its
contents already corresponded to the internally stored value -- but this was
wrong as it could have a different representation.

Just always update the text unconditionally when synchronizing it with the
internal value.

See #12004.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:58:27 +00:00
Vadim Zeitlin
fbf3385651 Make keyboard navigation in generic wxTreeCtrl more Mac-like under OS X.
In the native OS X tree control right cursor arrow expands the current item
and the left one collapses it if it's expanded, make the generic control work
like this too under Mac.

Closes #12019.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:58:22 +00:00
Vadim Zeitlin
d93b98740c Check that menu ids are limited to MSW-supported range.
We already check that positive (i.e. specified by user and not generated by
wx) window ids are in 0..SHRT_MAX range. Now do the same for the menu ids as
ids outside of this range suffer from the same problem under MSW: they get
wrapped and become negative when we receive events for them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:40:18 +00:00
Vadim Zeitlin
bcd286534a Added wxLANGUAGE_BOSNIAN.
Closes #12016.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:40:11 +00:00
Vadim Zeitlin
de623c67b9 Mention that hatched pens don't work under wxGTK and wxX11.
See #11983.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:22:57 +00:00
Václav Slavík
611bed3511 Refactor wxTranslationsLoader API.
Instead of calling back into wxTranslations to actually load the data,
return wxMsgCatalog instance from
wxTranslationsLoader::LoadCatalog(). This requires making wxMsgCatalog
public.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 12:12:53 +00:00
Václav Slavík
ba5619e076 Move wxScopedPtr::reset() implementation to wxDEFINE_SCOPED_PTR.
Just as the destructor, reset() calls delete on T pointer and so can
only be defined when T is fully defined.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 05:43:01 +00:00
Václav Slavík
bdd6a03de7 Use wxCHECKED_DELETE in wxScopedPtr::reset().
It was only used in delete call in destructor, but the use in  reset()
needs safeguards as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 05:42:57 +00:00
Václav Slavík
4e0c592f98 Use wxCHECKED_DELETE in wxScopedPtr<T>.
It was only used in macros-based implementation, use it in the template
version too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-06 05:42:52 +00:00
Vadim Zeitlin
c14dc5541c Fix PCH-less compilation after recent changes.
Include wx/sizer.h explicitly when not using PCH.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 13:53:40 +00:00
Václav Slavík
ce411ca8f5 Fix incorrect assumptions about locales codes.
wx incorrectly assumes that Unix locale codes have the form of xx_YY,
where both xx and yy are two characters long. This is wrong, xx is
ISO 639 code, which can often have 3 characters ("ast", "gez" etc.);
future ISO 639-6 will have up to 4 chars. Similarly, ISO 3166 has
alpha-3 variant of country codes too (even though they aren't used in
this context today).

For parsing needs, we can just look for '_' in the code. The only place
where a check for xx_YY code was performed was GetSystemLanguage().
Instead of bothering with correct check (or a heuristic), let's simply
assume locale is xx_YY code and only do alternative handling if that
assumption fails. According to the comments, this alternative handling
was for cases such as LANG=german environment on SuSE, but it's safe to
say that no modern systems do that anymore, so it's OK that this patch
is marginally less efficient on such legacy systems.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 13:50:15 +00:00
Vadim Zeitlin
fd61f68445 No changes, just make wxDataViewEditorCtrlEvtHandler private.
This class is used by wxDataViewCtrl implementation only, there is no need for
it to be in a public header.

Move the class declaration from wx/dataview.h to datavcmn.cpp.

See #11732.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:45:14 +00:00
Vadim Zeitlin
66c02e6e33 Pop event handler from wxDVC edit control before destroying it.
This fixes the assert in wxWindow dtor checking that all event handlers pushed
on the window were removed.

Also fix a memory leak by not creating an unnecessary object of wxKillRef
class. In fact remove this class entirely.

Closes #11732.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:45:09 +00:00
Václav Slavík
dfbb5eff44 Don't use size_t for plural forms parameter.
size_t should be used for size of objects, which wxGetTranslation() and
wxTranslations::GetString() 'n' argument isn't -- it's just a regular
integer.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:27:07 +00:00
Vadim Zeitlin
fc48f78fd0 Notify user less intrusively about overflow when previewing HTML printouts.
We used to show a modal dialog if the page didn't fit horizontally but this
was too intrusive when the user was just previewing the output and not really
printing it. Moreover, the question of the message box ("Print" or "Cancel")
simply didn't make sense in this case.

Fix both problems by not showing this dialog at all when previewing. Instead,
notify the user with a much less intrusive info bar in the preview window.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:20:15 +00:00
Vadim Zeitlin
742df99230 Move wxInfoBar to core library from adv.
This is necessary in order to be able to use it in the print preview (an
upcoming change).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:20:08 +00:00
Vadim Zeitlin
1bd122ddfa Replace wxPrintout::SetIsPreview() with SetPreview().
Unlike the old function just indicating whether a printout is being used for
previewing, the new one associates the preview object with it. This can be
useful if we need to access the window used for the preview, for example.

Also remove a bunch of apparently unnecessary SetIsPreview(false) calls as
printing (and not previewing) is already the default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:19:59 +00:00
Vadim Zeitlin
5009cb6acc No real changes, just clean up wxAbortProc mess.
Remove m_lpAbortProc which is not needed at all and just requires ugly casts
because its type was different from the real type of wxAbortProc.

Get rid of the rest of the old Win16 code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:19:53 +00:00
Vadim Zeitlin
79d81c45ca Remove GtkPrintOperation preview signal handler.
This handler wasn't doing anything useful as we were always using the default
preview based on an external program, so just remove it completely.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 12:19:44 +00:00
Václav Slavík
338084945b Fix wxScopedCharTypeBuffer<T>::CreateOwned() to match docs.
The documentation says that it takes ownership of the memory block
passed to it, but the implementation made a copy.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64209 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-05 07:45:33 +00:00
Vadim Zeitlin
10acc3ef6a Ignore time component of SYSTEMTIME in wxCalendarCtrl.
Native month calendar functions doesn't always return correct values in the
time part of SYSTEMTIME so ignore it and use just the date component.

To simplify doing it, add helper (MSW-specific) SetFromMSWSysDate() and
GetAsMSWSysDate() functions which convert between wxDateTime and SYSTEMTIME
but take only date component into account.

This commit partially replaces changes of r63560 and closes #11276.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-04 21:59:17 +00:00
Václav Slavík
79309be9db Fixed a typo in misc/languages/README.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-04 16:38:56 +00:00
Václav Slavík
a0219e4580 Move wxFileHistory out of docview framework, add wxUSE_FILE_HISTORY.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-04 12:15:14 +00:00
Vadim Zeitlin
9edb8fa062 Use wxString::ToCDouble() instead of emulating it.
No real changes, just replace the code which was working around the absence of
a wxString::ToCDouble() with the call to the real thing now that we have it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-03 11:19:42 +00:00
Jouk Jansen
bc9666c999 Update OpenVMS compile support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-03 08:02:02 +00:00
Vadim Zeitlin
86e4f8ad08 Fix PCH-less build after changes r64139.
As wx/log.h is not included from wx/dynlib.h (via wx/msw/private.h) any
longer, include it from here explicitly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-02 12:19:19 +00:00
Vadim Zeitlin
8ba51e7326 Include <windows.h> before including <shellapi.h>.
Although this is not needed with most compilers (including recent MinGW),
including <shellapi.h> directly apparently doesn't work with some older MinGW
versions.

This fixes compilation after the changes of r64139.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-02 12:19:14 +00:00
Vadim Zeitlin
5708ae18f2 Add wxTreeCtrl::{Clear,Set}FocusedItem().
Allow changing just the currently focused (not selected) item and also
removing the focus completely.

Closes #11599.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-02 12:01:30 +00:00
Vadim Zeitlin
bd235295fb Spell contributor name correctly.
Use the spelling preferred by Nikolay himself, see #11599.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-02 11:48:39 +00:00
Stefan Csomor
719ddf1e4e updated headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 18:29:43 +00:00
Stefan Csomor
170ea46e84 textctrl impl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 18:29:17 +00:00
Stefan Csomor
c61605ef50 adding wrapper for native UIWindow, using designated initializer for view controller
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64185 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 16:55:33 +00:00
Stefan Csomor
b5f597047c adjusting to API change of cocoa and carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64184 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 16:53:33 +00:00
Stefan Csomor
74b965198c cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 16:52:43 +00:00
Václav Slavík
cfdcbf660d Check in samples/dll for WXUSINGDLL.
If it is set and DLL build of wx is used, emit an error, as the sample
won't work correctly in that case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 16:46:22 +00:00
Stefan Csomor
ffb317d461 moving value setting conformance to impl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 16:40:44 +00:00
Stefan Csomor
d09d7f11bb iphone implementations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 16:31:27 +00:00
Jaakko Salli
0cc226ad75 Use scoped ptrs to managed wxAnyValueType instances. This fixes deallocation issues in some dynamic library use cases.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 13:32:41 +00:00
Stefan Csomor
e5e5b843dd adding uifont support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-30 09:29:36 +00:00
Václav Slavík
0d28a1f927 Always use active wxTranslations instance via wxLocale.
Don't use m_translations directly, if the user made changes to
wxTranslations instance, it would be too confusing if calls through
wxLocale compat API did nothing.

Also don't change active wxTranslations object from wxLocale if already
done by user, only call wxTranslations::Set() from wxLocale constructor
if it wasn't already set by the user. Still do if wxTranslations
instance currently in use was set by previous wxLocale on the locale
stack.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-29 08:31:42 +00:00
Julian Smart
02aa812cb0 wxRTC: fixed style selection reset after editing a style.
wxRTC: can now edit line spacing in .1 increments from 1 to 2.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-27 16:09:22 +00:00
Julian Smart
7e7ced16e4 Font output fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-27 16:07:38 +00:00
Jaakko Salli
ee7bcb842c Safeguard against redundant registration of the same wxAnyValueType instance (by storing pointers in a set instead of a vector)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-27 13:26:45 +00:00
Václav Slavík
8c3017fe4f Use '+' in accelerators, not '-'.
This was always GTK+ standard and even Windows uses it now, see the
UX Guide.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-27 09:38:17 +00:00
Václav Slavík
bc71c3cdd5 Add support for storing translations in win32 resources.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-26 20:51:22 +00:00
Václav Slavík
076c0a8ee8 Shorten lang names in wxTranslations, not wxFileTranslationsLoader.
If a catalog with full language name ("fr_BE") doesn't exist,
wxFileTranslationsLoader tries to look for just the base language ("fr")
too. This isn't something specific to wxFileTranslationsLoader, it makes
sense to do it regardless of the loader.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-26 20:51:16 +00:00
Václav Slavík
8dffb6b1a7 Add wxMemoryBuffer::release().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64153 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-26 20:51:07 +00:00