Push/pop correct visuals for drawing area creation. (splash_logo_load):

1998-02-26  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* app/app_procs.c (make_initialization_status_window): Push/pop
	correct visuals for drawing area creation.
	(splash_logo_load): Use a correct gc.
This commit is contained in:
Federico Mena Quintero 1998-02-26 23:27:12 +00:00 committed by Arturo Espinosa
parent 6fa5573dbb
commit 21533410b8
2 changed files with 20 additions and 3 deletions

View File

@ -1,3 +1,9 @@
1998-02-26 Federico Mena Quintero <federico@nuclecu.unam.mx>
* app/app_procs.c (make_initialization_status_window): Push/pop
correct visuals for drawing area creation.
(splash_logo_load): Use a correct gc.
Thu Feb 26 12:19:44 EET 1998 Lauri Alanko <la@iki.fi>
* Another patch in gimp.h to name more GParam-types for gimple.

View File

@ -164,6 +164,7 @@ static int
splash_logo_load (GtkWidget *window)
{
GtkWidget *preview;
GdkGC *gc;
char buf[1024];
unsigned char *pixelrow;
FILE *fp;
@ -215,10 +216,13 @@ splash_logo_load (GtkWidget *window)
}
gtk_widget_realize (window);
logo_pixmap = gdk_pixmap_new (window->window, logo_width, logo_height, -1);
logo_pixmap = gdk_pixmap_new (window->window, logo_width, logo_height,
gtk_preview_get_visual ()->depth);
gc = gdk_gc_new (logo_pixmap);
gtk_preview_put (GTK_PREVIEW (preview),
logo_pixmap, window->style->black_gc,
logo_pixmap, gc,
0, 0, 0, 0, logo_width, logo_height);
gdk_gc_destroy (gc);
gtk_widget_unref (preview);
g_free (pixelrow);
@ -324,7 +328,14 @@ make_initialization_status_window(void)
vbox = gtk_vbox_new(FALSE, 4);
gtk_container_add(GTK_CONTAINER(win_initstatus), vbox);
gtk_widget_push_visual (gtk_preview_get_visual ());
gtk_widget_push_colormap (gtk_preview_get_cmap ());
logo_area = gtk_drawing_area_new ();
gtk_widget_pop_colormap ();
gtk_widget_pop_visual ();
gtk_signal_connect (GTK_OBJECT (logo_area), "expose_event",
(GtkSignalFunc) splash_logo_expose, NULL);
logo_area_width = ( logo_width > LOGO_WIDTH_MIN ) ? logo_width : LOGO_WIDTH_MIN;