mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Revert "tests: use GdkRGBA instead GdkColor"
This reverts commit 85747da972
.
Conflicts:
tests/prop-editor.c
Bug #664467.
This commit is contained in:
parent
3abc31a2d1
commit
2831151405
@ -664,9 +664,9 @@ static void
|
||||
color_modified (GtkColorButton *cb, gpointer data)
|
||||
{
|
||||
ObjectProperty *p = data;
|
||||
GdkRGBA rgba;
|
||||
GdkColor color;
|
||||
|
||||
gtk_color_button_get_rgba (cb, &rgba);
|
||||
gtk_color_button_get_color (cb, &color);
|
||||
|
||||
if (is_child_property (p->spec))
|
||||
{
|
||||
@ -674,10 +674,10 @@ color_modified (GtkColorButton *cb, gpointer data)
|
||||
GtkWidget *parent = gtk_widget_get_parent (widget);
|
||||
|
||||
gtk_container_child_set (GTK_CONTAINER (parent),
|
||||
widget, p->spec->name, &rgba, NULL);
|
||||
widget, p->spec->name, &color, NULL);
|
||||
}
|
||||
else
|
||||
g_object_set (p->obj, p->spec->name, &rgba, NULL);
|
||||
g_object_set (p->obj, p->spec->name, &color, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -685,19 +685,19 @@ color_changed (GObject *object, GParamSpec *pspec, gpointer data)
|
||||
{
|
||||
GtkColorButton *cb = GTK_COLOR_BUTTON (data);
|
||||
GValue val = G_VALUE_INIT;
|
||||
GdkRGBA *color;
|
||||
GdkRGBA cb_color;
|
||||
GdkColor *color;
|
||||
GdkColor cb_color;
|
||||
|
||||
g_value_init (&val, GDK_TYPE_RGBA);
|
||||
g_value_init (&val, GDK_TYPE_COLOR);
|
||||
get_property_value (object, pspec, &val);
|
||||
|
||||
color = g_value_get_boxed (&val);
|
||||
gtk_color_button_get_rgba (cb, &cb_color);
|
||||
gtk_color_button_get_color (cb, &cb_color);
|
||||
|
||||
if (color != NULL && !gdk_rgba_equal (color, &cb_color))
|
||||
if (color != NULL && !gdk_color_equal (color, &cb_color))
|
||||
{
|
||||
block_controller (G_OBJECT (cb));
|
||||
gtk_color_button_set_rgba (cb, color);
|
||||
gtk_color_button_set_color (cb, color);
|
||||
unblock_controller (G_OBJECT (cb));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user