From: Robin Dunn Date: Fri, 25 Mar 2005 22:39:20 +0000 (+0000) Subject: Fixed bug [ 1166937 ] Toolbar.DeleteToolByPos X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4a64a89c2fa0a66d72f9a5bdd6c7f962c8f71d75 Fixed bug [ 1166937 ] Toolbar.DeleteToolByPos git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index 5d5dd740c6..c62103dc53 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -519,7 +519,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) return TRUE; } -bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase) +bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *toolBase) { wxToolBarTool *tool = (wxToolBarTool *)toolBase; @@ -533,7 +533,11 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase) gtk_widget_destroy( tool->m_item ); break; - //case wxTOOL_STYLE_SEPARATOR: -- nothing to do +#ifdef __WXGTK20__ + case wxTOOL_STYLE_SEPARATOR: + gtk_toolbar_remove_space( m_toolbar, pos ); + break; +#endif } InvalidateBestSize(); diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index 5d5dd740c6..c62103dc53 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -519,7 +519,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) return TRUE; } -bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase) +bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *toolBase) { wxToolBarTool *tool = (wxToolBarTool *)toolBase; @@ -533,7 +533,11 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase) gtk_widget_destroy( tool->m_item ); break; - //case wxTOOL_STYLE_SEPARATOR: -- nothing to do +#ifdef __WXGTK20__ + case wxTOOL_STYLE_SEPARATOR: + gtk_toolbar_remove_space( m_toolbar, pos ); + break; +#endif } InvalidateBestSize();