Commit Graph

58711 Commits

Author SHA1 Message Date
Vadim Zeitlin
96430b3f3d Make Move{Before,After}InTabOrder() work at any time in wxGTK.
These functions only worked if called at the beginning, before showing the
parent window containing the children whose TAB order was being adjusted,
because it didn't refresh the GTK+ TAB order on the correct window: we need to
do it for the parent of the window being moved, not this window itself.

Closes #16032.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-09 14:03:33 +00:00
Vadim Zeitlin
f4bdf2b324 Fix handling of controls in vertical toolbars in wxMSW.
Not adding the controls to vertical toolbar is not enough, we also need to
hide them to prevent them from being shown as independent floating windows.
And we also need to add separators instead of the controls themselves to keep
the indices the same as in the horizontal case.

Closes #11821.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-08 14:33:29 +00:00
Vadim Zeitlin
4bddf85f6c Fix handling of Esc while an auto-complete drop down is open in wxMSW.
Just close the drop down instead of closing the dialog the text control using
this auto-complete drop down is in, as this was completely unexpected and
counter-intuitive.

Closes #13945.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-08 13:39:39 +00:00
Paul Cornett
9dcdf05c8d fix memory leak in SetFont with GTK3
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 18:43:56 +00:00
Vadim Zeitlin
cd004895c4 Skip mouse button release events in wxGenericTreeCtrl.
Not doing this prevented the default handling from taking place resulting in
internal confusion in GtkNotebook when wxTreeCtrl was placed inside it: the
code there set the button being held by user in its mouse press event handler
and reset it in its mouse release event handler which was never called because
we didn't skip the event, resulting in ignoring the next mouse press in the
notebook.

Closes #16055.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 13:16:15 +00:00
Vadim Zeitlin
bd2ae0a988 Document Insert() and Prepend() overloads taking wxMenu.
Document these methods in addition to AppendSubMenu().

Closes #16052.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-07 00:58:17 +00:00
Vadim Zeitlin
9286390af2 Update the URL of the web site images used in the test.
The old images don't exist any more after web site redesign.

Also, the new favicon can't be loaded from an unseekable stream because it
contains multiple icons, so point to the old favicon instead.

Closes #16049.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-06 13:49:47 +00:00
Vadim Zeitlin
751fccb4aa Fix initializing bitmaps from DIB in wxMSW code.
Don't call wxDIB::CreatePalette() on an invalid (because its handle had been
detached from it) DIB object.

Also add some comments to explain this code a bit better.

Closes #16045.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-04 23:57:41 +00:00
Vadim Zeitlin
2b6649ed3b Fix bug in vertical toolbar size calculation in wxMSW.
Correct the changes of the r76034 to avoid using separators when calculating
the fitting width of the vertical toolbars as this doesn't always work
correctly.

Closes #3788.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-04 14:17:22 +00:00
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