X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtktexttag.c;h=8674e92c9f0cd74a2be7f9a049c56bfc5dd3e026;hb=a89d420270d1a856e072ed87c365b0176f102e6c;hp=07d513dd58001d73d60266c242c8ee55cf528592;hpb=e217c455f8271d4f0c93e4e7158d109c231e2e64;p=~andy%2Fgtk diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c index 07d513dd5..8674e92c9 100644 --- a/gtk/gtktexttag.c +++ b/gtk/gtktexttag.c @@ -61,6 +61,11 @@ * * gtk_text_buffer_create_tag() is the best way to create tags. * See gtk3-demo for numerous examples. + * + * For each property of #GtkTextTag, there is a "set" property, e.g. + * "font-set" corresponds to "font". These "set" properties reflect + * whether a property has been set or not. + * They are maintained by GTK+ and you should not set them independently. */ #include "config.h" @@ -68,7 +73,6 @@ #include #include -#include "gtkmainprivate.h" #include "gtktexttag.h" #include "gtktexttypes.h" #include "gtktexttagtable.h" @@ -201,26 +205,33 @@ gtk_text_tag_class_init (GtkTextTagClass *klass) NULL, GTK_PARAM_WRITABLE)); + /** + * GtkTextTag:background-gdk: + * + * Background color as a #GdkColor. + * + * Deprecated: 3.4: Use #GtkTextTag:background-rgba instead. + */ g_object_class_install_property (object_class, PROP_BACKGROUND_GDK, g_param_spec_boxed ("background-gdk", P_("Background color"), - P_("Background color as a (possibly unallocated) GdkColor"), + P_("Background color as a GdkColor"), GDK_TYPE_COLOR, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** * GtkTextTag:background-rgba: * - * Background color as a (possibly unallocated) #GdkRGBA. + * Background color as a #GdkRGBA. * * Since: 3.2 */ g_object_class_install_property (object_class, PROP_BACKGROUND_RGBA, g_param_spec_boxed ("background-rgba", - P_("Background rgba"), - P_("Background color as a (possibly unallocated) GdkRGBA"), + P_("Background RGBA"), + P_("Background color as a GdkRGBA"), GDK_TYPE_RGBA, GTK_PARAM_READWRITE)); @@ -240,26 +251,33 @@ gtk_text_tag_class_init (GtkTextTagClass *klass) NULL, GTK_PARAM_WRITABLE)); + /** + * GtkTextTag:foreground-gdk: + * + * Foreground color as a #GdkColor. + * + * Deprecated: 3.4: Use #GtkTextTag:foreground-rgba instead. + */ g_object_class_install_property (object_class, PROP_FOREGROUND_GDK, g_param_spec_boxed ("foreground-gdk", P_("Foreground color"), - P_("Foreground color as a (possibly unallocated) GdkColor"), + P_("Foreground color as a GdkColor"), GDK_TYPE_COLOR, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** * GtkTextTag:foreground-rgba: * - * Foreground color as a (possibly unallocated) #GdkRGBA. + * Foreground color as a #GdkRGBA. * * Since: 3.2 */ g_object_class_install_property (object_class, PROP_FOREGROUND_RGBA, g_param_spec_boxed ("foreground-rgba", - P_("Foreground rgba"), - P_("Foreground color as a (possibly unallocated) GdkRGBA"), + P_("Foreground RGBA"), + P_("Foreground color as a GdkRGBA"), GDK_TYPE_RGBA, GTK_PARAM_READWRITE)); @@ -551,32 +569,32 @@ gtk_text_tag_class_init (GtkTextTagClass *klass) /** * GtkTextTag:paragraph-background-gdk: * - * The paragraph background color as a as a (possibly unallocated) - * #GdkColor. + * The paragraph background color as a as a #GdkColor. * * Since: 2.8 + * + * Deprecated: 3.4: Use #GtkTextTag:paragraph-background-rgba instead. */ g_object_class_install_property (object_class, PROP_PARAGRAPH_BACKGROUND_GDK, g_param_spec_boxed ("paragraph-background-gdk", P_("Paragraph background color"), - P_("Paragraph background color as a (possibly unallocated) GdkColor"), + P_("Paragraph background color as a GdkColor"), GDK_TYPE_COLOR, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** * GtkTextTag:paragraph-background-rgba: * - * The paragraph background color as a as a (possibly unallocated) - * #GdkRGBA. + * The paragraph background color as a as a #GdkRGBA. * * Since: 3.2 */ g_object_class_install_property (object_class, PROP_PARAGRAPH_BACKGROUND_RGBA, g_param_spec_boxed ("paragraph-background-rgba", - P_("Paragraph background rgba"), - P_("Paragraph background rgba as a (possibly unallocated) GdkRGBA"), + P_("Paragraph background RGBA"), + P_("Paragraph background RGBA as a GdkRGBA"), GDK_TYPE_RGBA, GTK_PARAM_READWRITE)); @@ -1850,6 +1868,7 @@ gtk_text_tag_get_property (GObject *object, case PROP_FOREGROUND: case PROP_PARAGRAPH_BACKGROUND: g_warning ("'foreground', 'background' and 'paragraph_background' properties are not readable, use 'foreground_gdk', 'background_gdk' and 'paragraph_background_gdk'"); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break;