Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
gtk
Commits
2da033b1
Commit
2da033b1
authored
Mar 06, 2010
by
Carlos Garnacho
Browse files
GtkStyleSet: Return default value if value is not set.
parent
9fdcbd7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
gtk/gtkstyleset.c
View file @
2da033b1
...
...
@@ -425,11 +425,13 @@ gtk_style_set_get_property (GtkStyleSet *set,
prop
=
g_hash_table_lookup
(
priv
->
properties
,
GINT_TO_POINTER
(
node
->
property_quark
));
if
(
!
prop
)
return
FALSE
;
g_value_init
(
value
,
node
->
property_type
);
g_value_init
(
value
,
G_VALUE_TYPE
(
&
prop
->
values
[
state
]));
g_value_copy
(
&
prop
->
values
[
state
],
value
);
if
(
!
prop
||
!
G_IS_VALUE
(
&
prop
->
values
[
state
]))
g_value_copy
(
&
node
->
default_value
,
value
);
else
g_value_copy
(
&
prop
->
values
[
state
],
value
);
return
TRUE
;
}
...
...
@@ -465,13 +467,11 @@ gtk_style_set_get_valist (GtkStyleSet *set,
prop
=
g_hash_table_lookup
(
priv
->
properties
,
GINT_TO_POINTER
(
node
->
property_quark
));
if
(
!
prop
)
{
/* FIXME: Fill in default */
break
;
}
G_VALUE_LCOPY
(
&
prop
->
values
[
state
],
args
,
0
,
&
error
);
if
(
!
prop
||
!
G_IS_VALUE
(
&
prop
->
values
[
state
]))
G_VALUE_LCOPY
(
&
node
->
default_value
,
args
,
0
,
&
error
);
else
G_VALUE_LCOPY
(
&
prop
->
values
[
state
],
args
,
0
,
&
error
);
if
(
error
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment