Vadim Zeitlin [Wed, 3 Mar 2010 14:19:29 +0000 (14:19 +0000)]
Allow using version-specific vc prefix in msvc/wx/setup.h.
We still use just "vc" by default for compatibility but allow the user to
predefine either wxMSVC_VERSION or wxMSVC_VERSION_AUTO to use the specified or
version-dependent prefix instead. This is very convenient when using multiple
MSVC versions.
add 64bit support to those formats which I could test and which support 64bit build modes (msvc, msvs2005prj and msvs2008prj) by adding a TARGET_CPU option similar to what wxWidgets bakefiles do (note the absence of the WX_ prefix since it does not make sense to have a wx-specific architecture); this additional feature allows correct inclusion of the vc_[amd64|ia64]_[lib|dll] path when building a wx-based project on Windows.
Vadim Zeitlin [Tue, 2 Mar 2010 20:46:18 +0000 (20:46 +0000)]
Use user locale with Latin-1 as fallback for command line arguments.
Command line arguments can contain characters outside of 7 bit ASCII range.
Assume that they use the default user encoding but fall back to Latin-1 if
conversion failed.
Vadim Zeitlin [Mon, 1 Mar 2010 23:45:22 +0000 (23:45 +0000)]
Fix crash when accessing clipboard before entering the main loop.
Check that we have an event loop running before yielding to it.
Notice that we really do need an event loop in wxClipboardSync as events must
be dispatched for the clipboard code to work so while not using the event loop
if it doesn't exist would have fixed a crash as well, it wouldn't allow to use
the clipboard in e.g. wxApp-derived class OnInit().
Vadim Zeitlin [Sun, 28 Feb 2010 11:30:55 +0000 (11:30 +0000)]
Simplify and correct bugs in wxMSW wxScrollBar message handling.
For some reason we computed scroll increment from the native message and not
the new position directly which is actually simpler and probably would have
never resulted in a bug which exchanged the meanings of SB_TOP and SB_BOTTOM.
Get rid of nScrollInc and just update the position variable directly.
Vadim Zeitlin [Sun, 28 Feb 2010 11:09:26 +0000 (11:09 +0000)]
Make it possible to use wxCharBuffer during program initialization.
wxCharBuffer might be used during static initialization, even if only
implicitly. E.g. it is used by wxString::Format() which can be used to
initialize a global string. But it uses the global s_untypedNullData variable
might not be initialized yet resulting in mysterious failures.
Fix this in the usual way by wrapping access to the variable via a function.
Vadim Zeitlin [Sun, 28 Feb 2010 11:09:21 +0000 (11:09 +0000)]
Only add -woff 3970 to C[XX]FLAGS when using SGI mipsPro 7.4.4 or later.
Previous mipsPro versions don't give this warning but do warn about "unknown
warning number 3970" if we use this -woff which is even more annoying than
original warning we tried to suppress.
This is a forward port of r45896 which somehow was only applied to 2.8 branch.
Vadim Zeitlin [Sun, 28 Feb 2010 11:09:15 +0000 (11:09 +0000)]
Compilation fixes for wide char functions under IRIX with mipsPro.
Use correct (XPG5, not XPG4) version of wcsftime().
Bring the wide char functions only declared in std namespace into global one
under IRIX.
Declare vswscanf() ourselves as we just don't seem to get its declaration from
C++ code (only from C99).
Add a cast to fix incorrect putws() signature.
All these fixes apply to IRIX 6.5.18 with mipsPro 7.4.2. It doesn't seem to
add configure checks for most of the above fixes as previous versions of both
the OS and the compiler should be completely extinct by now but we may need to
do it if anybody is still found to use them.
Vadim Zeitlin [Sun, 28 Feb 2010 11:09:11 +0000 (11:09 +0000)]
Fix for wxStringCheck compilation under IRIX using mipsPro.
IRIX mipsPro 7.4 refuses to instantiate a template with an inline function as
parameter. Work around this by using a function taking a function pointer
instead of using template wxStringCheck with inline wxIs{alpha,alnum,digit}.
Vadim Zeitlin [Sun, 28 Feb 2010 11:08:54 +0000 (11:08 +0000)]
Support IRIX version of OpenGL multi sampling constants.
Although OpenGL multi sampling extensions originated under IRIX, it doesn't
seem to use the standard names for the constants used and uses "SGI" suffix
for them instead of "ARB".
Add support for IRIX versions of GLX_SAMPLE_BUFFERS_ARB and GLX_SAMPLES_ARB
and also check if these constants are defined at all to avoid compilation
errors if they are not.
Vadim Zeitlin [Sun, 28 Feb 2010 11:08:50 +0000 (11:08 +0000)]
Fix the STC sources generation script to work with ancient Python.
Don't use True, set and join method of string objects which didn't exist in
prehistoric Python versions (such as 1.5 bundled with IRIX) as we can easily
work around their lack by using 1, list and string module join method instead.
Vadim Zeitlin [Sun, 28 Feb 2010 11:08:34 +0000 (11:08 +0000)]
Remove unnecessary comparison of unsigned variable with 0.
m_httpsize is of type size_t and so is always >= 0, no need to check for it.
And removing the check avoids a warning from at least IRIX mipsPro (and
probably others).
Vadim Zeitlin [Sun, 28 Feb 2010 11:08:30 +0000 (11:08 +0000)]
Remove unused static constant.
HOURS_PER_DAY was used only in the part of the code which was moved to
src/common/datetimefmt.cpp and some compilers (e.g. IRIX mipsPro) now warn
about an unused static constant in datetime.cpp, so just remove it from there.
Vadim Zeitlin [Sun, 28 Feb 2010 11:08:26 +0000 (11:08 +0000)]
Include the real iostream header and not just iosfwd from wx/stdstream.h.
We need to include full [io]stream declaration and not just forward declare
them to be able to define classes deriving from them. Surprisingly, including
just <iosfwd> seems to work under most systems but it does not under IRIX.
So include the full <iostream> (or <iostream.h>) to be sure to get what we
need.
Jaakko Salli [Sun, 28 Feb 2010 10:16:49 +0000 (10:16 +0000)]
Sometimes change in varscrollable window's size can result in unused empty space after the last item. Fix it by decrementing first visible item position as long there is available space (fixes #11758).
Kevin Ollivier [Sat, 27 Feb 2010 02:51:45 +0000 (02:51 +0000)]
Override CanFocus because the wxWindow level test will check if the NSTextView's parent scrollview can get keyboard focus, and will return no, meaning that wx won't set the focus to the text ctrl.
Vadim Zeitlin [Fri, 26 Feb 2010 14:10:02 +0000 (14:10 +0000)]
Fix assert when using year or decade view in Windows 7 calendar control.
Windows 7 native calendar control is capable of showing more than 3 months
simultaneously in its year or decade view which is shown when the user zooms
out of the month view by double clicking the control header. This resulted in
an assert failure in the code, update it to simply not do anything in this
view.
Vadim Zeitlin [Fri, 26 Feb 2010 14:09:58 +0000 (14:09 +0000)]
Fix assert on wxCalendarCtrl creation under Windows 7.
Unlike previous versions of Windows, 7 includes the time component in the
return value of MonthCal_GetCurSel() and because of it the comparison with
m_date (which doesn't have any time part) fails.
Fix this by comparing just the date parts of the two wxDateTime objects.
Vadim Zeitlin [Fri, 26 Feb 2010 14:09:43 +0000 (14:09 +0000)]
Add pretty-printers for wxPoint, wxSize and wxRect.
Also replace an if checking for the supported types with an array-based
approach to make it easier to add pretty printers for more types in the
future.
Vadim Zeitlin [Thu, 25 Feb 2010 00:03:44 +0000 (00:03 +0000)]
Fix multiple bugs in non-ownerdrawn wxListBox after recent merge.
Changes done in ownerdraw-refactor branch have broken non-ownerdrawn list
boxes as the code was now using m_aItems array even for them but it's not used
in this case.
Also remove unnecessarily overridden Delete() method which didn't add anything
to the base class implementation but just deleted the same m_aItems pointer
twice.
Also use HasFlag(wxLB_OWNERDRAW) everywhere consistently instead of testing
for it manually.
Vadim Zeitlin [Thu, 25 Feb 2010 00:03:39 +0000 (00:03 +0000)]
Document the use of --disable-gui for building wxBase.
We don't have a special configure version for wxBase where GUI is off by
default and it doesn't seem to be worth the trouble to create one. Instead
just tell people to use --disable-gui themselves.
Vadim Zeitlin [Thu, 25 Feb 2010 00:03:35 +0000 (00:03 +0000)]
Always use UTF-8 for GTK+ strings.
Strings returned and accepted by GTK+ functions always use UTF-8 independently
of the current locale and of the file name encoding we use. So use UTF-8
instead of wxConvFileName everywhere where we deal with GTK+ directly.
Václav Slavík [Sun, 14 Feb 2010 15:27:42 +0000 (15:27 +0000)]
Fix wxHtmlWindow to correctly decide whether to show scrollbars.
wxHtmlWindow::CreateLayout()'s algorithm was both naive (not properly
accounting for scrollbar visibility changes during layout) and broken
(incorrectly rounding when computing scroll steps and adding
GetCharHeight() value to the height in an attempt to mitigate the
harm).
This algorithm should properly for scrollbars in all situations.
Rounding is done in such way that the content is fully viewable, while
at the same time not showing scrollbars needlessly.