Small cleanup of wxGenericTreeCtrl-specific parts of the sample
Use HAS_GENERIC_TREECTRL for testing whether we're actually using it or not instead of checking for USE_GENERIC_TREECTRL and then port names with a native control, which was done inconsistently, as it included wxQt in one place, but not the other one. Also avoid repeating CreateButtonsImageList() declaration twice, as this resulted in having unbalanced curly braces in this file, which was just unpleasant. No real changes.
This commit is contained in:
@@ -748,7 +748,7 @@ void MyFrame::OnToggleAlternateStates(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
void MyFrame::OnToggleButtons(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
#if USE_GENERIC_TREECTRL || !defined(__WXMSW__)
|
||||
#ifdef HAS_GENERIC_TREECTRL
|
||||
if ( wxGetApp().ShowButtons() )
|
||||
{
|
||||
m_treeCtrl->CreateButtonsImageList(-1);
|
||||
@@ -1064,9 +1064,9 @@ void MyTreeCtrl::CreateStateImageList(bool del)
|
||||
AssignStateImageList(states);
|
||||
}
|
||||
|
||||
#if USE_GENERIC_TREECTRL || (!defined(__WXMSW__) && !defined(__WXQT__))
|
||||
void MyTreeCtrl::CreateButtonsImageList(int size)
|
||||
{
|
||||
#ifdef HAS_GENERIC_TREECTRL
|
||||
if ( size == -1 )
|
||||
{
|
||||
SetButtonsImageList(NULL);
|
||||
@@ -1112,8 +1112,7 @@ void MyTreeCtrl::CreateButtonsImageList(int size)
|
||||
|
||||
AssignButtonsImageList(images);
|
||||
#else
|
||||
void MyTreeCtrl::CreateButtonsImageList(int WXUNUSED(size))
|
||||
{
|
||||
wxUnusedVar(size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user