]> Pileus Git - ~andy/gtk/commitdiff
The commit to the stable branch is on its way...
authorFederico Mena Quintero <federico@nuclecu.unam.mx>
Tue, 12 May 1998 03:15:45 +0000 (03:15 +0000)
committerArturo Espinosa <unammx@src.gnome.org>
Tue, 12 May 1998 03:15:45 +0000 (03:15 +0000)
1998-05-11  Federico Mena Quintero  <federico@nuclecu.unam.mx>

* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.

* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.

* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.

* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcolorsel.c
gtk/gtkpreview.c
gtk/testgtk.c
tests/testgtk.c

index e39d58e369c9c983ad352f6d7469859a1029cd06..436a62d97788cae3d2552ec2664bc551a00e4b16 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+1998-05-11  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkpreview.c (gtk_preview_realize): Create the window using
+       GtkPreview's visual and colormap, otherwise things can BadMatch.
+
+       * gtk/testgtk.c (create_color_preview): 
+       (create_gray_preview): Removed pushing/popping of visual/colormap
+       now that GtkPreview does things correctly.
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame): 
+       (gtk_color_selection_draw_wheel): Pick the style from the correct
+       place (the colorsel->wheel_area widget) so that the GCs will match
+       with where we are going to paint to.
+
+       * gtk/testgtk.c (create_color_selection): Removed pushing/popping
+       of visual/colormap now that GtkColorSelection does things the
+       right way.
+
 Mon May 11 21:04:51 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
index e39d58e369c9c983ad352f6d7469859a1029cd06..436a62d97788cae3d2552ec2664bc551a00e4b16 100644 (file)
@@ -1,3 +1,21 @@
+1998-05-11  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkpreview.c (gtk_preview_realize): Create the window using
+       GtkPreview's visual and colormap, otherwise things can BadMatch.
+
+       * gtk/testgtk.c (create_color_preview): 
+       (create_gray_preview): Removed pushing/popping of visual/colormap
+       now that GtkPreview does things correctly.
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame): 
+       (gtk_color_selection_draw_wheel): Pick the style from the correct
+       place (the colorsel->wheel_area widget) so that the GCs will match
+       with where we are going to paint to.
+
+       * gtk/testgtk.c (create_color_selection): Removed pushing/popping
+       of visual/colormap now that GtkColorSelection does things the
+       right way.
+
 Mon May 11 21:04:51 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
index e39d58e369c9c983ad352f6d7469859a1029cd06..436a62d97788cae3d2552ec2664bc551a00e4b16 100644 (file)
@@ -1,3 +1,21 @@
+1998-05-11  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkpreview.c (gtk_preview_realize): Create the window using
+       GtkPreview's visual and colormap, otherwise things can BadMatch.
+
+       * gtk/testgtk.c (create_color_preview): 
+       (create_gray_preview): Removed pushing/popping of visual/colormap
+       now that GtkPreview does things correctly.
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame): 
+       (gtk_color_selection_draw_wheel): Pick the style from the correct
+       place (the colorsel->wheel_area widget) so that the GCs will match
+       with where we are going to paint to.
+
+       * gtk/testgtk.c (create_color_selection): Removed pushing/popping
+       of visual/colormap now that GtkColorSelection does things the
+       right way.
+
 Mon May 11 21:04:51 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
index e39d58e369c9c983ad352f6d7469859a1029cd06..436a62d97788cae3d2552ec2664bc551a00e4b16 100644 (file)
@@ -1,3 +1,21 @@
+1998-05-11  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkpreview.c (gtk_preview_realize): Create the window using
+       GtkPreview's visual and colormap, otherwise things can BadMatch.
+
+       * gtk/testgtk.c (create_color_preview): 
+       (create_gray_preview): Removed pushing/popping of visual/colormap
+       now that GtkPreview does things correctly.
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame): 
+       (gtk_color_selection_draw_wheel): Pick the style from the correct
+       place (the colorsel->wheel_area widget) so that the GCs will match
+       with where we are going to paint to.
+
+       * gtk/testgtk.c (create_color_selection): Removed pushing/popping
+       of visual/colormap now that GtkColorSelection does things the
+       right way.
+
 Mon May 11 21:04:51 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
index e39d58e369c9c983ad352f6d7469859a1029cd06..436a62d97788cae3d2552ec2664bc551a00e4b16 100644 (file)
@@ -1,3 +1,21 @@
+1998-05-11  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkpreview.c (gtk_preview_realize): Create the window using
+       GtkPreview's visual and colormap, otherwise things can BadMatch.
+
+       * gtk/testgtk.c (create_color_preview): 
+       (create_gray_preview): Removed pushing/popping of visual/colormap
+       now that GtkPreview does things correctly.
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame): 
+       (gtk_color_selection_draw_wheel): Pick the style from the correct
+       place (the colorsel->wheel_area widget) so that the GCs will match
+       with where we are going to paint to.
+
+       * gtk/testgtk.c (create_color_selection): Removed pushing/popping
+       of visual/colormap now that GtkColorSelection does things the
+       right way.
+
 Mon May 11 21:04:51 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
index e39d58e369c9c983ad352f6d7469859a1029cd06..436a62d97788cae3d2552ec2664bc551a00e4b16 100644 (file)
@@ -1,3 +1,21 @@
+1998-05-11  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkpreview.c (gtk_preview_realize): Create the window using
+       GtkPreview's visual and colormap, otherwise things can BadMatch.
+
+       * gtk/testgtk.c (create_color_preview): 
+       (create_gray_preview): Removed pushing/popping of visual/colormap
+       now that GtkPreview does things correctly.
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame): 
+       (gtk_color_selection_draw_wheel): Pick the style from the correct
+       place (the colorsel->wheel_area widget) so that the GCs will match
+       with where we are going to paint to.
+
+       * gtk/testgtk.c (create_color_selection): Removed pushing/popping
+       of visual/colormap now that GtkColorSelection does things the
+       right way.
+
 Mon May 11 21:04:51 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
index e39d58e369c9c983ad352f6d7469859a1029cd06..436a62d97788cae3d2552ec2664bc551a00e4b16 100644 (file)
@@ -1,3 +1,21 @@
+1998-05-11  Federico Mena Quintero  <federico@nuclecu.unam.mx>
+
+       * gtk/gtkpreview.c (gtk_preview_realize): Create the window using
+       GtkPreview's visual and colormap, otherwise things can BadMatch.
+
+       * gtk/testgtk.c (create_color_preview): 
+       (create_gray_preview): Removed pushing/popping of visual/colormap
+       now that GtkPreview does things correctly.
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame): 
+       (gtk_color_selection_draw_wheel): Pick the style from the correct
+       place (the colorsel->wheel_area widget) so that the GCs will match
+       with where we are going to paint to.
+
+       * gtk/testgtk.c (create_color_selection): Removed pushing/popping
+       of visual/colormap now that GtkColorSelection does things the
+       right way.
+
 Mon May 11 21:04:51 1998  Owen Taylor  <otaylor@gtk.org>
 
        * gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
index 33f7a12526ab715bc3c6eef712fbf5541199d3c5..6e76fd780887f7c590f40392d641e4b79716b0c5 100644 (file)
@@ -1152,7 +1152,7 @@ gtk_color_selection_draw_wheel_frame (GtkColorSelection *colorsel)
   GtkStyle *style;
   gint w, h;
 
-  style = gtk_widget_get_style (GTK_WIDGET (colorsel));
+  style = gtk_widget_get_style (colorsel->wheel_area);
 
   w = colorsel->wheel_area->allocation.width;
   h = colorsel->wheel_area->allocation.height;
@@ -1175,7 +1175,7 @@ gtk_color_selection_draw_wheel (GtkColorSelection *colorsel,
   gint x, y, i, wid, heig, n;
   gdouble cx, cy, h, s, c[3];
   guchar bg[3];
-  GtkStyle *style = gtk_widget_get_style (GTK_WIDGET (colorsel));
+  GtkStyle *style = gtk_widget_get_style (colorsel->wheel_area);
 
   wid = colorsel->wheel_area->allocation.width;
   heig = colorsel->wheel_area->allocation.height;
index 07d96155d8fd91bfad188608c39a6713ec392d9c..3f07ca22a048c80e9f1d7a5b2c7b3bf242a7a875 100644 (file)
@@ -736,8 +736,8 @@ gtk_preview_realize (GtkWidget *widget)
   attributes.width = widget->allocation.width;
   attributes.height = widget->allocation.height;
   attributes.wclass = GDK_INPUT_OUTPUT;
-  attributes.visual = gtk_widget_get_visual (widget);
-  attributes.colormap = gtk_widget_get_colormap (widget);
+  attributes.visual = preview_class->info.visual;
+  attributes.colormap = preview_class->info.cmap;
   attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
   attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
 
index 5e50642e95f4af2f1694d1a4aaeddb54857e18b0..4ed3a25eb35ec5fd462cc77d10e41165e1e654ce 100644 (file)
@@ -4223,10 +4223,6 @@ create_color_selection (void)
 
   if (!window)
     {
-      gtk_preview_set_install_cmap (TRUE);
-      gtk_widget_push_visual (gtk_preview_get_visual ());
-      gtk_widget_push_colormap (gtk_preview_get_cmap ());
-
       window = gtk_color_selection_dialog_new ("color selection dialog");
 
       gtk_color_selection_set_opacity (
@@ -4260,9 +4256,6 @@ create_color_selection (void)
        "clicked",
        GTK_SIGNAL_FUNC(gtk_widget_destroy),
        GTK_OBJECT (window));
-
-      gtk_widget_pop_colormap ();
-      gtk_widget_pop_visual ();
     }
 
   if (!GTK_WIDGET_VISIBLE (window))
@@ -5725,9 +5718,6 @@ create_color_preview (void)
 
   if (!window)
     {
-      gtk_widget_push_visual (gtk_preview_get_visual ());
-      gtk_widget_push_colormap (gtk_preview_get_cmap ());
-
       window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 
       gtk_signal_connect (GTK_OBJECT (window), "destroy",
@@ -5756,9 +5746,6 @@ create_color_preview (void)
        }
 
       color_idle = gtk_idle_add ((GtkFunction) color_idle_func, preview);
-
-      gtk_widget_pop_colormap ();
-      gtk_widget_pop_visual ();
     }
 
   if (!GTK_WIDGET_VISIBLE (window))
@@ -5815,9 +5802,6 @@ create_gray_preview (void)
 
   if (!window)
     {
-      gtk_widget_push_visual (gtk_preview_get_visual ());
-      gtk_widget_push_colormap (gtk_preview_get_cmap ());
-
       window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 
       gtk_signal_connect (GTK_OBJECT (window), "destroy",
@@ -5841,9 +5825,6 @@ create_gray_preview (void)
        }
 
       gray_idle = gtk_idle_add ((GtkFunction) gray_idle_func, preview);
-
-      gtk_widget_pop_colormap ();
-      gtk_widget_pop_visual ();
     }
 
   if (!GTK_WIDGET_VISIBLE (window))
index 5e50642e95f4af2f1694d1a4aaeddb54857e18b0..4ed3a25eb35ec5fd462cc77d10e41165e1e654ce 100644 (file)
@@ -4223,10 +4223,6 @@ create_color_selection (void)
 
   if (!window)
     {
-      gtk_preview_set_install_cmap (TRUE);
-      gtk_widget_push_visual (gtk_preview_get_visual ());
-      gtk_widget_push_colormap (gtk_preview_get_cmap ());
-
       window = gtk_color_selection_dialog_new ("color selection dialog");
 
       gtk_color_selection_set_opacity (
@@ -4260,9 +4256,6 @@ create_color_selection (void)
        "clicked",
        GTK_SIGNAL_FUNC(gtk_widget_destroy),
        GTK_OBJECT (window));
-
-      gtk_widget_pop_colormap ();
-      gtk_widget_pop_visual ();
     }
 
   if (!GTK_WIDGET_VISIBLE (window))
@@ -5725,9 +5718,6 @@ create_color_preview (void)
 
   if (!window)
     {
-      gtk_widget_push_visual (gtk_preview_get_visual ());
-      gtk_widget_push_colormap (gtk_preview_get_cmap ());
-
       window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 
       gtk_signal_connect (GTK_OBJECT (window), "destroy",
@@ -5756,9 +5746,6 @@ create_color_preview (void)
        }
 
       color_idle = gtk_idle_add ((GtkFunction) color_idle_func, preview);
-
-      gtk_widget_pop_colormap ();
-      gtk_widget_pop_visual ();
     }
 
   if (!GTK_WIDGET_VISIBLE (window))
@@ -5815,9 +5802,6 @@ create_gray_preview (void)
 
   if (!window)
     {
-      gtk_widget_push_visual (gtk_preview_get_visual ());
-      gtk_widget_push_colormap (gtk_preview_get_cmap ());
-
       window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 
       gtk_signal_connect (GTK_OBJECT (window), "destroy",
@@ -5841,9 +5825,6 @@ create_gray_preview (void)
        }
 
       gray_idle = gtk_idle_add ((GtkFunction) gray_idle_func, preview);
-
-      gtk_widget_pop_colormap ();
-      gtk_widget_pop_visual ();
     }
 
   if (!GTK_WIDGET_VISIBLE (window))