Commit Graph

58168 Commits

Author SHA1 Message Date
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
Stefan Csomor
d692ea1c0e adding NSImage support to wxIcon on OSX, as IconRefs are on their way out, and performance under 10.9 is suffering
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-23 19:11:31 +00:00
Stefan Csomor
21aa2122f4 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/trunk@75993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-23 19:02:58 +00:00
Vadim Zeitlin
5dc209b6eb Swedish translations update for 3.0.1 from Jonas Rydberg.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-23 15:09:38 +00:00
Vadim Zeitlin
332952a18c Always initialize values returned from wxGDDC::GetChar{Width,Height}().
Don't return garbage in case of error.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:40:03 +00:00
Vadim Zeitlin
25a03f93a5 Improve parameter validation in wxStream code.
Replace wxASSERT_MSG()s with wxCHECK_MSG()s to ensure that we don't crash even
if we are passed a NULL pointer, saying "Warning: Null pointer is about to be
used" and crashing just isn't very useful in the grand scheme of things.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:40:00 +00:00
Vadim Zeitlin
663bbf892b Remove confusing delete from wxIdRangeManager dtor.
The singleton dtor shouldn't delete the global singleton object, if this were
ever really possible, it would result in an infinite recursion. And even
though it was not (because ms_instance was reset to NULL before destroying the
object pointed by it), this delete was still confusing and unnecessary, so
remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:56 +00:00
Vadim Zeitlin
90860e9444 Remove code maintaining last item from the treectrl sample.
The code was buggy (e.g. it didn't update the last item correctly after
executing "Append many items" menu command) and seems to be unnecessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:53 +00:00
Vadim Zeitlin
b905bae91c 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/trunk@75986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:48 +00:00
Vadim Zeitlin
e0a255785f 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/trunk@75985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 22:39:43 +00:00
Vadim Zeitlin
fe93941fb2 Use settings in wx_vcN_local.props files if they exist.
Allow overriding the default build settings in local properties files for VC11
and VC12 builds.

See #15780.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 19:45:49 +00:00
Vadim Zeitlin
a2a846e473 Allow customizing bitmap handling in wxSVGFileDC.
Provide a built-in alternative for using external files for the bitmaps in
SVG: allow embedding them inside the SVG itself using "data:" URI.

And also allow to define custom handlers to make the behaviour even more
flexible.

Closes #15968.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 17:26:27 +00:00
Vadim Zeitlin
c59b815f2c Fix several rounding problems with float values in wxPropertyGrid.
Loss of precision when converting floating point numbers to text and back
could result in several problems, notably comparing a valid value with the
minimum could fail after a round trip through wxSpinCtrl.

Fix this by using a specialization of NumericValidation() handling floating
point values specially and correctly.

Closes #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:54 +00:00
Vadim Zeitlin
4ec4dcd3f5 Use symbolic attributes names in wxPropertyGrid code.
No real changes, just use constants instead of hardcoding their values.

See #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:49 +00:00
Vadim Zeitlin
d183babc8d Allow retrieving wxPG_FLOAT_PRECISION and not just setting it.
It was possible to call SetAttribute() to change this attribute value but not
to get it back. Override DoGetAttribute() to also allow the latter.

See #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:44 +00:00
Vadim Zeitlin
876859fcb7 Expose ScintillaWX DoDragEnter() and DoDragLeave() methods.
These methods are needed to allow implementing alternative wxDropTargets, in
addition to the already public DoDragOver().

Closes #16010.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:39 +00:00
Vadim Zeitlin
0415f0ab05 Document interaction of wxSplitterWindow gravity with initial size.
Document the somewhat counter intuitive (but difficult to change) behaviour of
the splitter when both sash position and gravity are set.

See #15996.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:31 +00:00
Vadim Zeitlin
b1a92006b9 Fix memory leak when not finishing iteration started by wxFindFirstFile().
Memory allocated by wxFindFirstFile() was only freed when no more files could
be found by wxFindNextFile(), resulting in a memory leak if the iteration was
never finished.

Closes #4631.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:54:24 +00:00
Vadim Zeitlin
1911811fe6 Fix wxOSX compilation error after r75956.
wxScopedArray::get() needs to be explicitly called to access the array
contents as a pointer.

Closes #16015.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:14:32 +00:00
Vadim Zeitlin
d479c2affa Chinese translations update for 3.0.1 from Jiawei Huang.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:09:51 +00:00
Vadim Zeitlin
92c5b8bba2 German translations update for 3.0.1 from Sebastian Walderich.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-22 14:06:50 +00:00
Vadim Zeitlin
918f777c5e Basque translations update for 3.0.1 from Xabier Aramendi.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 21:47:28 +00:00
Stefan Csomor
633b5c691b 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/trunk@75966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-21 19:05:22 +00:00