]> Pileus Git - ~andy/gtk/commitdiff
Pushing and popping the visual/cmap in the init() function does no good,
authorOwen Taylor <otaylor@redhat.com>
Thu, 21 Jan 1999 17:27:23 +0000 (17:27 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 21 Jan 1999 17:27:23 +0000 (17:27 +0000)
Thu Jan 21 12:20:51 1999  Owen Taylor  <otaylor@redhat.com>

* gtk/gtkcolorsel.c (gtk_color_selection_dialog_new):
Pushing and popping the visual/cmap in the init()
function does no good, because the window itself needs
to be create with that visual/cmap.

So do it in the new() function instead.

This will require people doing gtk_widget_new() to do
the push/pop themselves, but I don't see any way around
it other than digging in and tweaking the window
widget's colormap and visual ourselves, which
is highly non-kosher, but would be safe...

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

index 9026118ce31c6f313f8513fccf251defce986a9b..a573395553abb6f971ecbd9d50145ff6ffb80569 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Thu Jan 21 12:20:51 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_dialog_new): 
+       Pushing and popping the visual/cmap in the init() 
+       function does no good, because the window itself needs
+       to be create with that visual/cmap.
+
+       So do it in the new() function instead. 
+
+       This will require people doing gtk_widget_new() to do 
+       the push/pop themselves, but I don't see any way around
+       it other than digging in and tweaking the window
+       widget's colormap and visual ourselves, which
+       is highly non-kosher, but would be safe...
+
 Thu Jan 21 16:04:35 1999  Timur Bakeyev <mc@bat.ru>
 
        * gtk/gtkrc.c (gtk_rc_init): It was reported by Owen Taylor 
index 9026118ce31c6f313f8513fccf251defce986a9b..a573395553abb6f971ecbd9d50145ff6ffb80569 100644 (file)
@@ -1,3 +1,18 @@
+Thu Jan 21 12:20:51 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_dialog_new): 
+       Pushing and popping the visual/cmap in the init() 
+       function does no good, because the window itself needs
+       to be create with that visual/cmap.
+
+       So do it in the new() function instead. 
+
+       This will require people doing gtk_widget_new() to do 
+       the push/pop themselves, but I don't see any way around
+       it other than digging in and tweaking the window
+       widget's colormap and visual ourselves, which
+       is highly non-kosher, but would be safe...
+
 Thu Jan 21 16:04:35 1999  Timur Bakeyev <mc@bat.ru>
 
        * gtk/gtkrc.c (gtk_rc_init): It was reported by Owen Taylor 
index 9026118ce31c6f313f8513fccf251defce986a9b..a573395553abb6f971ecbd9d50145ff6ffb80569 100644 (file)
@@ -1,3 +1,18 @@
+Thu Jan 21 12:20:51 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_dialog_new): 
+       Pushing and popping the visual/cmap in the init() 
+       function does no good, because the window itself needs
+       to be create with that visual/cmap.
+
+       So do it in the new() function instead. 
+
+       This will require people doing gtk_widget_new() to do 
+       the push/pop themselves, but I don't see any way around
+       it other than digging in and tweaking the window
+       widget's colormap and visual ourselves, which
+       is highly non-kosher, but would be safe...
+
 Thu Jan 21 16:04:35 1999  Timur Bakeyev <mc@bat.ru>
 
        * gtk/gtkrc.c (gtk_rc_init): It was reported by Owen Taylor 
index 9026118ce31c6f313f8513fccf251defce986a9b..a573395553abb6f971ecbd9d50145ff6ffb80569 100644 (file)
@@ -1,3 +1,18 @@
+Thu Jan 21 12:20:51 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_dialog_new): 
+       Pushing and popping the visual/cmap in the init() 
+       function does no good, because the window itself needs
+       to be create with that visual/cmap.
+
+       So do it in the new() function instead. 
+
+       This will require people doing gtk_widget_new() to do 
+       the push/pop themselves, but I don't see any way around
+       it other than digging in and tweaking the window
+       widget's colormap and visual ourselves, which
+       is highly non-kosher, but would be safe...
+
 Thu Jan 21 16:04:35 1999  Timur Bakeyev <mc@bat.ru>
 
        * gtk/gtkrc.c (gtk_rc_init): It was reported by Owen Taylor 
index 9026118ce31c6f313f8513fccf251defce986a9b..a573395553abb6f971ecbd9d50145ff6ffb80569 100644 (file)
@@ -1,3 +1,18 @@
+Thu Jan 21 12:20:51 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_dialog_new): 
+       Pushing and popping the visual/cmap in the init() 
+       function does no good, because the window itself needs
+       to be create with that visual/cmap.
+
+       So do it in the new() function instead. 
+
+       This will require people doing gtk_widget_new() to do 
+       the push/pop themselves, but I don't see any way around
+       it other than digging in and tweaking the window
+       widget's colormap and visual ourselves, which
+       is highly non-kosher, but would be safe...
+
 Thu Jan 21 16:04:35 1999  Timur Bakeyev <mc@bat.ru>
 
        * gtk/gtkrc.c (gtk_rc_init): It was reported by Owen Taylor 
index 9026118ce31c6f313f8513fccf251defce986a9b..a573395553abb6f971ecbd9d50145ff6ffb80569 100644 (file)
@@ -1,3 +1,18 @@
+Thu Jan 21 12:20:51 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_dialog_new): 
+       Pushing and popping the visual/cmap in the init() 
+       function does no good, because the window itself needs
+       to be create with that visual/cmap.
+
+       So do it in the new() function instead. 
+
+       This will require people doing gtk_widget_new() to do 
+       the push/pop themselves, but I don't see any way around
+       it other than digging in and tweaking the window
+       widget's colormap and visual ourselves, which
+       is highly non-kosher, but would be safe...
+
 Thu Jan 21 16:04:35 1999  Timur Bakeyev <mc@bat.ru>
 
        * gtk/gtkrc.c (gtk_rc_init): It was reported by Owen Taylor 
index 9026118ce31c6f313f8513fccf251defce986a9b..a573395553abb6f971ecbd9d50145ff6ffb80569 100644 (file)
@@ -1,3 +1,18 @@
+Thu Jan 21 12:20:51 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkcolorsel.c (gtk_color_selection_dialog_new): 
+       Pushing and popping the visual/cmap in the init() 
+       function does no good, because the window itself needs
+       to be create with that visual/cmap.
+
+       So do it in the new() function instead. 
+
+       This will require people doing gtk_widget_new() to do 
+       the push/pop themselves, but I don't see any way around
+       it other than digging in and tweaking the window
+       widget's colormap and visual ourselves, which
+       is highly non-kosher, but would be safe...
+
 Thu Jan 21 16:04:35 1999  Timur Bakeyev <mc@bat.ru>
 
        * gtk/gtkrc.c (gtk_rc_init): It was reported by Owen Taylor 
index 3f53327decebdfd8f693bff98d3aec3a3ed56ede..5c031d1ebfee4afa23455f9c426a5d8376849837 100644 (file)
@@ -1614,9 +1614,6 @@ gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag)
 {
   GtkWidget *action_area, *frame;
 
-  gtk_widget_push_visual (gdk_rgb_get_visual ());
-  gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-
   colorseldiag->main_vbox = gtk_vbox_new (FALSE, 10);
   gtk_container_set_border_width (GTK_CONTAINER (colorseldiag), 10);
   gtk_container_add (GTK_CONTAINER (colorseldiag), colorseldiag->main_vbox);
@@ -1652,9 +1649,6 @@ gtk_color_selection_dialog_init (GtkColorSelectionDialog *colorseldiag)
   GTK_WIDGET_SET_FLAGS (colorseldiag->help_button, GTK_CAN_DEFAULT);
   gtk_box_pack_start (GTK_BOX (action_area), colorseldiag->help_button, TRUE, TRUE, 0);
   gtk_widget_show (colorseldiag->help_button);
-
-  gtk_widget_pop_colormap ();
-  gtk_widget_pop_visual ();
 }
 
 GtkWidget *
@@ -1662,8 +1656,14 @@ gtk_color_selection_dialog_new (const gchar *title)
 {
   GtkColorSelectionDialog *colorseldiag;
 
+  gtk_widget_push_visual (gdk_rgb_get_visual ());
+  gtk_widget_push_colormap (gdk_rgb_get_cmap ());
+
   colorseldiag = gtk_type_new (gtk_color_selection_dialog_get_type ());
   gtk_window_set_title (GTK_WINDOW (colorseldiag), title);
 
+  gtk_widget_pop_colormap ();
+  gtk_widget_pop_visual ();
+
   return GTK_WIDGET (colorseldiag);
 }