if ( style & wxTB_TEXT )
{
- *gtkStyle = style & wxTB_NOICONS ? GTK_TOOLBAR_TEXT : GTK_TOOLBAR_BOTH;
+ *gtkStyle = style & wxTB_NOICONS
+ ? GTK_TOOLBAR_TEXT
+ : (
+#ifdef __WXGTK20__
+ style & wxTB_HORZ_LAYOUT ? GTK_TOOLBAR_BOTH_HORIZ :
+#endif // __WXGTK20__
+ GTK_TOOLBAR_BOTH);
}
else // no text, hence we must have the icons or what would we show?
{
#ifdef __WXGTK20__
m_toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
GtkSetStyle();
-
+
// Doesn't work this way.
// GtkToolbarSpaceStyle space_style = GTK_TOOLBAR_SPACE_EMPTY;
// gtk_widget_style_set (GTK_WIDGET (m_toolbar), "space_style", &space_style, NULL);
g_style->bg[GTK_STATE_NORMAL] = *m_bg;
-#ifndef __WXGTK20__
- SET_STYLE_FONT(g_style, GtkGetDefaultGuiFont());
-#endif
-
gtk_widget_set_style( GTK_TOOLBAR(m_toolbar)->tooltips->tip_window, g_style );
m_parent->DoAddChild( this );
return FALSE;
}
-
+
gtk_signal_connect( GTK_OBJECT(tool->m_item),
"enter_notify_event",
GTK_SIGNAL_FUNC(gtk_toolbar_tool_callback),
}
}
- UpdateWindowUI();
+ if (wxUpdateUIEvent::CanUpdate(this))
+ UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
}
#endif // wxUSE_TOOLBAR_NATIVE