X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf9e3e736771b247eb38ada221266733b6a601c7..4c460b340f3f32621e83e6efd2f25c43005d60b0:/src/gtk1/tbargtk.cpp diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index 9ee4df2deb..970873c7e2 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -178,6 +178,7 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id, m_toolbar = GTK_TOOLBAR( gtk_toolbar_new( GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS ) ); +// gtk_toolbar_set_space_style( m_toolbar, GTK_TOOLBAR_SPACE_LINE ); m_separation = 5; gtk_toolbar_set_space_size( m_toolbar, m_separation ); m_hasToolAlready = FALSE; @@ -370,6 +371,28 @@ void wxToolBar::AddSeparator() gtk_toolbar_append_space( m_toolbar ); } +bool wxToolBar::DeleteTool(int toolIndex) +{ + wxNode *node = m_tools.First(); + while (node) + { + wxToolBarTool *tool = (wxToolBarTool*)node->Data(); + if (tool->m_index == toolIndex) + { + if (tool->m_control) + tool->m_control->Destroy(); + else + gtk_widget_destroy( tool->m_item ); + m_tools.DeleteNode( node ); + + return TRUE; + } + node = node->Next(); + } + + return FALSE; +} + void wxToolBar::ClearTools() { wxFAIL_MSG( wxT("wxToolBar::ClearTools not implemented") );