Commit Graph

53382 Commits

Author SHA1 Message Date
Dimitri Schoolwerth
7a10e465ca Improved saving of TIFF monochrome images.
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
2011-08-19 01:08:36 +00:00
Dimitri Schoolwerth
7ffc9affb4 Fixed saving TIFF images to wxMemoryOutputStream.
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
2011-08-18 13:15:43 +00:00
Dimitri Schoolwerth
d06c3098ab Improved BMP decoding.
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
2011-08-17 21:01:09 +00:00
Vadim Zeitlin
ee19ab6d80 Use correct format specifier for thread id in the sample.
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
2011-08-17 10:35:29 +00:00
Vadim Zeitlin
2032371b3b Restore stock item labels mistakenly removed by r68641.
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
2011-08-17 10:35:25 +00:00
Julian Smart
827fb0e455 Better text control non-selection solution
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-17 08:38:00 +00:00
Julian Smart
63509fb3c4 Implemented non-selection of content when setting focus via the keyboard.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 20:52:15 +00:00
Stefan Csomor
675ec6655e adapting to new ctrl constant handling on OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 13:46:56 +00:00
Stefan Csomor
3bc6d53403 adapting to new ctrl constant handling on OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 13:45:05 +00:00
Stefan Csomor
cfc77ac09a adapting to new ctrl constant handling on OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 13:36:24 +00:00
Stefan Csomor
773db5dfb3 supporting full style mask
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 12:42:56 +00:00
Vadim Zeitlin
04f1f9b773 wxMSW compilation fix when not using PCH.
Add missing "wx/menu.h" include.

Coses #13399.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 12:24:28 +00:00
Stefan Csomor
ee44283198 adjust init to standard
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 12:17:59 +00:00
Stefan Csomor
3e7c34b5a1 support for raw ctrl shortcut
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 12:17:13 +00:00
Stefan Csomor
8680646d5c emulate more arrow keys on non msw platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 12:01:27 +00:00
Stefan Csomor
3c5f62640d adapt defines for ctrl/command key
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 12:00:52 +00:00
Stefan Csomor
5266f34590 adapt defines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 11:55:39 +00:00
Paul Cornett
d0f93bc7dc Avoid creating rect with negative size while clipping to DC size.
Also, don't convert result of wxDC::GetSize() to device coords, it's already device coords.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-16 07:02:37 +00:00
Vadim Zeitlin
f4cb7c58da Fix return value of wxMBConvUTF8::ToWChar() when not using MAP_INVALID_UTF8_NOT.
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
2011-08-14 19:39:31 +00:00
Stefan Csomor
6a0d7a989c fixing comment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-14 15:43:30 +00:00
Stefan Csomor
77aa5fa027 fixing open application event handling, fixes #13397
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-14 15:42:35 +00:00
Stefan Csomor
73d1308b85 adding two missing strings (used in docview)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-14 15:41:10 +00:00
Stefan Csomor
35f5a520e2 using proper cmd constant
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-14 11:55:36 +00:00
Paul Cornett
2e952cd113 simplify global cursor setting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-13 16:17:59 +00:00
Vadim Zeitlin
9f4e2e269c Fix bitmap position attribute name in XRC handler.
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
2011-08-13 13:54:26 +00:00
Vadim Zeitlin
f23b8c0d85 No changes, just remove gratuitous inefficiency from generic wxDVC.
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
2011-08-12 14:09:41 +00:00
Vadim Zeitlin
3823a15e2c Fix compilation of generic wxDVC code when not using STL containers.
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
2011-08-12 14:09:37 +00:00
Paul Cornett
f795e58659 remove unneeded gdk_window_get_pointer() call
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-12 05:45:59 +00:00
Paul Cornett
803a1b9454 pass proper window to gdk_window_get_pointer(), NULL does not work with GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68646 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-12 05:33:59 +00:00
Vadim Zeitlin
f8a1c5715f Use separate strings for stock labels with and without mnemonics.
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
2011-08-11 10:56:05 +00:00
Dimitri Schoolwerth
f5f302d721 Fixed wxOSX build.
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
2011-08-11 00:39:18 +00:00
Vadim Zeitlin
3059334387 Basque translations update from Xabier Aramendi.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-10 21:57:05 +00:00
Václav Slavík
cbef7338c1 Add some basic tests for wxDataViewCtrl selection handling.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-10 15:24:25 +00:00
Václav Slavík
57ab45460d Fix selection handling wxDataViewMainWindow::ItemDeleted().
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
2011-08-10 15:24:19 +00:00
Václav Slavík
d5c4a81f2e Make the wxDataViewItem(void*) constructor explicit.
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
2011-08-10 15:21:22 +00:00
Julian Smart
3c6cc33082 Added the ability to deselect attributes in the font dialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-10 14:06:28 +00:00
Dimitri Schoolwerth
ee7553e935 Added NSApplicationDelegate's openFiles for wxOSX-Cocoa.
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
2011-08-09 22:17:12 +00:00
Vadim Zeitlin
af9c02ce20 Don't reset wxTLW::m_iconized when hiding the window in wxMSW.
Calling Hide() on an iconized window wrongly reset its m_iconized flag but
hiding the window shouldn't affect it.

Closes #13373.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-09 15:46:28 +00:00
Václav Slavík
eceb6af158 Don't use iterators with wxDataViewSelection.
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
2011-08-09 11:35:32 +00:00
Vadim Zeitlin
b86ac1efaa No changes, just correct the helpview sample name in comment.
"printing.cpp" was used for whatever reason.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-09 11:25:09 +00:00
Vadim Zeitlin
5d8d4b669a Don't manually centre dialogs created with default position in wxMSW.
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
2011-08-08 15:15:50 +00:00
Václav Slavík
373a4816d4 Check for invalid items in generic wxDataViewCtrl::GetSelections().
This shouldn't normally happen, but if some bug causes it, detect it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-08 10:23:19 +00:00
Václav Slavík
04675edfb1 Remove selection methods taking int from generic wxDataViewCtrl.
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
2011-08-08 10:11:04 +00:00
Vadim Zeitlin
ddae52629c Added wxTopLevelWindow::MSWGetSystemMenu() method.
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
2011-08-08 09:32:42 +00:00
Vadim Zeitlin
960493053b Added private wxMenu::MSWNewFromHMENU() method.
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
2011-08-08 09:32:39 +00:00
Vadim Zeitlin
8a625e0bb9 Fix compilation with g++ 4.7 (prerelease).
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
2011-08-08 08:33:19 +00:00
Vadim Zeitlin
5d0152c2b9 Use 0 instead of NULL to avoid g++ warning.
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
2011-08-07 19:31:52 +00:00
Václav Slavík
8c7b871156 Use ChangeCurrentRow() in wxDataViewMainWindow::ItemDeleted().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-07 17:29:50 +00:00
Václav Slavík
b625294905 Clean up wxDataViewMainWindow::ItemDeleted() a bit.
Reuse shared code instead of duplicating it. No real changes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-07 17:29:47 +00:00
Václav Slavík
c3b0247de1 wxDataViewSelection private type doesn't need to be exported.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-08-07 17:29:44 +00:00