After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 131867 - sets construct-only property after construction
sets construct-only property after construction
Status: RESOLVED FIXED
Product: libgnomeui
Classification: Deprecated
Component: general
CVS HEAD
Other Linux
: Normal normal
: future
Assigned To: libgnomeui maintainers
libgnomeui maintainers
Depends on:
Blocks:
 
 
Reported: 2004-01-18 23:06 UTC by Christian Persch
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix for the "sm-connect" property declaration (753 bytes, patch)
2004-02-10 19:18 UTC, Christian Persch
none Details | Review
fix -- initialise the properties (1.53 KB, patch)
2004-02-15 14:29 UTC, Christian Persch
none Details | Review

Description Christian Persch 2004-01-18 23:06:52 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.
Comment 1 Christian Persch 2004-02-10 18:44:26 UTC
Same applies for the "sm-connect" property.
Comment 2 Christian Persch 2004-02-10 19:18:39 UTC
Created attachment 24285 [details] [review]
fix for the "sm-connect" property declaration
Comment 3 Christian Persch 2004-02-10 19:20:13 UTC
Setting PATCH keyword.

Note that the "show-crash-dialog" property was taken care of in bug
133071.
Comment 4 Anders Carlsson 2004-02-10 20:31:03 UTC
Looks good, please commit
Comment 5 Christian Persch 2004-02-10 22:06:50 UTC
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).
Comment 6 Diego González 2004-02-14 17:52:31 UTC
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.
Comment 7 Christian Persch 2004-02-15 14:29:51 UTC
Created attachment 24424 [details] [review]
fix -- initialise the properties
Comment 8 Christian Persch 2004-02-15 14:32:35 UTC
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.
Comment 9 Anders Carlsson 2004-02-15 20:05:42 UTC
I think using CONSTRUCT is better if that works. Could you please fix
that and commit?
Comment 10 Christian Persch 2004-02-15 20:44:36 UTC
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).