Commit Graph

58052 Commits

Author SHA1 Message Date
Vadim Zeitlin
3048caa25d Don't accept data in unsupported format in wxMSW dnd code.
We wrongly pretended to accept the data in formats which we didn't actually
accept and showed misleading cursors to the user.

Fix this by partially reverting some of the changes of r72668 (see #14697).

Closes #16042.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-04 14:07:16 +00:00
Vadim Zeitlin
f388eb6157 Romanian translations update from Catalin for 3.0.1.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-03 15:27:05 +00:00
Vadim Zeitlin
1770c2088d Remove non-existent wx/cairo.h from MSVC{11,12} projects.
This file resulted in never ending rebuilds of the core project as MSVS tried
to recreate the missing dependency (and failed).

See http://blogs.msdn.com/b/andrewarnottms/archive/2012/06/07/enable-c-and-javascript-project-system-tracing.aspx
for help with debugging such problems in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 23:37:41 +00:00
Vadim Zeitlin
1f18e60647 Enable debug information in release configuration of MSVC{11,12} projects.
We want to generate debug information even in the release builds of the
libraries in order to allow debugging of the programs using them. This is
especially important for the DLLs but do it for the static release build too
for consistency.

This also almost fixes the constant rebuilding of the entire solution which
happened because the PDBs, supposed to be generated by linker, were not found
because they were not actually created as the debug information wasn't there.

See #15780.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 23:37:36 +00:00
Vadim Zeitlin
52254bd97e Add missing XRC handlers to the manual VC{11,12} projects.
XRC handler in aui, ribbon and richtext libraries were omitted in the initial
versions of the projects for some reason.

See #15780.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 23:37:26 +00:00
Paul Cornett
2f83cddcc9 fix for wxMiniFrame titlebar appearing blank
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 21:55:26 +00:00
Paul Cornett
fe22821a24 for GTK3, draw odd-width lines as a sharp, n-pixel wide line, rather than a fuzzy n+1-pixel wide line
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:58:16 +00:00
Vadim Zeitlin
1e1a0b9d75 Fix harmless signed/unsigned comparison warning in a test.
Don't compare int with unsigned to avoid warnings that were introduced by the
changes of r75936.

See #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:07:46 +00:00
Vadim Zeitlin
b5b037687e Correct wrong version number in MSVC12 properties file.
Use "30" in 3.0 branch.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 16:07:29 +00:00
Vadim Zeitlin
c61ae4d190 Fix off by 1 error in buffer size in wxOSX wxDropTarget code.
The size of the buffer used for the data currently needs to include an extra
byte for the trailing NUL. This is wrong, as it means that GetDataSize() and
GetDataHere() behaviour is not consistent, but at least avoid overrunning the
buffer for now.

Also use wxCharBuffer instead of raw char array to make the code safer (both
because it releases the memory automatically and because it also adds an extra
byte for the trailing NUL automatically as well, making such bugs impossible).

See #15914.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:50:17 +00:00
Vadim Zeitlin
d30a02642d Implement support for wxGA_VERTICAL style in wxOSX.
Rotate the native control to make it look correct in vertical orientation.

Closes #15682.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:50:11 +00:00
Vadim Zeitlin
a2d7c6a98f Fix harmless signed/unsigned comparison warning in wxOSX wxJoystick.
A better fix would probably be to make wxJoystick::GetNumberAxes() return an
unsigned value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:50:07 +00:00
Vadim Zeitlin
8dbcf0817a Remove redundant comparison of unsigned value with 0.
This is always true and so is unnecessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:50:03 +00:00
Vadim Zeitlin
a73ce1c90e Really fix using install_name_tool with wxrc under OS X.
Don't test for USE_XRC before it is set, correcting the wrong change of
r75845.

See #15946.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:49:58 +00:00
Vadim Zeitlin
1e879aa8b6 Don't crash in wxOSX wxDataViewChoiceRenderer if selection was cancelled.
Check for the index validity and ignore the value of -1 as it is passed if the
selection in the popup was cancelled.

Closes #16017.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:49:52 +00:00
Vadim Zeitlin
aa6e3dc67f Fix setting the label for already existing menu items with bitmaps in wxMSW.
Do update the label at Windows level if we don't use MF_OWNERDRAW style,
checking for IsOwnerDrawn() is wrong because the flag it tests may be set even
if the item is not really owner drawn from Windows point of view.

This is a mess and setting the bitmap for the existing items is still broken,
but at least setting the label works now.

See #9388.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 13:22:39 +00:00
Vadim Zeitlin
49761cd251 Fix loading of top to bottom BMP files in wxMSW wxBitmap.
The native LoadImage() function used by wxBMPFileHandler only supports the
standard bottom to top BMPs, fall back to our own implementation in wxImage
wxBMPHandler if it fails to also support the top to bottom ones.

Closes #13650.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 13:06:08 +00:00
Vadim Zeitlin
aa8b1fe82f Fix calculating the size of vertical toolbar in wxMSW.
Use the width of the largest toolbar item as the toolbar width, not the width
of the first one. The implicit assumption that all items had the same width
was wrong and resulted in items wider than the first one being truncated.

Closes #3788.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-28 23:39:54 +00:00
Václav Slavík
4ffdda9961 Fix VarArgTestCase::ArgsValidation() after r76026.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-28 16:16:13 +00:00
Václav Slavík
9f430ab6a6 Be more permissive when validating format string arguments.
Previously, the code would assert if the caller passed too many
arguments to wxPrintf() or other printf-like functions. But that can
happen legitimately in translations: in some languages such as Hebrew,
using "1" (i.e. "%d") in the singular feels unnatural and it's better to
use the word "one" and left the variadic argument unused.

Relax the check not to assert in this case. This is consistent with the
standard library and other implementations. Notice that gettext's msgfmt
doesn't complain about this case either in the specific case of singular
forms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:23:43 +00:00
Julian Smart
194e8b5011 Paragraph layout fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:14:44 +00:00
Julian Smart
ee6b548043 Correction for wxTextAttrCollectCommonAttributes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 10:07:16 +00:00
Václav Slavík
69a029635d Fix compilation with Xcode projects (type_traits).
The changes to type_traits headers detection with Clang broke Clang use
with the Xcode projects. Fix this by not setting HAVE_* macros in
config_xcode.h for Clang and letting defs.h detect the features.

See #15915.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:55:05 +00:00
Paul Cornett
07aa605bb5 Index: src/generic/graphicc.cpp
===================================================================
--- src/generic/graphicc.cpp	(revision 76007)
+++ src/generic/graphicc.cpp	(working copy)
@@ -1569,12 +1569,13 @@
             {
                 const wxUint32 argb = *src++;
 
-                *alpha++ = (argb & 0xff000000) >> 24;
+                const unsigned char a = argb >> 24;
+                *alpha++ = a;
 
                 // Copy the RGB data undoing the pre-multiplication.
-                *dst++ = Unpremultiply(*alpha, (argb & 0x00ff0000) >> 16);
-                *dst++ = Unpremultiply(*alpha, (argb & 0x0000ff00) >>  8);
-                *dst++ = Unpremultiply(*alpha, (argb & 0x000000ff));
+                *dst++ = Unpremultiply(a, argb >> 16);
+                *dst++ = Unpremultiply(a, argb >>  8);
+                *dst++ = Unpremultiply(a, argb);
             }
 
             src = rowStart + stride;


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:38:34 +00:00
Vadim Zeitlin
ab25cfbdfc Fix wxGenericTreeCtrl::ScrollTo() for all ports, not just wxOSX.
When scrolling down, make the item being scrolled into view completely visible
instead of just showing its top part.

The fix was already used for wxOSX but not for the other ports for some
reason, do use it everywhere as this code is generic and behaves in the same
way in all ports.

Also fix the wrong comments about scrolling direction.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:26:03 +00:00
Vadim Zeitlin
bc2952dfa5 Fix font size when using wxGraphicsContext with wxPrinterDC in wxMSW.
Use pixel size which is scaled correctly by GDI+ itself instead of the size in
points which is currently not scaled correctly by wx.

Closes #3566.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:12:54 +00:00
Vadim Zeitlin
9a8d174976 Tamil translations update for 3.0.1 from DINAKAR T.D.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 19:31:08 +00:00
Vadim Zeitlin
f438cc41b0 Mention wxDD_DIR_MUST_EXIST support in wxGTK in the change log.
Document the change of r75997, see #16002.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 14:47:07 +00:00
Paul Cornett
1484874604 add support for wxDD_DIR_MUST_EXIST, closes #16002
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 06:44:49 +00:00
Paul Cornett
f617cc760f native GTK3 implementation for DrawSash()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 01:00:24 +00:00
Vadim Zeitlin
9356bec4c4 Swedish translations update for 3.0.1 from Jonas Rydberg.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-23 15:08:53 +00:00
Vadim Zeitlin
82bc9e93c3 Fix harmless warnings about unused global variables.
Don't define variables that we never use to fix clang warnings about them.

See #15915.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:00 +00:00
Vadim Zeitlin
6a49c69452 Fix Unix build using clang with g++ 4.8 headers.
Don't override HAVE_TR1_TYPE_TRAITS detected by configure with
HAVE_TYPE_TRAITS detected by clang __has_include() as the latter is less
reliable and can return true even when the header is not actually usable, as
it happens with g++ 4.8 <type_traits> in non C++11 mode.

Closes #15915.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:38:24 +00:00
Vadim Zeitlin
b480e7055f Chinese translations update for 3.0.1 from Jiawei Huang.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:09:28 +00:00
Vadim Zeitlin
e84f927c78 German translations update for 3.0.1 from Sebastian Walderich.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:06:29 +00:00
Stefan Csomor
7bc5e15b95 backport of r75966, make sure a frozen control calls a native 'thaw' on the tlw
during destruction, otherwise tlws might end up unresponsive, see #16011

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 09:08:19 +00:00
Vadim Zeitlin
0685209dc3 Basque translations update for 3.0.1 from Xabier Aramendi.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 21:47:14 +00:00
Vadim Zeitlin
8a636fcc4f Ukrainian translations update for 3.0.1 from Yuri Chornoivan.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 17:15:13 +00:00
Vadim Zeitlin
981a6e4c94 French translations update for 3.0.1 from Xavier Perrissoud.
Closes #16013.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 16:22:30 +00:00
Vadim Zeitlin
867c3d7343 Regenerate message catalogs for 3.0.1 release.
Add a couple of new strings which have been added since 3.0.0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 13:55:32 +00:00
Vadim Zeitlin
cdd8fa44b5 Fix crash when using wxThreadSpecificInfo from global object ctor.
When not using compiler TLS support (which is the default now), TLS variable
itself needs to be initialized and user-defined code in the global objects
ctor could be called before this happened, resulting in using uninitialized
CRITICAL_SECTION under Windows and a crash.

Fix this by wrapping global wxThreadSpecificInfo itself in an accessor
function ensuring that it is always initialized before use.

Notice that this required adding wxTLS_TYPE_REF() as wxTLS_TYPE() itself can't
be used for the function return value (__thread or similar can only be used on
the variables).

Closes #16009.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 15:12:25 +00:00
Vadim Zeitlin
ab4699b3f4 Use correct column type when adding columns to wxDataViewListCtrl.
Using base class methods such as AppendBitmapColumn() resulted in
wxDataViewListCtrl::AppendColumn() being called but this function always
assumed the column was of "string" variant type -- which was, of course, false
for bitmap columns and so resulted in heap corruption (thanks to the
wonderfully type unsafe code using wxVariant) and a crash.

Get the correct type to use from the column itself now to fix this.

Closes #16008.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 13:05:21 +00:00
Vadim Zeitlin
12231256e4 Fix wxCmdLineParser::Found(name) for options with values.
Calling Found() without providing the second "value" argument started
generating an assert since introduction of the negated options as it reused
FoundSwitch() which can only be used for switches, i.e. options without
values.

Fix this to revert a regression since 2.8 and also add unit tests for the
different Found() overloads.

Closes #15986, #16001.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:31:49 +00:00
Vadim Zeitlin
b01c48a842 Reduce code duplication in wxCmdLineParser implementation.
No real changes, just extract the code for finding options from their names
into a separate function instead of repeating it 4 (and 5, after the next
commit changes) times.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:31:46 +00:00
Vadim Zeitlin
aaa52a40ee Don't use invalid pointer in file dialog hook procedure in wxMSW.
We can receive WM_NOTIFY for other than CDN_XXX messages if we have a native
control as our immediate child (which can happen with "extra" controls) and
the LPARAM is not a pointer to OFNOTIFY at all in this case, so don't try to
use it as such.

This fixes a crash when adding a "bare" extra control, see #16003.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:31:42 +00:00
Vadim Zeitlin
4c711c8002 Fix wxTextCtrl contents corruption with long strings in wxMSW.
wxMSW automatically extended wxTextCtrl length limit beyond the tiny standard
32KB when it was exceeded, but part of the text being appended into the
control was lost when doing it.

Fix this by retrying insertion after extending the limit.

Closes #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75936 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:31:35 +00:00
Stefan Csomor
ed55d49aa2 backport of r75934, misplaced the orderOut: , see #15998, #15902
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-19 20:38:51 +00:00
Vadim Zeitlin
afdec07df2 Set model pointer in wxDataViewEvents generated under wxOSX.
Add missing SetModel() calls.

Closes #16004.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-19 14:51:58 +00:00
Vadim Zeitlin
3965bf4fd6 Move DSS_HIDEPREFIX fallback definition to the central header.
Do it only once now that it's used in 3 different places (it recently started
to be used in src/msw/anybutton.cpp as well) instead of defining it thrice.

This also fixes MinGW build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 23:36:00 +00:00
Stefan Csomor
98dc6aa95c backport of r15902
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-18 17:47:59 +00:00