Commit Graph

58190 Commits

Author SHA1 Message Date
Vadim Zeitlin
e2fe8927cc 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/trunk@76078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-04 14:07:48 +00:00
Vadim Zeitlin
a46fbf1bcd Compilation fix for wxUniv/MSW in wxTLW code dealing with menus.
The code used by WM_INITMENUPOPUP and WM_EXITMENULOOP handlers shouldn't be
used in wxUniv build as it's not used there anyhow and doesn't even compile.

Closes #16039.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-04 14:07:43 +00:00
Vadim Zeitlin
356f8409bf Romanian translations update from Catalin.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-03 14:21:17 +00:00
Stefan Csomor
7dc4a53a02 cleanup, see #15600
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-03 07:04:37 +00:00
Vadim Zeitlin
05d634e4ed Update wxForum URL in documentation overview.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 23:46:03 +00:00
Vadim Zeitlin
8ef0ed2198 Add a one liner script to show symbols exported from a DLL.
This is useful to check if ABI wasn't accidentally broken between two micro
wxMSW releases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 23:40:50 +00:00
Vadim Zeitlin
13e571eb98 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/trunk@76069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 23:40:47 +00:00
Vadim Zeitlin
f4e2cffdce 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/trunk@76068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 23:40:41 +00:00
Vadim Zeitlin
dcdbd3c01c 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/trunk@76067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 23:40:32 +00:00
Paul Cornett
e702fd5043 fix for wxMiniFrame titlebar appearing blank
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 21:55:26 +00:00
Paul Cornett
9ba16f907a 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/trunk@76062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:58:16 +00:00
Vadim Zeitlin
f740cc3881 Refactor YieldFor() to avoid code duplication among the ports.
Don't repeat the same code in all the ports, move it to the common base class
and add a new virtual DoYieldFor() for the really port-specific code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:58:00 +00:00
Vadim Zeitlin
632c106cd5 Don't dispatch pending events from selective YieldFor().
Pending events list can contain events from all kinds and dispatching them
from YieldFor() called to dispatch the events of some particular kind only
(e.g. to redraw the window) is unexpected and wrong, e.g. it breaks some uses
of wxProgressDialog, see #15799.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:27:51 +00:00
Vadim Zeitlin
e7f2eb8f83 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 r75940.

See #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:06:47 +00:00
Vadim Zeitlin
2eb5e8189e 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/trunk@76056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:53 +00:00
Vadim Zeitlin
1d1ccf9e99 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/trunk@76055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:48 +00:00
Vadim Zeitlin
6c336e4d9f 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/trunk@76054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:42 +00:00
Vadim Zeitlin
4e89786483 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/trunk@76053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:38 +00:00
Vadim Zeitlin
6cf1fc7610 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/trunk@76052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:33 +00:00
Vadim Zeitlin
b520eeab16 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/trunk@76051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 15:51:28 +00:00
Vadim Zeitlin
4c152f466f 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/trunk@76044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 13:34:14 +00:00
Vadim Zeitlin
279bf9e545 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/trunk@76043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 13:34:09 +00:00
Stefan Csomor
a0e915acb1 using a lazy translation hash map for conversion between user friendly names and postscript names, so that we get only one warning per font family. The only way to completely get rid of this would be to pre-populate the map during startup which would mean to completely iterate through all installed fonts, so it's a compromise. see #15999
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-01 16:48:58 +00:00
Vadim Zeitlin
b2b49c32ec 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/trunk@76035 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-28 23:40:22 +00:00
Vadim Zeitlin
18cd6f624f Document possible problem with unbinding functors.
Unbind() may currently disconnect the wrong functor as it compares them by
address.

See http://thread.gmane.org/gmane.comp.lib.wxwidgets.general/81445

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-28 22:35:07 +00:00
Václav Slavík
316fdcbd6d Fix VarArgTestCase::ArgsValidation() after r76027.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-28 16:15:39 +00:00
Vadim Zeitlin
ae4b084e77 Allow passing NULL buffer to wx{,F}File::{Read,Write} when count==0.
If the count of bytes to read or write is 0, the buffer pointer value
shouldn't matter as it's not used at all anyhow, so relax the assert and allow
it to be NULL in this case.

Closes #16018.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:46:36 +00:00
Vadim Zeitlin
d5216a4afc Fix Intel compiler warnings about hiding member variables.
Rename method parameters to avoid conflicts with member variables names.

Closes #15971.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:46:32 +00:00
Vadim Zeitlin
e15d5575a7 Don't build wxFileSystemWatcher test if wxUSE_FSWATCHER==0.
Closes #16031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:46:25 +00:00
Václav Slavík
c7972da951 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/trunk@76027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:24:21 +00:00
Julian Smart
9adba53251 Paragraph and image layout fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:15:18 +00:00
Julian Smart
f631f732af Corrections to attribute manipulation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 10:03:53 +00:00
Václav Slavík
bc5b91cb7c 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/trunk@76016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:54:32 +00:00
Paul Cornett
70ef1e192d 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/trunk@76015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:38:34 +00:00
Vadim Zeitlin
b1273c0d8a 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/trunk@76014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:26:57 +00:00
Vadim Zeitlin
b01d1a5e97 Add a helper function to get the last tree item to the sample.
This makes the behaviour of different menu commands working with the "last
item" consistent as some of them used the last root child while others used
the really last item (i.e. the last child of the last child).

This should have been part of r75987.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:26:54 +00:00
Vadim Zeitlin
a2d22f8b93 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/trunk@76012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:26:48 +00:00
Vadim Zeitlin
e9ccd6d5b1 Define wxUSE_BOOKCTRL as 1 if wxUSE_AUI==1.
wxAuiNotebook needs wxBookCtrlBase.

Closes #16025.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:26:44 +00:00
Vadim Zeitlin
37c6e7834c Add missing semicolons to the example in wxThread documentation.
wxDEFINE_EVENT() needs a semicolon after it.

Closes #16026.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-25 17:26:39 +00:00
Vadim Zeitlin
779af88f43 Fix loading of bitmap with non-pre-multiplied alpha in wxMSW.
Detect when the bitmap file doesn't have pre-multiplied alpha and pre-multiply
it ourselves when loading it in this case.

Closes #12762.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 20:55:00 +00:00
Vadim Zeitlin
f88fbcc2b3 Add helper Set32bppHDIB() method to wxMSW wxBitmapRefData.
No real changes, just add a helper to allow replacing the HBITMAP stored in
wxBitmapRefData without changing anything else, this is going to be used in
another place soon.

See #12762.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 20:54:54 +00:00
Vadim Zeitlin
1eb46d68b8 Mention that wxAuiNotebook uses native theme under wxGTK.
Closes #16021.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 20:54:49 +00:00
Vadim Zeitlin
b8c3d094aa Clarify that there is only a single TAB traversal implementation.
Don't imply that wxPanel can use either native or generic TAB traversal
implementation because this is not true.

Closes #16020.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 20:54:44 +00:00
Vadim Zeitlin
0996e5474d Include wxEVT_AUINOTEBOOK_PAGE_XXX in the documented interface.
This facilitates automatic language bindings generation.

Closes #16019.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 20:54:39 +00:00
Vadim Zeitlin
b1167c0841 Tamil translations update for 3.0.1 from DINAKAR T.D.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 19:31:34 +00:00
Stefan Csomor
bd45a79a99 using old code for carbon only, new code for cocoa, fixing doubly apply flip of y axis
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 08:17:15 +00:00
Stefan Csomor
c8b105a5f5 add fix for 32 bit builds, also when wx is drawing CGContextRef is always flipped
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 08:10:26 +00:00
Paul Cornett
5c32565ef1 add support for wxDD_DIR_MUST_EXIST, closes #16002
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 06:44:49 +00:00
Paul Cornett
42f0d1c020 native GTK3 implementation for DrawSash()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-24 01:00:24 +00:00
Stefan Csomor
64503e36f9 new DrawIcon implementation, turned off by default
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-23 19:14:49 +00:00