+ // create either a standard button with text label (which may still contain
+ // an image under GTK+ 2.6+) or a bitmap-only button if we don't have any
+ // label
+ const bool
+ useLabel = !(style & wxBU_NOTEXT) && (!label.empty() || wxIsStockID(id));
+ if ( useLabel )
+ {
+ m_widget = gtk_button_new_with_mnemonic("");
+ }
+ else // no label, suppose we will have a bitmap
+ {
+ m_widget = gtk_button_new();
+
+ GtkWidget *image = gtk_image_new();
+ gtk_widget_show(image);
+ gtk_container_add(GTK_CONTAINER(m_widget), image);
+ }
+
+ g_object_ref(m_widget);