GNOME Bugzilla – Bug 131867
sets construct-only property after construction
Last modified: 2004-12-22 21:47:04 UTC
In gnome-ui-init.c (libgnomeui_class_init) the "show-crash-dialog" is installed for the GnomeProgramClass as G_PARAM_CONSTRUCT_ONLY, but it is set after construction by libgnomeui_pre_args_parse, resulting in a gobject warning.
Same applies for the "sm-connect" property.
Created attachment 24285 [details] [review] fix for the "sm-connect" property declaration
Setting PATCH keyword. Note that the "show-crash-dialog" property was taken care of in bug 133071.
Looks good, please commit
Committed. 2004-02-10 Christian Persch <chpe@cvs.gnome.org> * libgnomeui/gnome-client.c: (gnome_client_module_class_init): Remove G_PARAM_CONSTRUCT_ONLY flag from the paramspec of the sm-connect proprety, since it's set after construct time when the args are parsed (Bug #131867).
for some reason this patch makes that every program trying to connect to gnome-session fails, i have backed it in my local tree and everything is working again.
Created attachment 24424 [details] [review] fix -- initialise the properties
Removing the G_PARAM_CONSTRUCT_ONLY flag made those properties non-construct properties, which means that the properties were not initialised and therefore were 0 (FALSE) instead of their default (TRUE). Above patch fixes that. Alternatively, adding the G_PARAM_CONSTRUCT flag to the pspec should have the same effect.
I think using CONSTRUCT is better if that works. Could you please fix that and commit?
Committed, using G_PARAM_CONSTRUCT in the pspec. 2004-02-15 Christian Persch <chpe@cvs.gnome.org> * libgnomeui/gnome-client.c: (gnome_client_module_class_init): * libgnomeui/gnome-ui-init.c: (libgnomeui_class_init): Mark the "sm-connect" and "show-crash-dialog" properties with G_PARAM_CONSTRUCT, so that they are correctly initialised to their defaults on object construction. (Bug #131867).