added wxTB_NO_TOOLTIPS (heavily modified patch 1458009)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-05-28 17:17:02 +00:00
parent 0bb4ad85f3
commit 6a1b3ead3f
7 changed files with 66 additions and 30 deletions

View File

@@ -317,8 +317,7 @@ bool wxToolBar::Create( wxWindow *parent,
ConnectWidget( m_widget );
gtk_widget_show(GTK_WIDGET(m_toolbar));
}
gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );
gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), !(style & wxTB_NO_TOOLTIPS) );
// FIXME: there is no such function for toolbars in 2.0
#if 0
@@ -346,7 +345,16 @@ void wxToolBar::GtkSetStyle()
void wxToolBar::SetWindowStyleFlag( long style )
{
wxToolBarBase::SetWindowStyleFlag(style);
if( style & wxTB_TOOLTIPS )
{
if( m_toolbar )
gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );
}
else
{
if( m_toolbar )
gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), FALSE );
}
if ( m_toolbar )
GtkSetStyle();
}