diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-05-22 09:05:58 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-05-22 09:09:55 -0400 |
commit | 49cf5142ba9e9542e3e848f0fc55c4fd2eaa9f7f (patch) | |
tree | 2b0794b7842a9d9fe093db0389765ad3dd89b739 /gtk | |
parent | c3a9a20839955a98266463c6fad4f0190feaccc2 (diff) | |
download | gtk+-49cf5142ba9e9542e3e848f0fc55c4fd2eaa9f7f.tar.gz |
Deprecate GdkColor
It has been replaced by GdkRGBA. Time to make it official.
http://bugzilla.gnome.org/show_bug.cgi?id=636695
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkbuilder.c | 6 | ||||
-rw-r--r-- | gtk/gtkcellrenderer.c | 2 | ||||
-rw-r--r-- | gtk/gtkcellrenderertext.c | 4 | ||||
-rw-r--r-- | gtk/gtkcellview.c | 2 | ||||
-rw-r--r-- | gtk/gtkcolorbutton.c | 2 | ||||
-rw-r--r-- | gtk/gtkcsscustomproperty.c | 4 | ||||
-rw-r--r-- | gtk/gtkcssstylefuncs.c | 7 | ||||
-rw-r--r-- | gtk/gtkiconview.c | 2 | ||||
-rw-r--r-- | gtk/gtklabel.c | 6 | ||||
-rw-r--r-- | gtk/gtkmodifierstyle.c | 4 | ||||
-rw-r--r-- | gtk/gtksettings.c | 8 | ||||
-rw-r--r-- | gtk/gtkstylecontext.c | 2 | ||||
-rw-r--r-- | gtk/gtktextattributes.c | 10 | ||||
-rw-r--r-- | gtk/gtktextbufferserialize.c | 4 | ||||
-rw-r--r-- | gtk/gtktextdisplay.c | 2 | ||||
-rw-r--r-- | gtk/gtktextlayout.c | 4 | ||||
-rw-r--r-- | gtk/gtktexttag.c | 10 | ||||
-rw-r--r-- | gtk/gtktextview.c | 2 | ||||
-rw-r--r-- | gtk/gtktreeview.c | 3 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 8 | ||||
-rw-r--r-- | gtk/inspector/prop-editor.c | 4 |
21 files changed, 77 insertions, 19 deletions
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c index 165e9e5269..f6e5c52e4f 100644 --- a/gtk/gtkbuilder.c +++ b/gtk/gtkbuilder.c @@ -122,7 +122,7 @@ * as %FALSE), enumerations (can be specified by their name, nick or * integer value), flags (can be specified by their name, nick, integer * value, optionally combined with “|”, e.g. “GTK_VISIBLE|GTK_REALIZED”) - * and colors (in a format understood by gdk_color_parse()). Pixbufs can + * and colors (in a format understood by gdk_rgba_parse()). Pixbufs can * be specified as a filename of an image file to load. Objects can be * referred to by their name and by default refer to objects declared * in the local xml fragment and objects exposed via @@ -1977,10 +1977,11 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, } break; case G_TYPE_BOXED: - if (G_VALUE_HOLDS (value, GDK_TYPE_COLOR)) + if (G_VALUE_HOLDS (value, g_type_from_name ("GdkColor"))) { GdkColor color = { 0, }; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (gdk_color_parse (string, &color)) g_value_set_boxed (value, &color); else @@ -1992,6 +1993,7 @@ gtk_builder_value_from_string_type (GtkBuilder *builder, string); ret = FALSE; } +G_GNUC_END_IGNORE_DEPRECATIONS } else if (G_VALUE_HOLDS (value, GDK_TYPE_RGBA)) { diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c index 67b6909e70..d369779011 100644 --- a/gtk/gtkcellrenderer.c +++ b/gtk/gtkcellrenderer.c @@ -395,6 +395,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class) * * Deprecated: 3.4: Use #GtkCellRenderer:cell-background-rgba instead. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_object_class_install_property (object_class, PROP_CELL_BACKGROUND_GDK, g_param_spec_boxed ("cell-background-gdk", @@ -402,6 +403,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class) P_("Cell background color as a GdkColor"), GDK_TYPE_COLOR, GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); +G_GNUC_END_IGNORE_DEPRECATIONS /** * GtkCellRenderer:cell-background-rgba: * diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c index fc17b38014..6402b4be91 100644 --- a/gtk/gtkcellrenderertext.c +++ b/gtk/gtkcellrenderertext.c @@ -295,6 +295,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class) * * Deprecated: 3.4: Use #GtkCellRendererText:background-rgba instead. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_object_class_install_property (object_class, PROP_BACKGROUND_GDK, g_param_spec_boxed ("background-gdk", @@ -302,6 +303,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class) P_("Background color as a GdkColor"), GDK_TYPE_COLOR, GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); +G_GNUC_END_IGNORE_DEPRECATIONS /** * GtkCellRendererText:background-rgba: @@ -332,6 +334,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class) * * Deprecated: 3.4: Use #GtkCellRendererText:foreground-rgba instead. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_object_class_install_property (object_class, PROP_FOREGROUND_GDK, g_param_spec_boxed ("foreground-gdk", @@ -339,6 +342,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class) P_("Foreground color as a GdkColor"), GDK_TYPE_COLOR, GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); +G_GNUC_END_IGNORE_DEPRECATIONS /** * GtkCellRendererText:foreground-rgba: diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c index 5870f1031f..d554dd8940 100644 --- a/gtk/gtkcellview.c +++ b/gtk/gtkcellview.c @@ -199,6 +199,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass) * * Deprecated: 3.4: Use #GtkCellView:background-rgba instead. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_object_class_install_property (gobject_class, PROP_BACKGROUND_GDK, g_param_spec_boxed ("background-gdk", @@ -206,6 +207,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass) P_("Background color as a GdkColor"), GDK_TYPE_COLOR, GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); +G_GNUC_END_IGNORE_DEPRECATIONS /** * GtkCellView:background-rgba: * diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index 661c5c6fc3..00bbc87729 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -197,6 +197,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass) * * Deprecated: 3.4: Use #GtkColorButton:rgba instead. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_object_class_install_property (gobject_class, PROP_COLOR, g_param_spec_boxed ("color", @@ -204,6 +205,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass) P_("The selected color"), GDK_TYPE_COLOR, GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); +G_GNUC_END_IGNORE_DEPRECATIONS /** * GtkColorButton:alpha: diff --git a/gtk/gtkcsscustomproperty.c b/gtk/gtkcsscustomproperty.c index 31e516bd77..0fecddb84c 100644 --- a/gtk/gtkcsscustomproperty.c +++ b/gtk/gtkcsscustomproperty.c @@ -151,11 +151,13 @@ gtk_css_custom_property_create_initial_value (GParamSpec *pspec) gdk_rgba_parse (&color, "pink"); g_value_set_boxed (&value, &color); } - else if (pspec->value_type == GDK_TYPE_COLOR) + else if (pspec->value_type == g_type_from_name ("GdkColor")) { +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GdkColor color; gdk_color_parse ("pink", &color); g_value_set_boxed (&value, &color); +G_GNUC_END_IGNORE_DEPRECATIONS } else if (pspec->value_type == GTK_TYPE_BORDER) { diff --git a/gtk/gtkcssstylefuncs.c b/gtk/gtkcssstylefuncs.c index 9bb5406b31..8b5393a79b 100644 --- a/gtk/gtkcssstylefuncs.c +++ b/gtk/gtkcssstylefuncs.c @@ -272,7 +272,9 @@ color_value_print (const GValue *value, g_string_append (string, "none"); else { +G_GNUC_BEGIN_IGNORE_DEPRECATIONS char *s = gdk_color_to_string (color); +G_GNUC_END_IGNORE_DEPRECATIONS g_string_append (string, s); g_free (s); } @@ -976,13 +978,14 @@ gtk_css_style_funcs_init (void) rgba_value_parse, rgba_value_print, rgba_value_compute); + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + register_conversion_function (GDK_TYPE_COLOR, color_value_parse, color_value_print, color_value_compute); - G_GNUC_BEGIN_IGNORE_DEPRECATIONS; - register_conversion_function (GTK_TYPE_SYMBOLIC_COLOR, symbolic_color_value_parse, symbolic_color_value_print, diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 4cd36b912d..f428612eab 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -669,7 +669,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass) g_param_spec_boxed ("selection-box-color", P_("Selection Box Color"), P_("Color of the selection box"), - GDK_TYPE_COLOR, + g_type_from_name ("GdkColor"), GTK_PARAM_READABLE)); gtk_widget_class_install_style_property (widget_class, diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 0e722650cf..b3ed083006 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1375,9 +1375,11 @@ attribute_from_text (GtkBuilder *builder, } break; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + /* PangoAttrColor */ case PANGO_ATTR_FOREGROUND: - if (gtk_builder_value_from_string_type (builder, GDK_TYPE_COLOR, + if (gtk_builder_value_from_string_type (builder, GDK_TYPE_COLOR, value, &val, error)) { color = g_value_get_boxed (&val); @@ -1408,6 +1410,8 @@ attribute_from_text (GtkBuilder *builder, attribute = pango_attr_strikethrough_color_new (color->red, color->green, color->blue); } break; + +G_GNUC_END_IGNORE_DEPRECATIONS /* PangoAttrShape */ case PANGO_ATTR_SHAPE: diff --git a/gtk/gtkmodifierstyle.c b/gtk/gtkmodifierstyle.c index 88cd0d5905..247292f952 100644 --- a/gtk/gtkmodifierstyle.c +++ b/gtk/gtkmodifierstyle.c @@ -90,10 +90,14 @@ gtk_modifier_style_get_style_property (GtkStyleProvider *provider, GdkColor color; gchar *str; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + /* Reject non-color types for now */ if (pspec->value_type != GDK_TYPE_COLOR) return FALSE; +G_GNUC_END_IGNORE_DEPRECATIONS + priv = GTK_MODIFIER_STYLE (provider)->priv; str = g_strdup_printf ("-%s-%s", g_type_name (pspec->owner_type), diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index dd4666288f..7a70e79bce 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -1837,9 +1837,7 @@ gtk_settings_get_property (GObject *object, switch (property_id) { case PROP_COLOR_HASH: - g_value_take_boxed (value, - g_hash_table_new_full (g_str_hash, g_str_equal, - g_free, (GDestroyNotify) gdk_color_free)); + g_value_take_boxed (value, g_hash_table_new (g_str_hash, g_str_equal)); return; default: ; } @@ -1851,7 +1849,7 @@ gtk_settings_get_property (GObject *object, if ((g_value_type_transformable (G_TYPE_INT, value_type) && !(fundamental_type == G_TYPE_ENUM || fundamental_type == G_TYPE_FLAGS)) || g_value_type_transformable (G_TYPE_STRING, G_VALUE_TYPE (value)) || - g_value_type_transformable (GDK_TYPE_COLOR, G_VALUE_TYPE (value))) + g_value_type_transformable (GDK_TYPE_RGBA, G_VALUE_TYPE (value))) { if (priv->property_values[property_id - 1].source == GTK_SETTINGS_SOURCE_APPLICATION || !gdk_screen_get_setting (priv->screen, pspec->name, value)) @@ -2151,7 +2149,7 @@ settings_install_property_parser (GtkSettingsClass *class, GtkRcPropertyParser _gtk_rc_property_parser_from_type (GType type) { - if (type == GDK_TYPE_COLOR) + if (type == g_type_from_name ("GdkColor")) return gtk_rc_property_parse_color; else if (type == GTK_TYPE_REQUISITION) return gtk_rc_property_parse_requisition; diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index ebdc243585..a93b1ac8b9 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -3638,7 +3638,9 @@ get_cursor_color (GtkStyleContext *context, color->blue = style_color->blue / 65535.0; color->alpha = 1; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_color_free (style_color); +G_GNUC_END_IGNORE_DEPRECATIONS } else { diff --git a/gtk/gtktextattributes.c b/gtk/gtktextattributes.c index a5dd897eff..5998bd398c 100644 --- a/gtk/gtktextattributes.c +++ b/gtk/gtktextattributes.c @@ -128,8 +128,10 @@ gtk_text_attributes_copy_values (GtkTextAttributes *src, if (dest->font) pango_font_description_free (dest->font); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (dest->pg_bg_color) gdk_color_free (dest->pg_bg_color); +G_GNUC_END_IGNORE_DEPRECATIONS if (dest->pg_bg_rgba) gdk_rgba_free (dest->pg_bg_rgba); @@ -153,8 +155,10 @@ gtk_text_attributes_copy_values (GtkTextAttributes *src, if (src->font) dest->font = pango_font_description_copy (src->font); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (src->pg_bg_color) dest->pg_bg_color = gdk_color_copy (src->pg_bg_color); +G_GNUC_END_IGNORE_DEPRECATIONS if (src->pg_bg_rgba) dest->pg_bg_rgba = gdk_rgba_copy (src->pg_bg_rgba); @@ -209,8 +213,10 @@ gtk_text_attributes_unref (GtkTextAttributes *values) if (values->font) pango_font_description_free (values->font); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (values->pg_bg_color) gdk_color_free (values->pg_bg_color); +G_GNUC_END_IGNORE_DEPRECATIONS if (values->pg_bg_rgba) gdk_rgba_free (values->pg_bg_rgba); @@ -280,15 +286,19 @@ _gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest, if (dest->pg_bg_color) { +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_color_free (dest->pg_bg_color); dest->pg_bg_color = NULL; +G_GNUC_END_IGNORE_DEPRECATIONS } if (vals->pg_bg_rgba) dest->pg_bg_rgba = gdk_rgba_copy (vals->pg_bg_rgba); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (vals->pg_bg_color) dest->pg_bg_color = gdk_color_copy (vals->pg_bg_color); +G_GNUC_END_IGNORE_DEPRECATIONS } if (vals->font) diff --git a/gtk/gtktextbufferserialize.c b/gtk/gtktextbufferserialize.c index 3976e1f27d..3b77074192 100644 --- a/gtk/gtktextbufferserialize.c +++ b/gtk/gtktextbufferserialize.c @@ -50,6 +50,7 @@ typedef struct static gchar * serialize_value (GValue *value) { +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (g_value_type_transformable (value->g_type, G_TYPE_STRING)) { GValue text_value = G_VALUE_INIT; @@ -73,6 +74,7 @@ serialize_value (GValue *value) { g_warning ("Type %s is not serializable\n", g_type_name (value->g_type)); } +G_GNUC_END_IGNORE_DEPRECATIONS return NULL; } @@ -81,6 +83,7 @@ static gboolean deserialize_value (const gchar *str, GValue *value) { +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (g_value_type_transformable (G_TYPE_STRING, value->g_type)) { GValue text_value = G_VALUE_INIT; @@ -191,6 +194,7 @@ deserialize_value (const gchar *str, { g_warning ("Type %s can not be deserialized\n", g_type_name (value->g_type)); } +G_GNUC_END_IGNORE_DEPRECATIONS return FALSE; } diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c index 24cc0ec6b4..9e8fceac5b 100644 --- a/gtk/gtktextdisplay.c +++ b/gtk/gtktextdisplay.c @@ -224,7 +224,9 @@ gtk_text_renderer_prepare_run (PangoRenderer *renderer, rgba.green = color->green / 65535.; rgba.blue = color->blue / 65535.; rgba.alpha = 1; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gdk_color_free (color); +G_GNUC_END_IGNORE_DEPRECATIONS text_renderer->error_color = gdk_rgba_copy (&rgba); } diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index 4ad0aee3ae..99909288f0 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -1400,10 +1400,12 @@ set_para_values (GtkTextLayout *layout, display->total_width = MAX (layout->screen_width, layout->width) - display->left_margin - display->right_margin; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (style->pg_bg_color) display->pg_bg_color = gdk_color_copy (style->pg_bg_color); else display->pg_bg_color = NULL; +G_GNUC_END_IGNORE_DEPRECATIONS if (style->pg_bg_rgba) display->pg_bg_rgba = gdk_rgba_copy (style->pg_bg_rgba); @@ -2497,8 +2499,10 @@ gtk_text_layout_free_line_display (GtkTextLayout *layout, if (display->cursors) g_array_free (display->cursors, TRUE); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (display->pg_bg_color) gdk_color_free (display->pg_bg_color); +G_GNUC_END_IGNORE_DEPRECATIONS if (display->pg_bg_rgba) gdk_rgba_free (display->pg_bg_rgba); diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c index 4510872c51..6e16fd6689 100644 --- a/gtk/gtktexttag.c +++ b/gtk/gtktexttag.c @@ -218,7 +218,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass) g_param_spec_boxed ("background-gdk", P_("Background color"), P_("Background color as a GdkColor"), - GDK_TYPE_COLOR, + g_type_from_name ("GdkColor"), GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** @@ -264,7 +264,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass) g_param_spec_boxed ("foreground-gdk", P_("Foreground color"), P_("Foreground color as a GdkColor"), - GDK_TYPE_COLOR, + g_type_from_name ("GdkColor"), GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** @@ -581,7 +581,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass) g_param_spec_boxed ("paragraph-background-gdk", P_("Paragraph background color"), P_("Paragraph background color as a GdkColor"), - GDK_TYPE_COLOR, + g_type_from_name ("GdkColor"), GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** @@ -890,8 +890,10 @@ set_pg_bg_rgba (GtkTextTag *tag, GdkRGBA *rgba) if (priv->values->pg_bg_rgba) gdk_rgba_free (priv->values->pg_bg_rgba); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (priv->values->pg_bg_color) gdk_color_free (priv->values->pg_bg_color); +G_GNUC_END_IGNORE_DEPRECATIONS priv->values->pg_bg_rgba = NULL; priv->values->pg_bg_color = NULL; @@ -909,7 +911,9 @@ set_pg_bg_rgba (GtkTextTag *tag, GdkRGBA *rgba) priv->values->pg_bg_rgba = gdk_rgba_copy (rgba); copy_rgba_to_gdk_color (rgba, &color); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS priv->values->pg_bg_color = gdk_color_copy (&color); +G_GNUC_END_IGNORE_DEPRECATIONS } else { diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 9a709a40e3..8431e3f1c8 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -911,12 +911,14 @@ gtk_text_view_class_init (GtkTextViewClass *klass) /* * Style properties */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_widget_class_install_style_property (widget_class, g_param_spec_boxed ("error-underline-color", P_("Error underline color"), P_("Color with which to draw error-indication underlines"), GDK_TYPE_COLOR, GTK_PARAM_READABLE)); +G_GNUC_END_IGNORE_DEPRECATIONS /* * Signals diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index a401cc5f60..c0e855d16c 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -1226,7 +1226,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class) P_("Make the expanders indented"), TRUE, GTK_PARAM_READABLE)); - +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_widget_class_install_style_property (widget_class, g_param_spec_boxed ("even-row-color", P_("Even Row Color"), @@ -1240,6 +1240,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class) P_("Color to use for odd rows"), GDK_TYPE_COLOR, GTK_PARAM_READABLE)); +G_GNUC_END_IGNORE_DEPRECATIONS gtk_widget_class_install_style_property (widget_class, g_param_spec_int ("grid-line-width", diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index fd70264659..d5cc921a66 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -3499,6 +3499,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS P_("Width, in pixels, between focus indicator and the widget 'box'"), 0, G_MAXINT, 1, GTK_PARAM_READABLE | G_PARAM_DEPRECATED)); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_widget_class_install_style_property (klass, g_param_spec_boxed ("cursor-color", P_("Cursor color"), @@ -3511,6 +3512,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS P_("Color with which to draw the secondary insertion cursor when editing mixed right-to-left and left-to-right text"), GDK_TYPE_COLOR, GTK_PARAM_READABLE)); +G_GNUC_END_IGNORE_DEPRECATIONS gtk_widget_class_install_style_property (klass, g_param_spec_float ("cursor-aspect-ratio", P_("Cursor line aspect ratio"), @@ -3525,6 +3527,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS FALSE, GTK_PARAM_READABLE)); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS /** * GtkWidget:link-color: * @@ -3540,7 +3543,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS P_("Unvisited Link Color"), P_("Color of unvisited links"), GDK_TYPE_COLOR, - GTK_PARAM_READABLE)); + GTK_PARAM_READABLE|G_PARAM_DEPRECATED)); /** * GtkWidget:visited-link-color: @@ -3557,7 +3560,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS P_("Visited Link Color"), P_("Color of visited links"), GDK_TYPE_COLOR, - GTK_PARAM_READABLE)); + GTK_PARAM_READABLE|G_PARAM_DEPRECATED)); +G_GNUC_END_IGNORE_DEPRECATIONS /** * GtkWidget:wide-separators: diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c index 91562b4793..2ec345646e 100644 --- a/gtk/inspector/prop-editor.c +++ b/gtk/inspector/prop-editor.c @@ -696,6 +696,7 @@ color_modified (GtkColorButton *cb, GParamSpec *ignored, ObjectProperty *p) g_value_unset (&val); } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS static void color_changed (GObject *object, GParamSpec *pspec, gpointer data) { @@ -721,6 +722,7 @@ color_changed (GObject *object, GParamSpec *pspec, gpointer data) g_value_unset (&val); } +G_GNUC_END_IGNORE_DEPRECATIONS static void font_modified (GtkFontChooser *fb, GParamSpec *pspec, ObjectProperty *p) @@ -1005,7 +1007,7 @@ property_widget (GObject *object, object, spec, G_CALLBACK (rgba_modified)); } else if (type == G_TYPE_PARAM_BOXED && - G_PARAM_SPEC_VALUE_TYPE (spec) == GDK_TYPE_COLOR) + G_PARAM_SPEC_VALUE_TYPE (spec) == g_type_from_name ("GdkColor")) { prop_edit = gtk_color_chooser_widget_new (); gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER (prop_edit), FALSE); |