Commit 1bc5055b authored by Sven Neumann's avatar Sven Neumann

Use a correct gc in (about_dialog_logo_load) the way quartic showed

it in splash_logo_load.

--Sven
parent 2ca0fa31
Fri Feb 27 23:02:10 MET 1998 Sven Neumann (sven@gimp.org)
* app/about_dialog.c: (about_dialog_load_logo)
use a correct gc
1998-02-26 Federico Mena Quintero <federico@nuclecu.unam.mx> 1998-02-26 Federico Mena Quintero <federico@nuclecu.unam.mx>
* app/app_procs.c (make_initialization_status_window): Push/pop * app/app_procs.c (make_initialization_status_window): Push/pop
......
...@@ -246,6 +246,7 @@ static int ...@@ -246,6 +246,7 @@ static int
about_dialog_load_logo (GtkWidget *window) about_dialog_load_logo (GtkWidget *window)
{ {
GtkWidget *preview; GtkWidget *preview;
GdkGC *gc;
char buf[1024]; char buf[1024];
unsigned char *pixelrow; unsigned char *pixelrow;
FILE *fp; FILE *fp;
...@@ -298,12 +299,15 @@ about_dialog_load_logo (GtkWidget *window) ...@@ -298,12 +299,15 @@ about_dialog_load_logo (GtkWidget *window)
} }
gtk_widget_realize (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), gtk_preview_put (GTK_PREVIEW (preview),
logo_pixmap, window->style->black_gc, logo_pixmap, gc,
0, 0, 0, 0, logo_width, logo_height); 0, 0, 0, 0, logo_width, logo_height);
gdk_gc_destroy (gc);
gtk_widget_destroy (preview); gtk_widget_unref (preview);
g_free (pixelrow); g_free (pixelrow);
fclose (fp); fclose (fp);
...@@ -488,3 +492,12 @@ about_dialog_timer (gpointer data) ...@@ -488,3 +492,12 @@ about_dialog_timer (gpointer data)
return return_val; return return_val;
} }
...@@ -246,6 +246,7 @@ static int ...@@ -246,6 +246,7 @@ static int
about_dialog_load_logo (GtkWidget *window) about_dialog_load_logo (GtkWidget *window)
{ {
GtkWidget *preview; GtkWidget *preview;
GdkGC *gc;
char buf[1024]; char buf[1024];
unsigned char *pixelrow; unsigned char *pixelrow;
FILE *fp; FILE *fp;
...@@ -298,12 +299,15 @@ about_dialog_load_logo (GtkWidget *window) ...@@ -298,12 +299,15 @@ about_dialog_load_logo (GtkWidget *window)
} }
gtk_widget_realize (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), gtk_preview_put (GTK_PREVIEW (preview),
logo_pixmap, window->style->black_gc, logo_pixmap, gc,
0, 0, 0, 0, logo_width, logo_height); 0, 0, 0, 0, logo_width, logo_height);
gdk_gc_destroy (gc);
gtk_widget_destroy (preview); gtk_widget_unref (preview);
g_free (pixelrow); g_free (pixelrow);
fclose (fp); fclose (fp);
...@@ -488,3 +492,12 @@ about_dialog_timer (gpointer data) ...@@ -488,3 +492,12 @@ about_dialog_timer (gpointer data)
return return_val; return return_val;
} }
...@@ -246,6 +246,7 @@ static int ...@@ -246,6 +246,7 @@ static int
about_dialog_load_logo (GtkWidget *window) about_dialog_load_logo (GtkWidget *window)
{ {
GtkWidget *preview; GtkWidget *preview;
GdkGC *gc;
char buf[1024]; char buf[1024];
unsigned char *pixelrow; unsigned char *pixelrow;
FILE *fp; FILE *fp;
...@@ -298,12 +299,15 @@ about_dialog_load_logo (GtkWidget *window) ...@@ -298,12 +299,15 @@ about_dialog_load_logo (GtkWidget *window)
} }
gtk_widget_realize (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), gtk_preview_put (GTK_PREVIEW (preview),
logo_pixmap, window->style->black_gc, logo_pixmap, gc,
0, 0, 0, 0, logo_width, logo_height); 0, 0, 0, 0, logo_width, logo_height);
gdk_gc_destroy (gc);
gtk_widget_destroy (preview); gtk_widget_unref (preview);
g_free (pixelrow); g_free (pixelrow);
fclose (fp); fclose (fp);
...@@ -488,3 +492,12 @@ about_dialog_timer (gpointer data) ...@@ -488,3 +492,12 @@ about_dialog_timer (gpointer data)
return return_val; return return_val;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment