From f327889ac4e5521cd2d63f138da44c950e087510 Mon Sep 17 00:00:00 2001 From: Christopher Blizzard Date: Mon, 19 Jun 2000 03:00:56 +0000 Subject: [PATCH] Change private class member to be named private_data throughout the file. Fri Jun 16 22:24:22 2000 Christopher Blizzard * gtk/gtkcolorsel.c: Change private class member to be named private_data throughout the file. * gtk/gtkcolorsel.h (struct _GtkColorSelection): Change private to private_data to avoid clashing with keyword. Fri Jun 16 22:24:22 2000 Christopher Blizzard * gdk/gdkdnd.h: Add comment to remove warning. --- ChangeLog | 12 +++++++ ChangeLog.pre-2-0 | 12 +++++++ ChangeLog.pre-2-10 | 12 +++++++ ChangeLog.pre-2-2 | 12 +++++++ ChangeLog.pre-2-4 | 12 +++++++ ChangeLog.pre-2-6 | 12 +++++++ ChangeLog.pre-2-8 | 12 +++++++ gdk/gdkdnd.h | 2 +- gtk/gtkcolorsel.c | 80 +++++++++++++++++++++++----------------------- gtk/gtkcolorsel.h | 4 +-- 10 files changed, 127 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index e4116608bd..cb3c157082 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gtk/gtkcolorsel.c: Change private class member to be named + private_data throughout the file. + + * gtk/gtkcolorsel.h (struct _GtkColorSelection): Change private to + private_data to avoid clashing with keyword. + +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gdk/gdkdnd.h: Add comment to remove warning. + Sun Jun 18 15:35:35 2000 Pablo Saratxaga * gtk/gtkrc.cp1251,gtk/Makefile.am: the cp1251 is also used by diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index e4116608bd..cb3c157082 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,15 @@ +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gtk/gtkcolorsel.c: Change private class member to be named + private_data throughout the file. + + * gtk/gtkcolorsel.h (struct _GtkColorSelection): Change private to + private_data to avoid clashing with keyword. + +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gdk/gdkdnd.h: Add comment to remove warning. + Sun Jun 18 15:35:35 2000 Pablo Saratxaga * gtk/gtkrc.cp1251,gtk/Makefile.am: the cp1251 is also used by diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e4116608bd..cb3c157082 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,15 @@ +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gtk/gtkcolorsel.c: Change private class member to be named + private_data throughout the file. + + * gtk/gtkcolorsel.h (struct _GtkColorSelection): Change private to + private_data to avoid clashing with keyword. + +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gdk/gdkdnd.h: Add comment to remove warning. + Sun Jun 18 15:35:35 2000 Pablo Saratxaga * gtk/gtkrc.cp1251,gtk/Makefile.am: the cp1251 is also used by diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index e4116608bd..cb3c157082 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,15 @@ +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gtk/gtkcolorsel.c: Change private class member to be named + private_data throughout the file. + + * gtk/gtkcolorsel.h (struct _GtkColorSelection): Change private to + private_data to avoid clashing with keyword. + +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gdk/gdkdnd.h: Add comment to remove warning. + Sun Jun 18 15:35:35 2000 Pablo Saratxaga * gtk/gtkrc.cp1251,gtk/Makefile.am: the cp1251 is also used by diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index e4116608bd..cb3c157082 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,15 @@ +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gtk/gtkcolorsel.c: Change private class member to be named + private_data throughout the file. + + * gtk/gtkcolorsel.h (struct _GtkColorSelection): Change private to + private_data to avoid clashing with keyword. + +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gdk/gdkdnd.h: Add comment to remove warning. + Sun Jun 18 15:35:35 2000 Pablo Saratxaga * gtk/gtkrc.cp1251,gtk/Makefile.am: the cp1251 is also used by diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index e4116608bd..cb3c157082 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,15 @@ +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gtk/gtkcolorsel.c: Change private class member to be named + private_data throughout the file. + + * gtk/gtkcolorsel.h (struct _GtkColorSelection): Change private to + private_data to avoid clashing with keyword. + +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gdk/gdkdnd.h: Add comment to remove warning. + Sun Jun 18 15:35:35 2000 Pablo Saratxaga * gtk/gtkrc.cp1251,gtk/Makefile.am: the cp1251 is also used by diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e4116608bd..cb3c157082 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,15 @@ +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gtk/gtkcolorsel.c: Change private class member to be named + private_data throughout the file. + + * gtk/gtkcolorsel.h (struct _GtkColorSelection): Change private to + private_data to avoid clashing with keyword. + +Fri Jun 16 22:24:22 2000 Christopher Blizzard + + * gdk/gdkdnd.h: Add comment to remove warning. + Sun Jun 18 15:35:35 2000 Pablo Saratxaga * gtk/gtkrc.cp1251,gtk/Makefile.am: the cp1251 is also used by diff --git a/gdk/gdkdnd.h b/gdk/gdkdnd.h index 916bd2e8e0..30f2f131f7 100644 --- a/gdk/gdkdnd.h +++ b/gdk/gdkdnd.h @@ -97,4 +97,4 @@ void gdk_drag_abort (GdkDragContext *context, } #endif /* __cplusplus */ -#endif __GDK_DND_H__ +#endif /* __GDK_DND_H__ */ diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c index d37a74073c..d292106bfa 100644 --- a/gtk/gtkcolorsel.c +++ b/gtk/gtkcolorsel.c @@ -213,7 +213,7 @@ color_sample_drag_begin (GtkWidget *widget, GdkColor bg; gint n, i; - priv = colorsel->private; + priv = colorsel->private_data; window = gtk_window_new (GTK_WINDOW_POPUP); gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE); gtk_widget_set_usize (window, 48, 32); @@ -270,7 +270,7 @@ color_sample_drop_handle (GtkWidget *widget, ColorSelectionPrivate *priv; guint16 *vals; gdouble color[4]; - priv = colorsel->private; + priv = colorsel->private_data; /* This is currently a guint16 array of the format: * R @@ -315,7 +315,7 @@ color_sample_drag_handle (GtkWidget *widget, guint16 vals[4]; gdouble *colsrc; - priv = colorsel->private; + priv = colorsel->private_data; if (widget == priv->old_sample) colsrc = priv->old_color; @@ -344,7 +344,7 @@ color_sample_draw_sample (GtkColorSelection *colorsel, int which) ColorSelectionPrivate *priv; g_return_if_fail (colorsel != NULL); - priv = colorsel->private; + priv = colorsel->private_data; g_return_if_fail (priv->sample_area != NULL); if (!GTK_WIDGET_DRAWABLE (priv->sample_area)) @@ -446,7 +446,7 @@ color_sample_setup_dnd (GtkColorSelection *colorsel, GtkWidget *sample) { "application/x-color", 0 } }; ColorSelectionPrivate *priv; - priv = colorsel->private; + priv = colorsel->private_data; gtk_drag_source_set (sample, GDK_BUTTON1_MASK | GDK_BUTTON3_MASK, @@ -490,7 +490,7 @@ color_sample_new (GtkColorSelection *colorsel) { ColorSelectionPrivate *priv; - priv = colorsel->private; + priv = colorsel->private_data; gtk_widget_push_visual(gdk_rgb_get_visual()); gtk_widget_push_colormap(gdk_rgb_get_cmap()); @@ -559,7 +559,7 @@ palette_paint (GtkWidget *drawing_area, gpointer data) { GtkColorSelection *colorsel = GTK_COLOR_SELECTION (data); - ColorSelectionPrivate *priv = colorsel->private; + ColorSelectionPrivate *priv = colorsel->private_data; if (drawing_area->window == NULL) return; @@ -606,7 +606,7 @@ palette_press (GtkWidget *drawing_area, gpointer data) { GtkColorSelection *colorsel = GTK_COLOR_SELECTION (data); - ColorSelectionPrivate *priv = colorsel->private; + ColorSelectionPrivate *priv = colorsel->private_data; if (priv->last_palette != NULL) gtk_widget_queue_clear (priv->last_palette); @@ -652,7 +652,7 @@ palette_drag_begin (GtkWidget *widget, gdouble colors[4]; GdkColor bg; - priv = colorsel->private; + priv = colorsel->private_data; window = gtk_window_new (GTK_WINDOW_POPUP); gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE); gtk_widget_set_usize (window, 48, 32); @@ -801,7 +801,7 @@ palette_activate (GtkWidget *widget, if ((event->keyval == ' ') || (event->keyval == GDK_Return)) { - priv = colorsel->private; + priv = colorsel->private_data; palette_set_color (widget, GTK_COLOR_SELECTION (data), priv->color); } @@ -886,7 +886,7 @@ grab_color_at_mouse (GtkWidget *button, XColor xcolor; #endif - priv = colorsel->private; + priv = colorsel->private_data; image = gdk_image_get (GDK_ROOT_PARENT (), x_root, y_root, 1, 1); pixel = gdk_image_get_pixel (image, 0, 0); @@ -948,7 +948,7 @@ mouse_release (GtkWidget *button, { GtkColorSelection *colorsel = data; ColorSelectionPrivate *priv; - priv = colorsel->private; + priv = colorsel->private_data; gtk_signal_disconnect_by_func (GTK_OBJECT (button), mouse_motion, data); gtk_signal_disconnect_by_func (GTK_OBJECT (button), mouse_release, data); @@ -965,7 +965,7 @@ mouse_press (GtkWidget *button, { GtkColorSelection *colorsel = data; ColorSelectionPrivate *priv; - priv = colorsel->private; + priv = colorsel->private_data; gtk_signal_connect (GTK_OBJECT (button), "motion_notify_event", mouse_motion, data); gtk_signal_connect (GTK_OBJECT (button), "button_release_event", mouse_release, data); @@ -977,7 +977,7 @@ static void get_screen_color (GtkWidget *button) { GtkColorSelection *colorsel = gtk_object_get_data (GTK_OBJECT (button), "COLORSEL"); - ColorSelectionPrivate *priv = colorsel->private; + ColorSelectionPrivate *priv = colorsel->private_data; if (picker_cursor == NULL) { @@ -1017,7 +1017,7 @@ hex_changed (GtkWidget *hex_entry, gchar *text; colorsel = GTK_COLOR_SELECTION (data); - priv = colorsel->private; + priv = colorsel->private_data; if (priv->changing) return; @@ -1047,7 +1047,7 @@ hsv_changed (GtkWidget *hsv, ColorSelectionPrivate *priv; colorsel = GTK_COLOR_SELECTION (data); - priv = colorsel->private; + priv = colorsel->private_data; if (priv->changing) return; @@ -1073,7 +1073,7 @@ adjustment_changed (GtkAdjustment *adjustment, ColorSelectionPrivate *priv; colorsel = GTK_COLOR_SELECTION (gtk_object_get_data (GTK_OBJECT (adjustment), "COLORSEL")); - priv = colorsel->private; + priv = colorsel->private_data; if (priv->changing) return; @@ -1128,7 +1128,7 @@ opacity_entry_changed (GtkWidget *opacity_entry, gchar *text; colorsel = GTK_COLOR_SELECTION (data); - priv = colorsel->private; + priv = colorsel->private_data; if (priv->changing) return; @@ -1148,7 +1148,7 @@ widget_focus_in (GtkWidget *drawing_area, gpointer data) { GtkColorSelection *colorsel = GTK_COLOR_SELECTION (data); - ColorSelectionPrivate *priv = colorsel->private; + ColorSelectionPrivate *priv = colorsel->private_data; /* This signal is connected to by all of the widgets except the "Set Color" button * This will let you add a color to the currently selected palette @@ -1198,7 +1198,7 @@ make_palette_frame (GtkColorSelection *colorsel, GtkWidget *frame; ColorSelectionPrivate *priv; - priv = colorsel->private; + priv = colorsel->private_data; frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); priv->custom_palette[i][j] = palette_new (colorsel); @@ -1211,7 +1211,7 @@ make_palette_frame (GtkColorSelection *colorsel, static void set_selected_palette (GtkColorSelection *colorsel, int x, int y) { - ColorSelectionPrivate *priv = colorsel->private; + ColorSelectionPrivate *priv = colorsel->private_data; if (priv->last_palette != NULL) gtk_widget_queue_clear (priv->last_palette); @@ -1224,7 +1224,7 @@ set_selected_palette (GtkColorSelection *colorsel, int x, int y) static void update_color (GtkColorSelection *colorsel) { - ColorSelectionPrivate *priv = colorsel->private; + ColorSelectionPrivate *priv = colorsel->private_data; gchar entryval[12]; gchar opacity_text[32]; gchar *ptr; @@ -1280,7 +1280,7 @@ add_button_pressed (GtkWidget *button, ColorSelectionPrivate *priv; gint i, j; - priv = colorsel->private; + priv = colorsel->private_data; for (j = 0; j < GTK_CUSTOM_PALETTE_HEIGHT; j++) { @@ -1377,7 +1377,7 @@ gtk_color_selection_init (GtkColorSelection *colorsel) gint i, j; ColorSelectionPrivate *priv; - priv = colorsel->private = g_new0 (ColorSelectionPrivate, 1); + priv = colorsel->private_data = g_new0 (ColorSelectionPrivate, 1); priv->changing = FALSE; priv->default_set = FALSE; priv->last_palette = NULL; @@ -1495,10 +1495,10 @@ gtk_color_selection_destroy (GtkObject *object) { GtkColorSelection *cselection = GTK_COLOR_SELECTION (object); - if (cselection->private) + if (cselection->private_data) { - g_free (cselection->private); - cselection->private = NULL; + g_free (cselection->private_data); + cselection->private_data = NULL; } GTK_OBJECT_CLASS (parent_class)->destroy (object); @@ -1526,7 +1526,7 @@ gtk_color_selection_new (void) color[3] = 1.0; colorsel = gtk_type_new (GTK_TYPE_COLOR_SELECTION); - priv = colorsel->private; + priv = colorsel->private_data; gtk_color_selection_set_color (colorsel, color); gtk_color_selection_set_use_opacity (colorsel, FALSE); @@ -1564,7 +1564,7 @@ gtk_color_selection_get_use_opacity (GtkColorSelection *colorsel) g_return_val_if_fail (colorsel != NULL, FALSE); g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE); - priv = colorsel->private; + priv = colorsel->private_data; return priv->use_opacity; } @@ -1586,7 +1586,7 @@ gtk_color_selection_set_use_opacity (GtkColorSelection *colorsel, g_return_if_fail (colorsel != NULL); g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); - priv = colorsel->private; + priv = colorsel->private_data; use_opacity = use_opacity != FALSE; if (priv->use_opacity != use_opacity) @@ -1623,7 +1623,7 @@ gtk_color_selection_get_use_palette (GtkColorSelection *colorsel) g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE); - priv = colorsel->private; + priv = colorsel->private_data; return priv->use_palette; } @@ -1644,7 +1644,7 @@ gtk_color_selection_set_use_palette (GtkColorSelection *colorsel, g_return_if_fail (colorsel != NULL); g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); - priv = colorsel->private; + priv = colorsel->private_data; use_palette = use_palette != FALSE; if (priv->use_palette != use_palette) @@ -1676,7 +1676,7 @@ gtk_color_selection_set_color (GtkColorSelection *colorsel, g_return_if_fail (colorsel != NULL); g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); - priv = colorsel->private; + priv = colorsel->private_data; priv->changing = TRUE; priv->color[COLORSEL_RED] = color[0]; priv->color[COLORSEL_GREEN] = color[1]; @@ -1714,7 +1714,7 @@ gtk_color_selection_get_color (GtkColorSelection *colorsel, g_return_if_fail (colorsel != NULL); g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); - priv = colorsel->private; + priv = colorsel->private_data; color[0] = priv->color[COLORSEL_RED]; color[1] = priv->color[COLORSEL_GREEN]; color[2] = priv->color[COLORSEL_BLUE]; @@ -1741,7 +1741,7 @@ gtk_color_selection_set_old_color (GtkColorSelection *colorsel, g_return_if_fail (colorsel != NULL); g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); - priv = colorsel->private; + priv = colorsel->private_data; priv->changing = TRUE; priv->old_color[COLORSEL_RED] = color[0]; priv->old_color[COLORSEL_GREEN] = color[1]; @@ -1774,7 +1774,7 @@ gtk_color_selection_get_old_color (GtkColorSelection *colorsel, g_return_if_fail (colorsel != NULL); g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); - priv = colorsel->private; + priv = colorsel->private_data; color[0] = priv->old_color[COLORSEL_RED]; color[1] = priv->old_color[COLORSEL_GREEN]; color[2] = priv->old_color[COLORSEL_BLUE]; @@ -1803,7 +1803,7 @@ gtk_color_selection_set_palette_color (GtkColorSelection *colorsel, g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); g_return_if_fail (x >= 0 && y >= 0 && x < GTK_CUSTOM_PALETTE_WIDTH && y < GTK_CUSTOM_PALETTE_HEIGHT); - priv = colorsel->private; + priv = colorsel->private_data; palette_set_color (priv->custom_palette[x][y], colorsel, color); } @@ -1832,7 +1832,7 @@ gtk_color_selection_get_palette_color (GtkColorSelection *colorsel, g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE); g_return_val_if_fail (x >= 0 && y >= 0 && x < GTK_CUSTOM_PALETTE_WIDTH && y < GTK_CUSTOM_PALETTE_HEIGHT, FALSE); - priv = colorsel->private; + priv = colorsel->private_data; if (GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (priv->custom_palette[x][y]), "color_set")) == 0) return FALSE; @@ -1861,7 +1861,7 @@ gtk_color_selection_unset_palette_color (GtkColorSelection *colorsel, g_return_if_fail (GTK_IS_COLOR_SELECTION (colorsel)); g_return_if_fail (x >= 0 && y >= 0 && x < GTK_CUSTOM_PALETTE_WIDTH && y < GTK_CUSTOM_PALETTE_HEIGHT); - priv = colorsel->private; + priv = colorsel->private_data; palette_unset_color (priv->custom_palette[x][y]); } @@ -1882,7 +1882,7 @@ gtk_color_selection_is_adjusting (GtkColorSelection *colorsel) g_return_val_if_fail (colorsel != NULL, FALSE); g_return_val_if_fail (GTK_IS_COLOR_SELECTION (colorsel), FALSE); - priv = colorsel->private; + priv = colorsel->private_data; return (gtk_hsv_is_adjusting (GTK_HSV (priv->triangle_colorsel))); } diff --git a/gtk/gtkcolorsel.h b/gtk/gtkcolorsel.h index 00104463f5..f2b4de6eab 100644 --- a/gtk/gtkcolorsel.h +++ b/gtk/gtkcolorsel.h @@ -55,8 +55,8 @@ struct _GtkColorSelection { GtkVBox parent_instance; - /* < private > */ - gpointer private; + /* < private_data > */ + gpointer private_data; }; struct _GtkColorSelectionClass