From: Vadim Zeitlin Date: Thu, 30 Sep 2004 22:27:45 +0000 (+0000) Subject: don't deprecate SetItemImage() with 3 parameters; just add a default value for the... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/aba3d35e7bf1309c58d9e3942437c00fbb167355 don't deprecate SetItemImage() with 3 parameters; just add a default value for the last one git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 5fd6206fdc..0fd9ab4705 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -98,10 +98,7 @@ public: long SetItem( long index, int col, const wxString& label, int imageId = -1 ); int GetItemState( long item, long stateMask ) const; bool SetItemState( long item, long state, long stateMask); -#if WXWIN_COMPATIBILITY_2_4 - wxDEPRECATED(bool SetItemImage( long item, int image, int selImage )); -#endif - bool SetItemImage( long item, int image ); + bool SetItemImage( long item, int image, int selImage = -1 ); wxString GetItemText( long item ) const; void SetItemText( long item, const wxString& str ); wxUIntPtr GetItemData( long item ) const; diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h index 8d8fd8a7a8..d2cbb4d71b 100644 --- a/include/wx/msw/listctrl.h +++ b/include/wx/msw/listctrl.h @@ -160,10 +160,7 @@ public: bool SetItemState(long item, long state, long stateMask) ; // Sets the item image -#if WXWIN_COMPATIBILITY_2_4 - wxDEPRECATED(bool SetItemImage(long item, int image, int selImage)) ; -#endif - bool SetItemImage(long item, int image) ; + bool SetItemImage(long item, int image, int selImage = -1) ; // Gets the item text wxString GetItemText(long item) const ; diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 1d6af59568..e5b8353e68 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -4824,19 +4824,8 @@ bool wxGenericListCtrl::SetItemState( long item, long state, long stateMask ) return true; } -#if WXWIN_COMPATIBILITY_2_4 -bool wxGenericListCtrl::SetItemImage( long item, int image, int WXUNUSED(selImage) ) -{ - wxListItem info; - info.m_image = image; - info.m_mask = wxLIST_MASK_IMAGE; - info.m_itemId = item; - m_mainWin->SetItem( info ); - return true; -} -#endif - -bool wxGenericListCtrl::SetItemImage( long item, int image ) +bool +wxGenericListCtrl::SetItemImage( long item, int image, int WXUNUSED(selImage) ) { wxListItem info; info.m_image = image; diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 85c5fef7f4..8022ba2992 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -903,7 +903,6 @@ bool wxListCtrl::SetItemState(long item, long state, long stateMask) } // Sets the item image -#if WXWIN_COMPATIBILITY_2_4 bool wxListCtrl::SetItemImage(long item, int image, int WXUNUSED(selImage)) { wxListItem info; @@ -914,18 +913,6 @@ bool wxListCtrl::SetItemImage(long item, int image, int WXUNUSED(selImage)) return SetItem(info); } -#endif - -bool wxListCtrl::SetItemImage(long item, int image) -{ - wxListItem info; - - info.m_mask = wxLIST_MASK_IMAGE; - info.m_image = image; - info.m_itemId = item; - - return SetItem(info); -} // Gets the item text wxString wxListCtrl::GetItemText(long item) const