forked from AuroraMiddleware/gtk
shorthand: Remove hack
This hack was used for parsing back before the refactoring.
This commit is contained in:
parent
e603992ac7
commit
78fee2f54b
@ -800,11 +800,10 @@ unpack_border_color (GtkCssShorthandProperty *shorthand,
|
||||
guint *n_params)
|
||||
{
|
||||
GParameter *parameter = g_new0 (GParameter, 4);
|
||||
gpointer p;
|
||||
GType type;
|
||||
|
||||
type = G_VALUE_TYPE (value);
|
||||
if (type == G_TYPE_PTR_ARRAY)
|
||||
type = GTK_TYPE_SYMBOLIC_COLOR;
|
||||
|
||||
parameter[0].name = "border-top-color";
|
||||
g_value_init (¶meter[0].value, type);
|
||||
@ -815,24 +814,13 @@ unpack_border_color (GtkCssShorthandProperty *shorthand,
|
||||
parameter[3].name = "border-left-color";
|
||||
g_value_init (¶meter[3].value, type);
|
||||
|
||||
if (G_VALUE_TYPE (value) == G_TYPE_PTR_ARRAY)
|
||||
{
|
||||
GPtrArray *array = g_value_get_boxed (value);
|
||||
guint i;
|
||||
/* can be RGBA or symbolic color */
|
||||
p = g_value_get_boxed (value);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
g_value_set_boxed (¶meter[i].value, g_ptr_array_index (array, i));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* can be RGBA or symbolic color */
|
||||
gpointer p = g_value_get_boxed (value);
|
||||
|
||||
g_value_set_boxed (¶meter[0].value, p);
|
||||
g_value_set_boxed (¶meter[1].value, p);
|
||||
g_value_set_boxed (¶meter[2].value, p);
|
||||
g_value_set_boxed (¶meter[3].value, p);
|
||||
}
|
||||
g_value_set_boxed (¶meter[0].value, p);
|
||||
g_value_set_boxed (¶meter[1].value, p);
|
||||
g_value_set_boxed (¶meter[2].value, p);
|
||||
g_value_set_boxed (¶meter[3].value, p);
|
||||
|
||||
*n_params = 4;
|
||||
return parameter;
|
||||
|
Loading…
Reference in New Issue
Block a user