Based on my testing, when McpAccountStorage::altered-one is emitted, it doesn't actually work for most account properties. This is because mcd_account_property_changed() (renamed to mcd_account_altered_by_plugin() in one of my branches) tries to copy things from internal storage to D-Bus by calling getprop() followed by setprop(). As far as I can tell, the intention is that this retrieves the new value from McdStorage (where it was previously left by mcp_account_manager_set_value()), then saves it again. Unfortunately, most getprop() implementations work from the McdAccount's internal data structure, so they never see the new value...
This branch follows on from the test for this feature added at the end of Bug #54873. It makes everything in that test actually work... This is part 4 of my account storage refactoring megabranch.
This branch contains a data migration step: AutomaticPresenceType, ...Status and ...Message are combined into a new (uss)-valued attribute, AutomaticPresence (yes, we now have a (really dumb) serialization for (uss) in keyfiles). It will not be safe to downgrade past the first release with this branch merged.
In commit 05d1af087: @@ -514,10 +520,17 @@ mcp_account_storage_priority (const McpAccountStorage *storage) * like "DisplayName", or "param-" plus a parameter like "account" * * Get a value from the plugin's in-memory cache. - * The plugin is expected to call mcp_account_manager_set_value(), - * and if appropriate, mcp_account_manager_parameter_make_secret(), + * The plugin is expected to call + * Before emitting this signal, the plugin must call + * either mcp_account_manager_set_attribute(), + * mcp_account_manager_set_parameter(), + * or mcp_account_manager_set_value() and (if appropriate) + * mcp_account_manager_parameter_make_secret() * before returning from this method call. There's a stray “The plugin is expected to call” in there. It otherwise looks fine.
Fixed in git for 5.15.0
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.