[gtk/matthiasc/for-master: 3/9] colorbutton: Properly override interface properties
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 3/9] colorbutton: Properly override interface properties
- Date: Sat, 3 Oct 2020 17:11:36 +0000 (UTC)
commit ff7bcf738c32b50dfa8f33b61fe48a54350aa610
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Oct 3 11:07:14 2020 -0400
colorbutton: Properly override interface properties
This showed up in a test for missing property accessors.
gtk/gtkcolorbutton.c | 28 ++--------------------------
1 file changed, 2 insertions(+), 26 deletions(-)
---
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index 07285614da..b3abdf626b 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -149,19 +149,8 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
klass->color_set = NULL;
- /**
- * GtkColorButton:use-alpha:
- *
- * If this property is set to %TRUE, the color swatch on the button is
- * rendered against a checkerboard background to show its opacity and
- * the opacity slider is displayed in the color selection dialog.
- */
- g_object_class_install_property (gobject_class,
- PROP_USE_ALPHA,
- g_param_spec_boolean ("use-alpha", P_("Use alpha"),
- P_("Whether to give the color an alpha value"),
- FALSE,
- GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
+ g_object_class_override_property (gobject_class, PROP_RGBA, "rgba");
+ g_object_class_override_property (gobject_class, PROP_USE_ALPHA, "use-alpha");
/**
* GtkColorButton:title:
@@ -176,19 +165,6 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
_("Pick a Color"),
GTK_PARAM_READWRITE));
- /**
- * GtkColorButton:rgba:
- *
- * The RGBA color.
- */
- g_object_class_install_property (gobject_class,
- PROP_RGBA,
- g_param_spec_boxed ("rgba",
- P_("Current RGBA Color"),
- P_("The selected RGBA color"),
- GDK_TYPE_RGBA,
- GTK_PARAM_READWRITE));
-
/**
* GtkColorButton::color-set:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]