X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68dda78574c865bd5bec89fbf4c8c3607b0912db..e487524e492809638b7e335937c41fd432458a54:/src/gtk1/tbargtk.cpp diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index 491eea3cd2..d8323989a0 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -2,9 +2,7 @@ // Name: tbargtk.cpp // Purpose: GTK toolbar // Author: Robert Roebling -// Modified by: -// Created: 01/02/97 -// RCS-ID: +// RCS-ID: $Id$ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -113,16 +111,19 @@ bool wxToolBar::Create( wxWindow *parent, wxWindowID id, m_tools.DeleteContents( TRUE ); - m_widget = gtk_handle_box_new(); - m_toolbar = GTK_TOOLBAR( gtk_toolbar_new( GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS ) ); - gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE ); - gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) ); + m_widget = GTK_WIDGET(m_toolbar); + + gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE ); - gtk_widget_show( GTK_WIDGET(m_toolbar) ); + gtk_toolbar_append_space( m_toolbar ); + + m_parent->AddChild( this ); + (m_parent->m_insertCallback)( m_parent, this ); + PostCreation(); Show( TRUE ); @@ -209,12 +210,6 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, (gpointer)tool ); - // VZ: we don't want GDK_NO_EXPOSE events because for some reason our - // toolbar buttons get them (it doesn't happen in a standalone GTK+ program - // for unknown reasons) and it prevents tooltips from appearing. - gtk_widget_set_events( GTK_WIDGET(item), - gtk_widget_get_events( GTK_WIDGET(item) ) & - ~GDK_EXPOSURE_MASK); tool->m_item = item; gtk_signal_connect( GTK_OBJECT(tool->m_item), @@ -257,7 +252,7 @@ void wxToolBar::Realize() node = node->Next(); } - m_height += 10; + m_height += 12; } void wxToolBar::EnableTool(int toolIndex, bool enable) @@ -343,7 +338,7 @@ bool wxToolBar::GetToolEnabled(int toolIndex) const void wxToolBar::SetMargins( int WXUNUSED(x), int WXUNUSED(y) ) { - wxFAIL_MSG( "wxToolBar::SetMargins not implemented" ); +// wxFAIL_MSG( "wxToolBar::SetMargins not implemented" ); } void wxToolBar::SetToolPacking( int WXUNUSED(packing) )