]> git.saurik.com Git - wxWidgets.git/commitdiff
No changes, just use better names in wxDataViewCtrl sample.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 14 Jul 2010 11:11:58 +0000 (11:11 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 14 Jul 2010 11:11:58 +0000 (11:11 +0000)
ID_DELETE_MUSIC button deleted selected items so use ID_DELETE_SEL and
OnDeleteSelected() handler for it instead.

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

samples/dataview/dataview.cpp

index 7d93d89b69f2d06d6215a9030172e7c6afc7761b..6383ede75fcf8f38b4277fe7c9ac4b56814f7038 100644 (file)
@@ -83,7 +83,7 @@ public:     // event handlers
     void OnPageChanged(wxBookCtrlEvent& event);
 
     void OnAddMozart(wxCommandEvent& event);
-    void OnDeleteMusic(wxCommandEvent& event);
+    void OnDeleteSelected(wxCommandEvent& event);
     void OnDeleteYear(wxCommandEvent& event);
     void OnSelectNinth(wxCommandEvent& event);
     void OnCollapse(wxCommandEvent& event);
@@ -271,7 +271,7 @@ enum
     ID_ATTR_CTRL        = 51,
 
     ID_ADD_MOZART       = 100,
-    ID_DELETE_MUSIC     = 101,
+    ID_DELETE_SEL       = 101,
     ID_DELETE_YEAR      = 102,
     ID_SELECT_NINTH     = 103,
     ID_COLLAPSE         = 104,
@@ -303,7 +303,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
     EVT_NOTEBOOK_PAGE_CHANGED( wxID_ANY, MyFrame::OnPageChanged )
 
     EVT_BUTTON( ID_ADD_MOZART, MyFrame::OnAddMozart )
-    EVT_BUTTON( ID_DELETE_MUSIC, MyFrame::OnDeleteMusic )
+    EVT_BUTTON( ID_DELETE_SEL, MyFrame::OnDeleteSelected )
     EVT_BUTTON( ID_DELETE_YEAR, MyFrame::OnDeleteYear )
     EVT_BUTTON( ID_SELECT_NINTH, MyFrame::OnSelectNinth )
     EVT_BUTTON( ID_COLLAPSE, MyFrame::OnCollapse )
@@ -404,7 +404,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int
 
     wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
     button_sizer->Add( new wxButton( firstPanel, ID_ADD_MOZART,  "Add Mozart"),             0, wxALL, 10 );
-    button_sizer->Add( new wxButton( firstPanel, ID_DELETE_MUSIC,"Delete selected"),        0, wxALL, 10 );
+    button_sizer->Add( new wxButton( firstPanel, ID_DELETE_SEL,  "Delete selected"),        0, wxALL, 10 );
     button_sizer->Add( new wxButton( firstPanel, ID_DELETE_YEAR, "Delete \"Year\" column"), 0, wxALL, 10 );
     button_sizer->Add( new wxButton( firstPanel, ID_SELECT_NINTH,"Select ninth symphony"),  0, wxALL, 10 );
     button_sizer->Add( new wxButton( firstPanel, ID_COLLAPSE,    "Collapse"),               0, wxALL, 10 );
@@ -851,7 +851,7 @@ void MyFrame::OnAddMozart( wxCommandEvent& WXUNUSED(event) )
     m_music_model->AddToClassical( "Kleine Nachtmusik", "Wolfgang Mozart", 1787 );
 }
 
-void MyFrame::OnDeleteMusic( wxCommandEvent& WXUNUSED(event) )
+void MyFrame::OnDeleteSelected( wxCommandEvent& WXUNUSED(event) )
 {
     wxDataViewItemArray items;
     int len = m_ctrl[0]->GetSelections( items );