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.
Kevin Ollivier [Sat, 6 Feb 2010 18:19:43 +0000 (18:19 +0000)]
Fix handling of the *.* extension case, before this fix it was being passed as a "*" filter to the Cocoa dialog which, not being a valid extension, meant that no files were selectable.
Kevin Ollivier [Sat, 6 Feb 2010 01:45:58 +0000 (01:45 +0000)]
Add an accessor to get the current drop source from window.mm so that we can implement GiveFeedback support, and also move a couple functions that check the current drop source into common DND OS X code as a result.
Vadim Zeitlin [Thu, 4 Feb 2010 01:33:32 +0000 (01:33 +0000)]
Extract wxSTOCK_WITHOUT_ELLIPSIS from wxSTOCK_FOR_BUTTON.
Make it possible to use this flag on its own, without wxSTOCK_WITH_MNEMONIC
which is also part of wxSTOCK_FOR_BUTTON. This can be useful for e.g. toolbar
buttons.
Vadim Zeitlin [Thu, 4 Feb 2010 01:20:02 +0000 (01:20 +0000)]
Fix selection event sending for Ctrl-click in generic wxDataViewCtrl.
Ctrl-clicking on the only currently selected item in wxDataViewCtrl crashed
because we dereferenced first element of the empty m_selection array when
generating the selection change event.
Instead, send the event for the current item, this should be more consistent
with the native versions behaviour and at the very least doesn't crash.
Vadim Zeitlin [Wed, 3 Feb 2010 21:07:46 +0000 (21:07 +0000)]
Test wxTE_PROCESS_ENTER style in the widgets sample.
Add a checkbox for toggling wxTE_PROCESS_ENTER to the text page and use this
style by default. This makes it easier to check that this style works as
intended, including that it generates the correct events.
Julian Smart [Tue, 2 Feb 2010 22:19:33 +0000 (22:19 +0000)]
Fixes for incorrect selection, extra newline insertion when undoing deletion of selection,
incorrect SetScrollbar optimization, insufficient refresh for operations on last line,
HasCharacter/ParagraphAttributes bug.
Julian Smart [Mon, 1 Feb 2010 10:45:51 +0000 (10:45 +0000)]
Simplify SetSelectionRange and make consistent with SetSelection.
Fix a bug that returns true for character and paragraph style tests if no characters or paragraphs were found.
Fix SetSelection to position caret at end.
Vadim Zeitlin [Thu, 28 Jan 2010 12:07:16 +0000 (12:07 +0000)]
Disable wxUSE_OWNER_DRAWN for wxUniv to fix the build.
wxMenuItem in wxUniv doesn't even use wxOwnerDrawn but linking in
ownerdrwcmn.cpp is enough to break the DLL build of wxUniv at least under MSW
as it references symbols normally defined in msw/ownerdrw.cpp which is not
part of wxUniv.
Fix this by simply disabling wxUSE_OWNER_DRAWN under wxUniv for now as it's
unused anyhow.