From f6b826564ef75741cc91eb0e1a1df476e952eec4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 17 Apr 2013 11:45:07 +0000 Subject: [PATCH] Remove "ED" suffix from EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED. The naming of this macro was inconsistent with other similar macros in wxListCtrl and wxTreeCtrl and even EVT_DATAVIEW_COLUMN_HEADER_CLICK in wxDataViewCtrl itself. Moreover, it was even documented under the wrong name without "ED". Clear this mess by removing the "ED" suffix while still keeping the old macro name for compatibility. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dataview.h | 5 ++++- samples/dataview/dataview.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/wx/dataview.h b/include/wx/dataview.h index cd2ff3a4ce..b4855509bb 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -912,7 +912,7 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); #define EVT_DATAVIEW_ITEM_CONTEXT_MENU(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_CONTEXT_MENU, id, fn) #define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn) -#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn) +#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn) #define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn) #define EVT_DATAVIEW_COLUMN_REORDERED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_REORDERED, id, fn) #define EVT_DATAVIEW_CACHE_HINT(id, fn) wx__DECLARE_DATAVIEWEVT(CACHE_HINT, id, fn) @@ -921,6 +921,9 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); #define EVT_DATAVIEW_ITEM_DROP_POSSIBLE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP_POSSIBLE, id, fn) #define EVT_DATAVIEW_ITEM_DROP(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP, id, fn) +// Old and not documented synonym, don't use. +#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, fn) + #ifdef wxHAS_GENERIC_DATAVIEWCTRL #include "wx/generic/dataview.h" #elif defined(__WXGTK20__) diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index 857992884d..8c0a7428f1 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -343,7 +343,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_DATAVIEW_ITEM_EDITING_DONE(ID_MUSIC_CTRL, MyFrame::OnEditingDone) EVT_DATAVIEW_COLUMN_HEADER_CLICK(ID_MUSIC_CTRL, MyFrame::OnHeaderClick) - EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(ID_MUSIC_CTRL, MyFrame::OnHeaderRightClick) + EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(ID_MUSIC_CTRL, MyFrame::OnHeaderRightClick) EVT_DATAVIEW_COLUMN_SORTED(ID_MUSIC_CTRL, MyFrame::OnSorted) EVT_DATAVIEW_ITEM_CONTEXT_MENU(ID_MUSIC_CTRL, MyFrame::OnContextMenu)