GSimpleAction: don't allow changing state type
authorRyan Lortie <desrt@desrt.ca>
Mon, 28 Oct 2013 21:59:26 +0000 (14:59 -0700)
committerRyan Lortie <desrt@desrt.ca>
Tue, 29 Oct 2013 01:08:16 +0000 (18:08 -0700)
commit83869120bba2aa745a1b23fb415ab0eddd6f9327
tree3b2eca3b1556539fecf137597deba8ca73e39e6c
parent908d7d6d6abb53a00e20bab70df7099ecd66890b
GSimpleAction: don't allow changing state type

g_object_set() allowed us to bypass the usual checks that the state
doesn't change type and also leaked.

Fix that up by turning the state into a construct property (so that it
always gets set once during construction, even if only to NULL) and
then route the further sets through the C API so that they are subject
to the same checks.

https://bugzilla.gnome.org/show_bug.cgi?id=696424
gio/gsimpleaction.c