- wxBitmap bitmap = tool->GetNormalBitmap();
-
- wxCHECK_MSG( bitmap.Ok(), FALSE,
- wxT("invalid bitmap for wxToolBar icon") );
-
- wxCHECK_MSG( bitmap.GetBitmap() == NULL, FALSE,
- wxT("wxToolBar doesn't support GdkBitmap") );
-
- wxCHECK_MSG( bitmap.GetPixmap() != NULL, FALSE,
- wxT("wxToolBar::Add needs a wxBitmap") );
-
- GtkWidget *tool_pixmap = (GtkWidget *)NULL;
-
- GdkPixmap *pixmap = bitmap.GetPixmap();
-
- GdkBitmap *mask = (GdkBitmap *)NULL;
- if ( bitmap.GetMask() )
- mask = bitmap.GetMask()->GetBitmap();
-
- tool_pixmap = gtk_pixmap_new( pixmap, mask );
-#if (GTK_MINOR_VERSION > 0)
- gtk_pixmap_set_build_insensitive( GTK_PIXMAP(tool_pixmap), TRUE );
-#endif
-
- gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 );
+ if ( !HasFlag(wxTB_NOICONS) )
+ {
+ wxBitmap bitmap = tool->GetNormalBitmap();
+
+ wxCHECK_MSG( bitmap.Ok(), FALSE,
+ wxT("invalid bitmap for wxToolBar icon") );
+
+ wxCHECK_MSG( bitmap.GetBitmap() == NULL, FALSE,
+ wxT("wxToolBar doesn't support GdkBitmap") );