From 0a411980ef8a319e102f5d3cf9a3d351994c8f97 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 6 Jan 1999 00:41:04 +0000 Subject: [PATCH] Push GdkRGB's visual and colormap around the color selection dialog so Tue Jan 5 19:01:18 1999 Owen Taylor * gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push GdkRGB's visual and colormap around the color selection dialog so that the window and the previews have the same colormap. If an app adds things to the colorsel dialog, it will have to take care of them itself. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gdk/gdktypes.h | 3 ++- gtk/gtkcolorsel.c | 6 ++++++ 9 files changed, 64 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 051eedb289..19ab446c7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Jan 5 19:01:18 1999 Owen Taylor + + * gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push + GdkRGB's visual and colormap around the color selection + dialog so that the window and the previews have the + same colormap. If an app adds things to the colorsel + dialog, it will have to take care of them itself. + Tue Jan 5 15:03:47 1999 Owen Taylor * gtk/gtkmain.c (gtk_propagate_event): Make diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 051eedb289..19ab446c7e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Tue Jan 5 19:01:18 1999 Owen Taylor + + * gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push + GdkRGB's visual and colormap around the color selection + dialog so that the window and the previews have the + same colormap. If an app adds things to the colorsel + dialog, it will have to take care of them itself. + Tue Jan 5 15:03:47 1999 Owen Taylor * gtk/gtkmain.c (gtk_propagate_event): Make diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 051eedb289..19ab446c7e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Tue Jan 5 19:01:18 1999 Owen Taylor + + * gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push + GdkRGB's visual and colormap around the color selection + dialog so that the window and the previews have the + same colormap. If an app adds things to the colorsel + dialog, it will have to take care of them itself. + Tue Jan 5 15:03:47 1999 Owen Taylor * gtk/gtkmain.c (gtk_propagate_event): Make diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 051eedb289..19ab446c7e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Tue Jan 5 19:01:18 1999 Owen Taylor + + * gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push + GdkRGB's visual and colormap around the color selection + dialog so that the window and the previews have the + same colormap. If an app adds things to the colorsel + dialog, it will have to take care of them itself. + Tue Jan 5 15:03:47 1999 Owen Taylor * gtk/gtkmain.c (gtk_propagate_event): Make diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 051eedb289..19ab446c7e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Tue Jan 5 19:01:18 1999 Owen Taylor + + * gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push + GdkRGB's visual and colormap around the color selection + dialog so that the window and the previews have the + same colormap. If an app adds things to the colorsel + dialog, it will have to take care of them itself. + Tue Jan 5 15:03:47 1999 Owen Taylor * gtk/gtkmain.c (gtk_propagate_event): Make diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 051eedb289..19ab446c7e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Tue Jan 5 19:01:18 1999 Owen Taylor + + * gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push + GdkRGB's visual and colormap around the color selection + dialog so that the window and the previews have the + same colormap. If an app adds things to the colorsel + dialog, it will have to take care of them itself. + Tue Jan 5 15:03:47 1999 Owen Taylor * gtk/gtkmain.c (gtk_propagate_event): Make diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 051eedb289..19ab446c7e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Tue Jan 5 19:01:18 1999 Owen Taylor + + * gtk/gtkcolorsel.c (gtk_color_selection_dialog_init): Push + GdkRGB's visual and colormap around the color selection + dialog so that the window and the previews have the + same colormap. If an app adds things to the colorsel + dialog, it will have to take care of them itself. + Tue Jan 5 15:03:47 1999 Owen Taylor * gtk/gtkmain.c (gtk_propagate_event): Make diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h index 30088c405e..ea9fc102c9 100644 --- a/gdk/gdktypes.h +++ b/gdk/gdktypes.h @@ -734,8 +734,9 @@ typedef enum { typedef enum { GDK_DRAG_PROTO_MOTIF, GDK_DRAG_PROTO_XDND, - GDK_DRAG_PROTO_ROOTWIN /* A root window with nobody claiming + GDK_DRAG_PROTO_ROOTWIN, /* A root window with nobody claiming * drags */ + GDK_DRAG_PROTO_NONE /* Not a valid drag window */ } GdkDragProtocol; /* The color type. diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c index 8db7530baf..3f53327dec 100644 --- a/gtk/gtkcolorsel.c +++ b/gtk/gtkcolorsel.c @@ -1614,6 +1614,9 @@ 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); @@ -1649,6 +1652,9 @@ 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 *