]> git.saurik.com Git - wxWidgets.git/commitdiff
Rename wxEVT_DIRCTRL_CHANGED to wxEVT_DIRCTRL_SELECTIONCHANGED.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 16 May 2013 14:33:01 +0000 (14:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 16 May 2013 14:33:01 +0000 (14:33 +0000)
This is more consistent with the existing wxEVT_FILECTRL_SELECTIONCHANGED.

Closes #15209.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
include/wx/generic/dirctrlg.h
interface/wx/dirctrl.h
samples/widgets/dirctrl.cpp
src/generic/dirctrlg.cpp

index b16eb57c1898f1bf412b3272df7b01dfd34f5fd1..c7c93b4643f65e9e936b09b9b10aba7e71d852c6 100644 (file)
@@ -634,7 +634,7 @@ All (GUI):
 - Close wxLogWindow automatically if it's the last remaining top level window.
 - Implement clipping for wxSVGFileDC (Steve Benbow).
 - Add wxDirCtrl::GetPath() (troelsk).
-- Add wxEVT_COMMAND_DIRCTRL_CHANGED event (troelsk).
+- Add wxEVT_DIRCTRL_SELECTIONCHANGED event (troelsk).
 - Add wxControl::GetSizeFromTextSize() (Manuel Martin).
 - Optionally allow showing tooltips for disabled ribbon buttons (wxBen).
 - Add wxTL_NO_HEADER style to wxTreeListCtrl (robboto).
index de3e38052272e8714faa48abf10408a0a9bab839..6d625ba67add665fa9b09d75fbc50789f4adc0c4 100644 (file)
@@ -209,10 +209,12 @@ private:
     wxDECLARE_NO_COPY_CLASS(wxGenericDirCtrl);
 };
 
-wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRCTRL_CHANGED, wxTreeEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRCTRL_SELECTIONCHANGED, wxTreeEvent );
 
-#define EVT_DIRCTRL_CHANGED(id, fn) \
-    wx__DECLARE_EVT1(wxEVT_DIRCTRL_CHANGED, id, wxTreeEventHandler(fn))
+#define wx__DECLARE_DIRCTRL_EVT(evt, id, fn) \
+    wx__DECLARE_EVT1(wxEVT_DIRCTRL_ ## evt, id, wxTreeEventHandler(fn))
+
+#define EVT_DIRCTRL_SELECTIONCHANGED(id, fn) wx__DECLARE_DIRCTRL_EVT(SELECTIONCHANGED, id, fn)
 
 //-----------------------------------------------------------------------------
 // wxDirFilterListCtrl
@@ -307,7 +309,7 @@ extern WXDLLIMPEXP_DATA_CORE(wxFileIconsTable *) wxTheFileIconsTable;
 #endif // wxUSE_DIRDLG || wxUSE_FILEDLG || wxUSE_FILECTRL
 
 // old wxEVT_COMMAND_* constants
-#define wxEVT_COMMAND_DIRCTRL_CHANGED   wxEVT_DIRCTRL_CHANGED
+#define wxEVT_COMMAND_DIRCTRL_SELECTIONCHANGED wxEVT_DIRCTRL_SELECTIONCHANGED
 
 #endif
     // _WX_DIRCTRLG_H_
index 2583497d9c1db53886c6631ff0def8e7c378a12b..65f0592c18721581c455af9d1e937b72be2103a5 100644 (file)
@@ -51,9 +51,9 @@ enum
     @library{wxcore}
     @category{ctrl}
     @appearance{genericdirctrl}
-    @event{EVT_DIRCTRL_CHANGED(id, func)}
+    @event{EVT_DIRCTRL_SELECTIONCHANGED(id, func)}
           Selected directory has changed.
-          Processes a @c wxEVT_DIRCTRL_CHANGED event type.
+          Processes a @c wxEVT_DIRCTRL_SELECTIONCHANGED event type.
           Notice that this event is generated even for the changes done by the
           program itself and not only those done by the user.
           @since 2.9.5
@@ -278,4 +278,4 @@ public:
     void FillFilterList(const wxString& filter, int defaultFilter);
 };
 
-wxEventType wxEVT_DIRCTRL_CHANGED;
+wxEventType wxEVT_DIRCTRL_SELECTIONCHANGED;
index ff3b96cf3ec9ab38066fe0a13b9fbaf9b290e662..27bcb2cd563b706c30c44a624a0c00689b002a71 100644 (file)
@@ -156,7 +156,7 @@ BEGIN_EVENT_TABLE(DirCtrlWidgetsPage, WidgetsPage)
     EVT_BUTTON(DirCtrlPage_SetPath, DirCtrlWidgetsPage::OnButtonSetPath)
     EVT_CHECKBOX(wxID_ANY, DirCtrlWidgetsPage::OnCheckBox)
     EVT_RADIOBOX(wxID_ANY, DirCtrlWidgetsPage::OnRadioBox)
-    EVT_DIRCTRL_CHANGED(DirCtrlPage_Ctrl, DirCtrlWidgetsPage::OnSelChanged)
+    EVT_DIRCTRL_SELECTIONCHANGED(DirCtrlPage_Ctrl, DirCtrlWidgetsPage::OnSelChanged)
 END_EVENT_TABLE()
 
 // ============================================================================
index f38afa7ce95ef62fac3397a542603d11be67d075..824c8369427ea37fbbfcc13124c7dcb71376ac54 100644 (file)
@@ -106,7 +106,7 @@ bool wxIsDriveAvailable(const wxString& dirName);
 // events
 // ----------------------------------------------------------------------------
 
-wxDEFINE_EVENT( wxEVT_DIRCTRL_CHANGED, wxTreeEvent );
+wxDEFINE_EVENT( wxEVT_DIRCTRL_SELECTIONCHANGED, wxTreeEvent );
 
 // ----------------------------------------------------------------------------
 // wxGetAvailableDrives, for WINDOWS, DOS, OS2, MAC, UNIX (returns "/")
@@ -703,7 +703,7 @@ void wxGenericDirCtrl::OnEndEditItem(wxTreeEvent &event)
 
 void wxGenericDirCtrl::OnTreeSelChange(wxTreeEvent &event)
 {
-    wxTreeEvent changedEvent(wxEVT_DIRCTRL_CHANGED, GetId());
+    wxTreeEvent changedEvent(wxEVT_DIRCTRL_SELECTIONCHANGED, GetId());
 
     changedEvent.SetEventObject(this);
     changedEvent.SetItem(event.GetItem());