When reducing an RGB image to black and white any non-black pixel was treated as white resulting in mostly white images. Set the threshold to 127 instead to improve the looks of saved monochrome TIFF images.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Libtiff attempts to seek past the end of a stream and the behaviour for this can vary per stream implementation. Fixed failure to seek by filling the gap between the end of stream and new seek position with zeroes. Enabled a unit test which so far was disabled due to wxMemoryOutputStream failing to save a TIFF because of the seeking problem.
Also closes#4089.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The BMP decoder did not handle images that are not stored upside down but straight up (in which case the height is negative). Also with RLE4 or RLE8 compressed images the 'end of scanline' RLE marker was not handled correctly. Fixed the issues and added a unit test for them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Thread id is an (unsigned) long, not just unsigned, so use "%lx" to print it
instead of "%x" to avoid asserts in formatting code.
Closes#13404.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The patch adding separate string for the labels with mnemonics and the ones
without them has somehow managed to remove entries for 10 stock ids.
Restore them now.
Closes#13403.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMBConvUTF8::ToWChar() was off by 1 when the input length was explicitly
specified, the extra NUL should only be added in the implicit length case.
This bug didn't occur for the default wxMBConvUTF8 object as it simply
forwarded to the base class wxMBConvStrictUTF8 implementation but it happened
when MAP_INVALID_UTF8_TO_OCTAL or MAP_INVALID_UTF8_TO_PUA was used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Bitmap position attribute was called "bitmapposition" in the documentation and
in the code that generated an error message for a wrong value in it but was
inexplicably called "direction" in the code that really looked it up.
This seems to be just a straight typo from the original r61065. Surprising as
it is that it wasn't noticed before, do correct it now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't return wxDataViewMainWindow::m_selection array by value, returning a
const reference to it is enough and avoids completely unnecessary memory
allocations and copying of potentially large amounts of data.
Also make wxDataViewMainWindow::GetSelections() const.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wx sorted containers don't implement iterators so use indices to iterate over
wxDataViewMainWindow::m_selection, just as r68613 already did in another place.
Closes#13388.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Obtaining the string without mnemonics by simply removing "&" characters from
the string containing mnemonics doesn't work for some languages, notably
Chinese where the convention is to use "Chinese Text (&M)" for the labels with
"M" being the ASCII mnemonic and just "Chinese Text" and not "Chinese Text (M)"
should be used if wxSTOCK_WITH_MNEMONIC flag is not specified.
Fix the fundamental problem by using separate strings for the two cases.
Translations still need to be updated to really correct the labels appearance.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Since r68621 dataview.cpp didn't compile anymore (at least with wxOSX-Carbon). Fixed by explicitly using wxDataViewItem's void * constructor in a few cases.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code to update m_selection was too aggressive in the virtual list
case, when it simply cleared it, and broken for single-item selection in
the general case.
Fixed to recompute selection properly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Not having this as an implicit one made it possible to create
wxDataViewItem from any pointer without realizing it, leading to hard to
debug crashes later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
openFiles (available since OS X 10.3) replaces using the openFile method. It allows for more convenient handling of multiple drops and knowing in advance how much files/folders are dropped instead of openFile with which you only get to respond to a single file/folder drop at a time. By default openFiles calls the newly added MacOpenFiles which calls MacOpenFile multiple times, so ordinarily the behaviour is backwards compatible (both on wxOSX Cocoa and Carbon).
The openFile instance method has been removed because it doesn't seem to be called anymore: neither when dropping a single file on the application in the dock or Finder nor when passed as a command-line argument.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
They aren't implemented when using wx's homegrown sorted containers
and adding support is probably more trouble than it's worth.
Fixes#13388.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We always centered the dialogs on the main display which was wrong if the
parent window was on another one. Instead of fixing it, simply don't centre
them at all and let Windows position them, there is no reason to change the
default behaviour.
Closes#13387.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Current public API uses wxDataViewItem, this code dated back to 2.8.
They were now protected instead of public, the code wasn't used
anywhere and wasn't portable, it existed only in the generic version.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Also generate events corresponding to WM_SYSCOMMAND messages for the custom
items of the system menu.
Add a small snippet to test the new functionality to the dialogs sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a method allowing creation of a wxMenu object from a native menu handle.
This will be used to implement access to the system menu in an upcoming commit
but could also be useful for other purposes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The workaround for a bug in g++ 3.5 breaks compilation with 4.7 which
implements two-phase lookup correctly, so disable this workaround for 4.7 and
later. We could probably even only enable it for 3.x but this doesn't really
matter as previous 4.x releases don't have problems with this anyhow.
Closes#13385.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
g++ (usefully) warns when assigning NULL to a non-pointer in wxGDIPlusRenderer.
Just use 0 instead of NULL to avoid the warning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775