- GtkWidget *close_button = gtk_button_new_with_label( "x" );
-
- gtk_myfixed_put( GTK_MYFIXED(m_mainWidget), close_button, 4, 4 );
- gtk_widget_set_usize( close_button, 12, 11 );
-
- gtk_widget_show( close_button );
-
- gtk_signal_connect( GTK_OBJECT(close_button), "clicked",
- GTK_SIGNAL_FUNC(gtk_button_clicked_callback), (gpointer*)this );
-
+ if (m_parent && (GTK_IS_WINDOW(m_parent->m_widget)))
+ {
+ gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );
+ }
+
+ if ((style & wxSYSTEM_MENU) &&
+ ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)))
+ {
+ GdkBitmap *mask = (GdkBitmap*) NULL;
+ GdkPixmap *pixmap = gdk_pixmap_create_from_xpm_d
+ (
+ wxGetRootWindow()->window,
+ &mask,
+ NULL,
+ (char **)cross_xpm
+ );
+
+ GtkWidget *pw = gtk_pixmap_new( pixmap, mask );
+ gdk_bitmap_unref( mask );
+ gdk_pixmap_unref( pixmap );
+ gtk_widget_show( pw );
+
+ GtkWidget *close_button = gtk_button_new();
+ gtk_container_add( GTK_CONTAINER(close_button), pw );
+
+ gtk_pizza_put( GTK_PIZZA(m_mainWidget),
+ close_button,
+ size.x-16, 4, 11, 11 );
+
+ gtk_widget_show( close_button );
+
+ g_signal_connect (close_button, "clicked",
+ G_CALLBACK (gtk_button_clicked_callback),
+ this);
+ }
+