Commit Graph

54533 Commits

Author SHA1 Message Date
Vadim Zeitlin
1c959a62ce Add possibility to set item background in generic wxDataViewCtrl.
Added wxDataViewItemAttr::SetBackgroundColour() and code to honour it in the
generic implementation of wxDataViewCtrl.

Closes #12621.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:54:38 +00:00
Vadim Zeitlin
02106526ea Don't use dummy "inline" in wxDEPRECATED_CONSTRUCTOR definition.
Apparently we need this bogus "inline" for g++ < 3.4 but there is no reason to
use it for the other compilers and this results in linking errors with e.g.
MSVC, so remove it.

Closes #13775.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:54:32 +00:00
Dimitri Schoolwerth
cac008ad62 Fixed min and max label values not being swapped when using wxSL_INVERSE in a horizontal MSW slider.
Changed wxSlider::GetLabelsSize to let the widthMin and widthMax values contain the width of what the minimum (always on the left/top) and maximum (always on the right/bottom) _label_ will contain. This is not the same as the minimum and maximum _value_ in case of using wxSL_INVERSE.

Also don't swap the position of the min/max labels in a horizontal slider with wxSL_INVERSE (just how the labels already stay in place in a vertical slider, regardless of wxSL_INVERSE usage), nor their width.

Regression since r65941.

Fixes #13416.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:28:42 +00:00
Dimitri Schoolwerth
2a263bbbd7 Removed useless if statement in slider code.
The y position of the slider is already taken care of by the variable ySlider, changing labelOffset has no use.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:16:52 +00:00
Dimitri Schoolwerth
e528cca7c1 Don't move the slider's value label if it's not being used.
An if statement was missing brackets and still moving the value label.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-19 12:12:31 +00:00
Vadim Zeitlin
9efbfd5dbd Add a reminder to update version.bkl to inc_release script.
While docs/tech/tn0011.txt does document this, it's still too simple to forget
to update version.bkl, as my experience shows, so add a reminder to the script
itself too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-18 14:38:47 +00:00
Vadim Zeitlin
08670ea85a Update version to 2.9.4 in version.bkl too and rebake everything.
Change the version for Unix shared libraries too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-18 14:35:50 +00:00
Vadim Zeitlin
75cb911c7c Added wxFilePickerCtrl::SetInitialDirectory().
This method allows to configure the initial directory to be shown when
browsing for files in an initially empty wxFileDirPickerCtrl.

It is also available for wxDirPickerCtrl but is less useful there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-18 12:34:47 +00:00
Vadim Zeitlin
b9bb74e9fc No changes, just use wxScopedPtr instead of explicit "delete".
Use wxScopedPtr in wxGenericFileDirButton to ensure that the dialog created by
it is always destroyed, even if an exception is thrown while showing the
dialog or while processing the event we generate after showing it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-18 12:27:04 +00:00
Steve Lamerton
7f98bdd6a5 Ensure wxWebViewIE::SetPage clears the existing content before writing the new output. Also add a basic unit test to verify correctness in the future.
Fixes #13770

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-18 11:51:52 +00:00
Vadim Zeitlin
913ce2990e Make wxPalette ctor and Create() const-correct in wxMSW.
The input data is never modified so should be const (it is also documented as
being const and actually is const in the other ports).

Closes #13776.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-17 23:52:47 +00:00
Vadim Zeitlin
05f5b3f745 Define wxBitmapComboBox::Insert(void* clientData) overload in wxMSW.
This overload was declared in the header but not implemented, do add its
definition too.

Closes #13774.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-17 23:52:43 +00:00
Vadim Zeitlin
ecc610f1af Corrected the name of EVT_WEB_VIEW_ERROR event table macro.
It was mistakenly spelt EVT_WEB_VIEW_ERRROR.

Closes #13772.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-17 23:52:40 +00:00
Vadim Zeitlin
65ea1c9dca No changes, just fix typo in an example in webview docs.
See #13772.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-17 23:52:36 +00:00
Vadim Zeitlin
7cb83a8b78 Don't activate MSW dialogs when setting their initial size.
As the dialog is not shown yet at this moment, activating it didn't work
correctly and the dialog didn't get the focus when it was shown later.
Fix this by preventing ::SetWindowPos() from activating it, which it does by
default.

Closes #13765.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-17 23:04:50 +00:00
Dimitri Schoolwerth
a57ea0102f Fixed unreferenced parameter warning.
Parameter xmpData was unused in wxImage::Create when compiling with wxUSE_XPM set to 0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-17 01:13:22 +00:00
Vadim Zeitlin
c05b000c71 Incremented the version number to 2.9.4 everywhere.
The misc/scripts/inc_release script was used to update the versions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-16 22:12:49 +00:00
Vadim Zeitlin
69b554dccc Try to get more information about wxFileSystemWatcher unit test failures.
Log the original and new paths of the rename event to help debugging the extra
modification events detected during the buildbot builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-16 21:11:19 +00:00
Vadim Zeitlin
bfbd873bfe Don't use wxTE_DONTWRAP style in Lines() wxTextCtrl unit case.
The last check in this test couldn't pass under MSW as it relied on the (long)
line of text being wrapped but the style used for the control prevented this
from happening. Not sure how could it have ever worked before but in any case
removing wxTE_DONTWRAP does make the test pass.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-16 19:57:17 +00:00
Vadim Zeitlin
b281a92305 Keep the item being updated selected in wxMSW wxChoice::SetString().
Changing the text of the selected wxChoice (or wxComboBox, as it derives from
it in wxMSW) item made it unselected. Fix this by explicitly restoring the
selection to the item if needed.

Closes #13769.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-16 19:47:58 +00:00
Vadim Zeitlin
5b130f274e Corrected test for region validity in wxMSW wxRegion::DoOffset().
Checking M_REGION is not enough as the region can be invalid (meaning
m_refData dereferenced inside M_REGION is NULL itself) and not just not
initialized, so it resulted in crashes and not just the expected assert
failure when wxRegion::Offset() was called for an invalid region.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-16 19:47:55 +00:00
Vadim Zeitlin
03dc350fa6 Use IsThisEnabled() to test if AUI child is enabled, not IsEnabled().
IsEnabled() returns false if the parent window is disabled and calling
Enable() does not help with this, so we could keep trying and trying to enable
the window unsuccessfully if it was reenabled while its parent was disabled,
resulting in a never-ending stream of EVT_IDLE events.

Closes #13767.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-16 19:33:31 +00:00
Vadim Zeitlin
35f92de300 Make multiline checkboxes wider in wxMSW to avoid word wrap.
At least for some versions of Windows (Server 2003 with classic look and feel)
the native checkboxes auto wrapped the label as it wrongly considered that the
width we specified for it was not big enough. Compensate for this by making
the checkbox wider -- this is just a hack but still better than corrupting the
checkbox display.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-16 11:03:15 +00:00
Vadim Zeitlin
a97f71fa60 Output the value of --enable-debug option in configure.
As we use AC_ARG_ENABLE() instead of WX_ARG_ENABLE() for it, we need to call
AC_MSG_RESULT() explicitly or its value is never reported and configure output
is corrupted.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-16 09:36:36 +00:00
Vadim Zeitlin
0c717dd16b Compilation fix for wxStopWatch with wxUSE_THREADS==0.
Use wxCRIT_SECT_DECLARE_MEMBER/wxCRIT_SECT_LOCKER macros which expand to
nothing in wxUSE_THREADS==0 case instead of using wxCriticalSection[Locker]
classes which are not defined then.

Also explicitly include wx/thread.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-15 21:13:03 +00:00
Julian Smart
5dec941a5b Applied #13763 from dghart, to use primary selections if available
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-15 11:32:58 +00:00
Vadim Zeitlin
9edd688dd3 Ensure that wxPropertyGrid::m_tlp is initialized early enough.
This member variable could be used before it was initialized as
OnTLPChanging() was called from Create() before Init2(), where m_tlp was
assigned NULL, was called.

Closes #13552.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-15 00:22:48 +00:00
Vadim Zeitlin
81dd48085d No changes, just harmonized the EOLs in the ISS file.
Use consistent DOS EOLs for all the lines in this file.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70007 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-14 18:42:11 +00:00
Václav Slavík
c9d3d00cdf Remove unnecessary m_editorCtrl assignment.
m_editorCtrl is WeakRef<>, so doing it is pointless, and it breaks VC6
compilation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-14 17:38:19 +00:00
Václav Slavík
a85b4023d1 Close wxDataViewCtrl inline editor when destroying the control.
If the wxDataViewCtrl control was destroyed while an inline editor
control was still active, it wouldn't get destroyed in the right order
and the ~wxWindow assert about unpopped event handlers would be
triggered.

Fix this by popping the handler as one of the first things in
wxDataViewRendererBase destructor.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-14 16:00:30 +00:00
Václav Slavík
eff1c3e8ec Don't change horizontal scroll position needlessly in wxDataViewCtrl.
When ScrollTo() or EnsureVisible() was called in the generic
wxDataViewCtrl implementation with unspecified column, horizontal scroll
position was reset to left-most position, which doesn't make much sense.
Instead, leave horizontal position unchanged in this case and only
change it when explicitly requested.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-14 15:53:28 +00:00
Václav Slavík
78e18e8d53 Ensure that current column is visible in generic wxDataViewCtrl.
When navigating between columns using keyboard, ensure visibility of the
newly selected column.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-14 15:53:25 +00:00
Chris Elliott
ecd4526b30 2.9.3 version
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-14 08:52:48 +00:00
Vadim Zeitlin
afe9b0559a Add the release date of 2.9.3 to the change log.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-14 00:46:12 +00:00
Vadim Zeitlin
fc672a2aba Use string column identifiers with NSTableColumns in wxDataViewCtrl.
Starting with OS X 10.7 the column identifiers used in NSOutlineView must be
of type NSString, so convert the code to use string identifiers instead of
wxPointerObject.

Closes #13661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-13 21:08:17 +00:00
Julian Smart
d86b82bb2c Applied #13738: Make a wxRichTextImage's box display around the image (dghart)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-13 19:06:53 +00:00
Dimitri Schoolwerth
9815c111d7 Regenerated Xcode projects.
Updated the Xcode projects to use timectrlg.cpp (renamed from timectrl.cpp).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-12 20:38:51 +00:00
Stefan Csomor
309f2b2031 adding defaults for Xcode builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-12 15:54:40 +00:00
Stefan Csomor
3d909cc42f reverting r69387 and r69389, fixes #13737
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-12 15:43:33 +00:00
Vadim Zeitlin
c28a4e5fa5 Rename src/generic/timectrl.cpp to timectrlg.cpp.
We can't use the same names for these files with VC6, it doesn't support this
and the project can't be built because of the output object file names
conflict.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-12 14:01:23 +00:00
Vadim Zeitlin
d4cf50c8b2 Remove the item before notifying about it in wxDataViewIndexListModel.
Remove the item from the internal representation of the model before calling
ItemDeleted() callback so that the callback sees the model in a consistent
state.

This is more consistent with the other callbacks (e.g. ItemAdded()) and other
models (e.g. wxDataViewVirtualListModel) and should fix crashes in wxOSX
version of the control.

Closes #13753.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-12 13:08:46 +00:00
Vadim Zeitlin
46e9b34a60 Always give error message when file-related functions fail.
Some failures in the file functions that usually did give error messages were
not reported, do log these errors too now.

Closes #13576.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-12 13:08:43 +00:00
Vadim Zeitlin
b4bdde879b Fix harmless warning in wxOSX with 10.7 SDK.
Use NSInteger instead of int in a declaration to avoid warnings about
declaration mismatch from g++ 4.2 under OS X 10.7.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-11 23:59:33 +00:00
Vadim Zeitlin
1677253b36 Minor corrections to event handling overview documentation.
Use "wx" prefix with the macros and correct the event methods used in the
example.

Closes #13752.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-11 23:51:18 +00:00
Vadim Zeitlin
bf79972894 Document that setting colours for native controls might not work.
Changing colours of the native controls can't be relied on.

See #13745.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-11 23:51:14 +00:00
Paul Cornett
565ed8bfd8 fix GetTextExtent with non-null font argument, fixes #13750
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-11 19:05:24 +00:00
Vadim Zeitlin
4cf1a9bf4a Ensure that Enter key presses are never stolen from wxButton in wxMSW.
This commit fixes the following bug: when an in-place editor control containing
an embedded button was used in wxDataViewCtrl, pressing Enter on the button
would close the editor, accepting changes, instead as (generic) wxDataViewCtrl
intercepts WXK_RETURN in its EVT_CHAR_HOOK handler. To prevent this from
happening, wxButton now handles EVT_CHAR_HOOK itself and never lets the parent
window intercept it if it's for WXK_RETURN. To ensure that normal
wxEVT_KEY_DOWN and wxEVT_CHAR are still generated in this case, wxButton
handler calls the new wxKeyEvent::DoAllowNextEvent() method that was added to
allow suppressing EVT_CHAR_HOOK only, without affecting the subsequent events.
DoAllowNextEvent() is currently only used in wxMSW but support for it was also
added to wxGTK and (both) wxOSX ports.

See #9102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-11 17:03:56 +00:00
Paul Cornett
91614f1aa3 don't include files which may not exist in source release for a specific platform, fixes #13746
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-11 05:36:52 +00:00
Vadim Zeitlin
a4a06df3b4 Document wxFileConfig ctor.
This ctor was not documented at all because the comment preceding it was a
plain C++ comment and not a Doxygen one.

Do it now, especially as the logic of this ctor is not quite obvious.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-10 11:42:49 +00:00
Robin Dunn
5eb16fe200 Use default values for some parameters of wxSizerItem and wxGBSizerItem ctors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-12-10 04:34:06 +00:00