granite icon indicating copy to clipboard operation
granite copied to clipboard

Expose clock format as granite setting

Open jhaygood86 opened this issue 3 years ago • 3 comments

This builds on #527 , but also solves some needs in #525

This:

  • exposes the clock format as setting in Granite.Settings, including listening from updates, using the portal. This also allows applications to notify on the update even inside a flatpak'ed application
  • updates internal APIs and widgets to use the new setting, including listening on updates. This magically makes applications work inside flatpak as well as makes them more dynamic (i.e., when the system setting is changed, reflect that change instantly)
  • adds a new API to format a GLib.DateTime directly using the existing APIs and the system settings so that applications don't have to duplicate the format logic everywhere.

jhaygood86 avatar Sep 17 '21 02:09 jhaygood86

@jhaygood86 is this still necessary after the other datetime/portals stuff was merged? If so, can you resolve conflicts?

danirabbit avatar Oct 21 '21 19:10 danirabbit

Rebase onto changes from portal refactoring

jhaygood86 avatar Oct 24 '21 01:10 jhaygood86

@danrabbit It'll still be useful. I've adjusted to account for the new Portal.Settings class being available.

jhaygood86 avatar Oct 24 '21 02:10 jhaygood86