Commit Graph

50176 Commits

Author SHA1 Message Date
Vadim Zeitlin
8f79ece333 Don't assert if the path is not absolute in wxFileDialog::SetPath().
Remove the assert added in r62101 (see #10917), it was wrong as the other
ports do not assert in this case. Instead, just ensure that the path we use
with the GTK+ native chooser is absolute.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-03 16:26:15 +00:00
Paul Cornett
a243da29c8 make array data fully const
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 17:28:45 +00:00
Paul Cornett
d1750c03ce use const_cast where appropriate
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 17:27:17 +00:00
Paul Cornett
2a32b8071b check for self assignment in operator=
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 16:36:50 +00:00
Vadim Zeitlin
46b8d15a67 Compilation fix after r62754.
Don't pass second argument to wxPizza::New() any more in wxStaticBox.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 13:27:17 +00:00
Bryan Petty
6604fd4c23 Removed hard-coded timer Id in wxAUI for the transparent hint fade functionality. (fixes #11435)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-02 00:57:56 +00:00
Bryan Petty
0678e935b1 Forward-port of r62758 (Added wxHtmlEasyPrinting name accessor and modifier).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 20:23:29 +00:00
Paul Cornett
1827c0f538 remove m_backing_window member, to keep people from trying to use it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 17:16:28 +00:00
Vadim Zeitlin
030495ecf1 Add wxOSX_10_6_AND_LATER macro and use it.
Replace all occurrences of

	@interface wxFoo : NSFoo
	#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
	    <NSProtocol>
	#endif

which we used for protocols new in 10.6 with just

	@interface wxFoo : NSFoo wxOSX_10_6_AND_LATER(<NSProtocol>)

which looks better and simpler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 16:47:33 +00:00
Paul Cornett
0f52f61085 remove unused data member
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 16:23:48 +00:00
Vadim Zeitlin
589d208299 Define _CRT_NONSTDC_NO_WARNINGS to suppress MSVC warning in libtiff.
Defining lfind as _lfind is not enough and a warning C4996 is still generated
by MSVC9 when the function is called.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 00:43:15 +00:00
Vadim Zeitlin
41c89b9107 Define _CRT_SECURE_NO_WARNINGS when building 3rd party libs with MSVC.
Avoid dozens of warnings about "unsafe" use of the standard C library
functions in 3rd party code which are harmless and which we don't care about
in any case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-12-01 00:42:19 +00:00
Stefan Csomor
884dad8326 using 64bit APIs, closes #10184
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62749 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 17:47:37 +00:00
Francesco Montorsi
4f5dc9aad3 partially revert changes of r58531 as wxCollapsiblePane currently doesn't work with GTK+ 2.18.3 (altough it does work with GTK+ 2.12.2); all following changes (r58632,58718,61109) should have been preserved
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 13:17:06 +00:00
Kevin Ollivier
a029e98a41 orderBack puts it behind all windows in its level, including in other apps, so use orderFront instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 01:08:04 +00:00
Vadim Zeitlin
c8688139b0 Fix compilation of image sample with wxUSE_LIBPNG==0.
Also don't propose to save the file using the extensions not supported in this
library build.

Closes #11495.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 00:30:15 +00:00
Vadim Zeitlin
5fc0c309f7 Fix compilation in wxUSE_STL==1 case broken by r62738.
We need to use wxString::c_str() explicitly to convert wxString to const char
* in STL build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-30 00:30:08 +00:00
Kevin Ollivier
b487746ac4 Make sure we setup the base's Show state correctly and send a show event.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-29 21:46:15 +00:00
Jaakko Salli
86a6c828f8 Fixed regression: forgot to set wxPropertyGridPageState::m_anyModified to false in wxPropertyGridInterface::ClearModifiedStatus().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-29 09:42:45 +00:00
Kevin Ollivier
2c3ce6c46d Fix needed to allow shaped windows, and other windows without a title bar, to get the focus when clicked under OS X.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 20:09:00 +00:00
Stefan Csomor
9f43f2691c 64bit builds had problems with full circles, as we can use 10.4+ only APIs, use new implementation, fixes #11471
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 20:05:39 +00:00
Vadim Zeitlin
874dbd3a4a Allow calling wxStrchr() with a narrow string and wide character.
Calls to wxStrchr(char-string, wide-char) would previously fail if wide
character couldn't be converted to a single character in the current locale
encoding. Change it to simply return NULL in this case as it's a safe and
useful generalization: a narrow string will never contain a wide character not
representable in the current locale.

Add wxUniChar::GetAsChar() to help with implementing this.

Closes #11487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 14:37:03 +00:00
Vadim Zeitlin
85b1997c09 Define INVALID_FILE_ATTRIBUTES in filename.cpp too.
Fix VC6 compilation: INVALID_FILE_ATTRIBUTES is not defined in its headers so
we need to do it ourselves (this was done in filefn.cpp before but part of the
code using this constant was moved to filename.cpp in r62735 so now we need to
define it here too).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 03:37:41 +00:00
Vadim Zeitlin
aeef0d188c No changes, just remove unnecessary UTF-8 bytes.
The patch of #11187 (applied in r61884) unnecessarily used +U2019 which can't
be converted to latin1, remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 03:37:36 +00:00
Vadim Zeitlin
5bb596668f Implement wx{File,Dir}Exists() in terms of wxFileName methods.
Use wxFileName from the global functions instead of using global functions in
wxFileName methods as wxFileName is the preferred API for all these
operations.

Closes #11488.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 02:40:08 +00:00
Vadim Zeitlin
ad42f414c8 Don't override msw.remap system option value in wxToolbook.
Introducing a system option for all toolbars and then ignoring it inside wx
itself is ridiculous and just goes to prove that this option itself was a
mistake. But as we have it, we should respect whatever value it's set to
(which should hopefully be 0 anyhow for most modern systems) instead of
overriding it forcefully making the mockery of the whole "option" concept.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 02:29:08 +00:00
Vadim Zeitlin
1c54c4ed04 Avoid infinite recursion in wxToolbook::OnSize() under wxMSW.
Reset m_needsRealizing flag before calling wxToolBar::Realize() as doing this
can result in another call to wxToolbook::OnSize() itself.

Closes #11942.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 02:29:02 +00:00
Vadim Zeitlin
d395f181b3 Use OUTLINETEXTMETRIC::otmpFamilyName to get wxFont face name from MSW.
In spite of the name, we need to use otmpFamilyName member of
OUTLINETEXTMETRIC struct and not otmpFaceName to get the font face name: the
latter may contain (locale-dependent, so the changes of r62708 didn't work for
non-English versions of Windows) "Italic" or "Bold" suffix while the former
does not and is what we want.

This should really fix the unit test failures, even in French locale.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-28 02:28:57 +00:00
Vadim Zeitlin
9a67941f0b Compilation fix for wxUSE_CAIRO==0 after last commit.
Include wx/graphics.h when wxUSE_CAIRO==0 but wxUSE_GRAPHICS_CONTEXT==1 (as in
e.g. MSW builds).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 21:36:03 +00:00
Vadim Zeitlin
6c99dbd55e Define wxUSE_CAIRO in wx/chkconf.h to ensure that it's always defined.
wxUSE_CAIRO used to be defined only in wx/cairo.h but this header wasn't
included by src/common/dcgraph.cpp so the code there was compiled as if we
were not using Cairo even when we were (thanks g++ for the warning).

Define it in wx/chkconf.h (included from wx/defs.h, i.e. always) now to ensure
that not only this bug is fixed but also that it can't happen any more.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 21:06:03 +00:00
Vadim Zeitlin
a8f9fe13aa Use #ifdef to check for __WXMSW__ and __WXGTK__ and not #if.
Using #if doesn't work when symbols are not defined.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 21:05:57 +00:00
Vadim Zeitlin
cfbc15ee04 Allow changing horizontal alignment of numeric cells in wxGrid.
wxGridCellAttr didn't provide any way to query its alignment attributes
without falling back to the (always defined) default alignment so the code in
wxGridCellNumberRenderer and similar classes simply always used right
alignment,

Add a new wxGridCellAttr::GetNonDefaultAlignment() function which allows to
retrieve the alignment defined in the attribute and use it to use right
alignment by default but allow overriding it.

Add a test to the sample showing a non right-aligned numeric cell.

Incidentally fix a long-standing bug in wxGridCell{DateTime,Enum}Renderers
which used wxRIGHT instead of wxALIGN_RIGHT and so were not aligned properly
even by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 01:47:38 +00:00
Vadim Zeitlin
ba0185b557 Add symbolic constant wxALIGN_INVALID and use it instead of -1 in wxGrid.
wxGridCellAttr was using literal -1 to indicate "no alignment" which wasn't
immediately obvious, use a new wxALIGN_INVALID (which has the same value)
instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-27 01:47:30 +00:00
Kevin Ollivier
5cbf522105 Build fix for OS X <= 10.5.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 23:14:28 +00:00
Kevin Ollivier
9ab7ff537d Allow OS X Cocoa (or any OS X port) to override GetBestSize and provide a native OS X Cocoa impl. Also, fix the line ending check under OS X Cocoa, and a sanity check for SetStyle.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 23:11:27 +00:00
Kevin Ollivier
b9cf2753b4 Add CheckSpelling support for OS X Cocoa, make sure NSTextView-based wxTextCtrls emit EVT_TEXT, and a fix for GetStyle when position == length.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 21:52:42 +00:00
Vadim Zeitlin
7430a4bbf8 Make wxFileDialog::Set/SetPath() behave consistently.
wxFileDialog::GetPath() didn't return the value set by a previous call to
SetPath() in wxMSW version. Fix this and also implement SetPath() and
SetDirectory() methods in the generic versions in the same way as
SetFilename().

Closes #3672.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 16:17:00 +00:00
Vadim Zeitlin
aa926768a9 Don't set wxTextAttr font family to invalid value.
wxTextAttr::HasFontFamily() shouldn't return true if there is no valid font
family in this attribute but this could happen if it was constructed from a
font which didn't know its own family.

This fixes asserts on the startup of the text sample in wxMSW due to passing
wxFONTFAMILY_UNKNOWN to wxFont::SetFamily() when trying to use such invalid
attribute later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 15:59:27 +00:00
Vadim Zeitlin
8faed39597 Use wxTE_RICH style for the log window in the text sample.
This makes it have nicer colour (white instead of grey by default) under MSW
and wxTE_RICH was already in the code, just commented out -- it seems it's
better to enable it (as it also allows more text to be shown in the control
under old Windows versions) than to remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 15:59:20 +00:00
Vadim Zeitlin
7b6126aa3a Explicitly set the cursor when showing popup menu on text control in wxMSW.
Without this, an I-beam cursor is used when a menu is shown by a rich text
control. Set the arrow cursor explicitly to work around this apparent bug in
the native control.

Closes #11314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 03:29:27 +00:00
Vadim Zeitlin
64932e4105 No changes, just avoid overriding GetNativeFontInfoDesc() in wxMSW wxFont.
wxFont::GetNativeFontInfoDesc() and GetNativeFontInfoUserDesc() were
overridden just to ensure that the font is realized but it makes sense to do
it in wxFontRefData::GetNativeFontInfo() itself as detecting the face name
won't work if the font is not realized anyhow. And then we don't need these
functions at all as the only thing they do is checking that the font is valid
when they are called but this can be done in the base class itself as this
should happen in all ports (document that this is the case).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 02:34:01 +00:00
Vadim Zeitlin
a77c05ea22 Return face name from wxFont::GetNativeFontInfo() under MSW.
Retrieve the face name from the system if we don't have it already before
returning the native font info.

This fixes the currently failing font unit tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-26 02:33:53 +00:00
Vadim Zeitlin
3515776ea5 Don't use unsafe strcpy() when parsing wxNativeFontInfo.
Fix a nice buffer overflow waiting to happen due to the use of wxStrcpy().
Call wxNativeFontInfo::SetFaceName() which uses wxStrlcpy() instead.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-24 00:02:21 +00:00
Vadim Zeitlin
804250acc3 Don't return italic/bold suffix from wxFont::GetFaceName() in wxMSW.
These suffixes don't make part of the face name in wx API but the native MSW
API which we use since r62675 does return them. This made the unit test fail
in SettingsTestCase::GlobalFonts() as a face name with such suffix wasn't
recognized as a valid face name any more, so simply remove them.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-24 00:02:05 +00:00
Vadim Zeitlin
009f89f75d Make the assert in SettingsTestCase::GlobalFonts() more informative.
Show the index of the font and the face name which was invalid.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62707 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-24 00:01:51 +00:00
Vadim Zeitlin
92a2a0ef91 Fix wxListCtrl::GetSubItemRect(wxLIST_RECT_ICON/LABEL) in wxMSW for column 0.
Wrong width was returned for the icon or label rectangle when querying the
first column. Fix this and add a test to the sample allowing to check this.

GetSubItemRect() still returns wrong results for second and subsequent
columns, see #11355.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-24 00:01:38 +00:00
Vadim Zeitlin
f3c74c8df9 Don't change file access time implicitly when setting it explicitly.
wxFileHandle helper class used in wxFileName::SetTimes() under MSW modified
the file access time by setting it to the current time because it opened the
file in a wrong mode.

Closes #10567.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-24 00:01:25 +00:00
Vadim Zeitlin
a12bd55b0d Enable wxGraphicsContext and related classes by default if supported.
For MSW, check for gdiplus.h availability when using configure but only
support it for MSVC 7+ otherwise. For the other platforms, always support it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-24 00:01:15 +00:00
Julian Smart
9302396589 Made Unicode the default in symbols dialog.
Fixed wrongly sized symbols dialog.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-23 09:34:07 +00:00
Vadim Zeitlin
e55e621ec5 Define wxNO_RTTI if RTTI support is disabled for g++ or MSVC.
For g++ it could have been possible to define wxNO_RTTI in configure itself
but it seems better/simpler/more maintainable to do it in C++ code. As for
MSVC, we already define wxNO_RTTI correctly if build/msw/makefile.vc is used
but not if (modified or rebaked) project files are used and detecting RTTI
support in the code is the only way to fix it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-22 11:24:09 +00:00