Commit Graph

54424 Commits

Author SHA1 Message Date
Vadim Zeitlin
f1cfa1132c Add check for _T() to svn pre-commit hook.
_T() shouldn't be used in any new code so don't allow committing it.

We could have used "svnlook diff" instead of "svnlook cat" and check only for
_T() not being added but in practice there shouldn't be any difference and
using "cat" is simpler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 18:48:42 +00:00
Vadim Zeitlin
ebd98179c5 Use wxT() instead of _T() in XTI code.
_T() is deprecated and doesn't work with Solaris compiler, use wxT() instead.

Also change one occurrence of _T() inside a comment in wx/debug.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 18:48:39 +00:00
Vadim Zeitlin
9349c84fdb Use wxT(), not _T(), in wxRichText code.
_T() doesn't compile with Sun CC and is deprecated, please don't use it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 18:48:36 +00:00
Vadim Zeitlin
3b7e7e2497 Resolve ambiguity between two wxAuiNotebook overloads.
wxAuiNotebook-specific InsertPage() and the version inherited from
wxBookCtrlBase were ambiguous if used with default values for their 2 last
arguments. Resolve this by removing defaults from the inherited version.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 18:48:34 +00:00
Julian Smart
bb7bbd12d3 Improved layout, in particular passed a container size in order to allow relative size calculation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 14:19:50 +00:00
Dimitri Schoolwerth
d9384bfb6d no code changes, fixed some typos
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 14:04:25 +00:00
Jouk Jansen
9fa7b43626 Correction for the #define wxUSE_DRAG_AND_DROP 0 case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 07:18:19 +00:00
Paul Cornett
02800dde9e move render params out of wxDataViewCustomRenderer
they only need to exist for the duration of the render() call

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-09 06:31:07 +00:00
Julian Smart
1199fbd4e0 Fixed default style setting to take into account text boxes; fixed AddBoxStyle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 18:27:47 +00:00
Vadim Zeitlin
1076e695b4 Fix menu creation in wxOSX/Carbon when using wx in a plugin.
In this case the host application may have its own menu so we need to avoid
conflicting with its menu elements.

Closes #13832.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 14:52:59 +00:00
Vadim Zeitlin
d1bf0be0bc Enhance wxRibbonToolBar functionality to wxRibbonButtonBar level.
Allow inserting and deleting tools and not only appending them.

Add possibility to enable/disable and toggle tools.

Send wxUpdateUIEvent for the tools.

Add various properties accessors.

Closes #13835.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 14:52:56 +00:00
Vadim Zeitlin
becc95d84b Don't generate drag events without valid item in wxGenericListCtrl.
Dragging the mouse from the empty area of the control must not generate any
drag events as there is nothing to drag there. Also, MSW version doesn't do
it.

So fix the generic version to avoid generating such invalid drag events too by
checking that we have a valid item before checking that we're dragging.

Closes #1619.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 14:52:51 +00:00
Vadim Zeitlin
6a0e4ead1e Add wxTopLevelWindow::SetRepresentedFilename().
This currently is only implemented under OS X and sets the proxy icon there
but could be implemented to do something useful under the other platforms too
in the future.

Closes #13797.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 14:52:47 +00:00
Vadim Zeitlin
bc5bb77365 Another wxOSX/Carbon compilation fix after wxListCtrlBase changes.
Fix DoInsertColumn() parameter const-ness too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 10:54:28 +00:00
Paul Cornett
2df9f4581c use correct signature for init functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 07:12:35 +00:00
Paul Cornett
8a724edb3d remove unnecessary class definitions and variables
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 06:40:26 +00:00
Paul Cornett
8945688a86 remove unnecessary finalize overrides
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70291 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 06:30:55 +00:00
Vadim Zeitlin
0482be5e1d Fix wxOSX/Carbon compilation after wxListCtrlBase introduction.
Make wxListCtrl::SetColumn() item parameter const reference.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-08 00:55:22 +00:00
Vadim Zeitlin
22f772f8e3 Compilation fixes to joystick sample after r70279.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 16:35:02 +00:00
Vadim Zeitlin
0dc45ad6b5 Compilation fix for PCH-less build after wxListCtrlBase changes.
Include the base class declaration from wx/listbase.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 16:11:10 +00:00
Vadim Zeitlin
3d167c0022 Improve column auto-sizing code in generic wxListCtrl.
Take the width of the header itself into account when setting width to
wxLIST_AUTOSIZE.

Also refactor the code to reuse the code used in wxLIST_AUTOSIZE_USEHEADER
case in SetColumnWidth() when inserting or updating the column width to this
value.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:54 +00:00
Vadim Zeitlin
0fb731b8bf Add support for wxLIST_AUTOSIZE_USEHEADER to InsertColumn().
Use the fixed default width in InsertColumn() by default for compatibility but
allow more useful behaviour in it by supporting wxLIST_AUTOSIZE_USEHEADER as
well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:51 +00:00
Vadim Zeitlin
c23edb1b71 Add convenient wxListCtrl::AppendColumn() wrapper.
In the vast majority of cases, columns are just appended to the end and not
inserted at arbitrary positions in wxListCtrl so provide a convenient wrapper
to do this, especially as it's really trivial to do it now when it can be done
only once at wxListCtrlBase level.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:47 +00:00
Vadim Zeitlin
94248d2ed1 Implement best size calculation for report mode wxListCtrl.
Use the column labels to determine the minimal width required by the control
to show them all in full.

Also declare all image list and column-related wxListCtrl methods in
wxListCtrlBase now as we need some of them in DoGetBestClientSize()
implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:43 +00:00
Vadim Zeitlin
a9bd911fde Replace 3 copies of wxListCtrl mode tests with a single one in wxListCtrlBase.
Move InReportView() and IsVirtual() into the base class as they were the same
in all the implementations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:37 +00:00
Vadim Zeitlin
26df5dd39a Add wxListCtrlBase common base class for port-specific wxListCtrl.
This base class is currently trivial, more methods will be moved to it from
the derived classes later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:34 +00:00
Vadim Zeitlin
3b2f80c205 Set Z-position correctly for wxEVT_JOY_ZMOVE events.
Z-move events don't have (x, y) position, but they do have Z-position which
needs to be set.

Also don't use (x, y) position for these events in the sample.

See #748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:29 +00:00
Vadim Zeitlin
f9aa52355e Joystick messages coordinates are unsigned, treat them as such.
Apparently the joystick messages (x, y) coordinates are unsigned, so use
LOWORD/HIWORD to extract them from LPARAM.

See #748.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:24 +00:00
Julian Smart
4e63bfb9b3 Removed compilation ambiguity between different forms of ...WithUndo functions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 15:48:21 +00:00
Julian Smart
b9433288e4 Fixed box style application.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 14:10:24 +00:00
Julian Smart
61e6149e58 Fixed #13833: wxRichTextCtrl: 'Copy' can grab an extra character
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 14:08:52 +00:00
Vadim Zeitlin
18dd537805 Ensure that wxListEvent::m_itemIndex and m_item.m_itemId are in sync.
Unfortunately we have two ways to get the item affected by wxListEvent: via
its m_itemIndex (or GetIndex()) and m_item.m_itemId (or GetItem()). This can't
be changed for the usual backwards compatibility reasons but at least make
sure that both contain the same values in the events sent by the generic
version (MSW one already did it).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 12:51:42 +00:00
Vadim Zeitlin
8c62f53ee2 Don't fill wxListEvent::m_item when using virtual list control in wxMSW.
When using virtual list control the main program already has the items data so
it's completely useless to call GetItem() when preparing an event for it. It
is also inefficient to call GetItem() for potentially many items.

For both of these reasons the generic version already didn't fill the item
contents for virtual list controls events. Now modify wxMSW to not do it
neither.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 12:51:40 +00:00
Vadim Zeitlin
1e40bd4c74 Initialize wxListItem::m_itemId to -1, not 0.
Currently we have two redundant pieces of data in wxListEvent: m_itemIndex and
m_item.m_itemId. The former is initialized to -1 by default which makes sense
as it means "no item". But the latter was 0 by default which not only didn't
make sense but also made it inconsistent with m_itemIndex for the events which
really didn't have any associated item.

Fix this by initializing m_itemId to -1 as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 12:51:37 +00:00
Vadim Zeitlin
86d19346c5 Fix wxDateTime unit test compilation without PCH.
Include wx/time.h to get wxGetTimeZone() declaration.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 10:21:46 +00:00
Vadim Zeitlin
444bc2b24d Implement support for "%z" in wxDateTime::Format() and Parse().
"%z" specifier can now be used when printing the dates out to specify the time
zone and is also recognized when parsing dates.

Closes #1215.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 00:47:10 +00:00
Julian Smart
cd72035387 Added box style functionality to style manager dialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 19:38:31 +00:00
Julian Smart
eb3d8a3319 Implement missing wxTextBoxAttr::IsDefault function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70266 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 16:32:08 +00:00
Vadim Zeitlin
2f783a2390 More pt_BR translations from Felipe.
All the messages are now translated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 15:53:08 +00:00
Julian Smart
cd45ed3622 Possible fix for #13821: wxRichTextCtrl using 100% CPU
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 14:41:29 +00:00
Julian Smart
37e7b7838c Background now drawn within the border instead of beyond the margin
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 14:00:29 +00:00
Vadim Zeitlin
f8193bbb14 Fix wxRibbon compilation when wxUSE_TOOLTIPS==0.
Add wxUSE_TOOLTIPS tests after the changes of r70175.

Closes #13827.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 13:39:23 +00:00
Julian Smart
63af79dee1 Fixed border drawing bug when width is more than 1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 12:50:47 +00:00
Jouk Jansen
5024d0ac1e Update makefile for OpenVMS
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 10:42:11 +00:00
Stefan Csomor
916a96c961 fixes #13826
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-04 07:54:00 +00:00
Vadim Zeitlin
13b4df952c Fix wxEncodingConverter::Convert(wchar_t) documentation.
This method mistakenly "inherited" the same documentation as 2 argument
Convert() overloads.

Closes #13825.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-03 23:27:50 +00:00
Julian Smart
b33e0c2c5b Disable drag and drop if the control is not editable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-03 15:24:20 +00:00
Julian Smart
0c0e063e66 Applied #13819: wxRTC drag and drop, by dghart, with tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-03 14:09:34 +00:00
Stefan Csomor
606e096810 fixes #13695
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-03 10:53:12 +00:00
Stefan Csomor
ed1ebd3908 adapting to new raw_control constants, see #13695
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-03 10:34:14 +00:00