Re-Added wxStream::StreamSize()
Added in-place editting to wxTreeCtrl, modified wxListCtrl in-place editting Corrected behaviour of wxToolBar::Toggle() to not send messages and to report the correct state Removed many #include "wx/wx.h" to speed up compilation Some more compile fixes and tests. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -381,9 +381,32 @@ void wxToolBar::ToggleTool( int toolIndex, bool toggle )
|
||||
wxToolBarTool *tool = (wxToolBarTool*)node->Data();
|
||||
if (tool->m_index == toolIndex)
|
||||
{
|
||||
tool->m_toggleState = toggle;
|
||||
if ((tool->m_item) && (GTK_IS_TOGGLE_BUTTON(tool->m_item)))
|
||||
{
|
||||
tool->m_toggleState = toggle;
|
||||
|
||||
if (tool->m_bitmap2.Ok())
|
||||
{
|
||||
wxBitmap bitmap = tool->m_bitmap1;
|
||||
if (tool->m_toggleState) bitmap = tool->m_bitmap2;
|
||||
|
||||
GtkPixmap *pixmap = GTK_PIXMAP( tool->m_pixmap );
|
||||
|
||||
GdkBitmap *mask = (GdkBitmap *) NULL;
|
||||
if (bitmap.GetMask()) mask = bitmap.GetMask()->GetBitmap();
|
||||
|
||||
gtk_pixmap_set( pixmap, bitmap.GetPixmap(), mask );
|
||||
}
|
||||
|
||||
gtk_signal_disconnect_by_func( GTK_OBJECT(tool->m_item),
|
||||
GTK_SIGNAL_FUNC(gtk_toolbar_callback), (gpointer*)tool );
|
||||
|
||||
gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(tool->m_item), toggle );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(tool->m_item), "clicked",
|
||||
GTK_SIGNAL_FUNC(gtk_toolbar_callback), (gpointer*)tool );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
node = node->Next();
|
||||
|
Reference in New Issue
Block a user