Bug 32416 - I don't like McdDBusProp
Summary: I don't like McdDBusProp
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: mission-control (show other bugs)
Version: git master
Hardware: Other All
: low minor
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/wj...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 09:29 UTC by Will Thompson
Modified: 2019-12-03 19:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2010-12-15 09:29:45 UTC
I don't like McdDBusProp. It seems stupid that we have this one implementation of properties—TpDBusPropertiesMixin—but one of the main Telepathy components doesn't use it.

So I made a stab at getting rid of it, starting by porting McdAccount to use TpDBusPropertiesMixin. The attached branch is *almost* there … except that it breaks creating accounts. McdAccountManager calls mcd_dbusprop_set_property() on McdAccount to set all the initial properties, and I can't see any way to do the equivalent using TpDBusPropertiesMixin (short of rootling around in its internal qdata and generally being a bad person). So I've given up for now.
Comment 1 Simon McVittie 2010-12-15 10:59:11 UTC
If this is all that stands in the way, I wouldn't object to the addition of a tp_dbus_properties_mixin_set(), defined in terms of "does the same thing as the D-Bus method or raises the same error".
Comment 2 Will Thompson 2010-12-15 11:27:45 UTC
(In reply to comment #1)
> If this is all that stands in the way, I wouldn't object to the addition of a
> tp_dbus_properties_mixin_set(), defined in terms of "does the same thing as the
> D-Bus method or raises the same error".

I'll retract my neck slightly: that may not be *all* that stands in the way. It's just the thing that I hit that made me give up.

(I wouldn't be hugely opposed to that function either, but I am having a think about how to avoid it, just in case.)
Comment 3 Simon McVittie 2013-01-07 15:11:07 UTC
tp_dbus_properties_mixin_set has been implemented. I wonder whether anything else prevents this change?
Comment 4 Simon McVittie 2014-04-07 11:24:34 UTC
(In reply to comment #3)
> tp_dbus_properties_mixin_set has been implemented. I wonder whether anything
> else prevents this change?

If I remember correctly, the answer is that McdDBusProp allows read-only properties to have a setter, and be set via mcd_dbusprop_set_property(), in order to implement an equivalent of GObject's READWRITE|CONSTRUCT_ONLY properties.

We could add tp_dbus_properties_mixin_set_during_construct() but I really don't want to put that on the critical path for Telepathy1.
Comment 5 GitLab Migration User 2019-12-03 19:34:57 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-mission-control/issues/34.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.