Skip to content

Sync with host's clock-format GSettings #522

@ryonakano

Description

@ryonakano

What Happened

I use Granite.Widgets.TimePicker in my flatpaked app and noticed it does not follow the clock-format setting (12h or 24h) chosen in the host system.

Looks like TimePicker checks the clock-format using Granite.DateTime.is_clock_format_12h () which uses GSettings key org.gnome.desktop.interface.clock-format. However, since GSettings in flatpak apps is sandboxed this returns the value from the sandbox―not from the host.

Expected Behavior

Granite.DateTime.is_clock_format_12h () should always return the host clock-format setting.

Steps to Reproduce

  1. Choose 12h as a clock-format in Date & Time Plug
  2. Open Terminal
  3. Run gsettings get org.gnome.desktop.interface clock-format. You should get '12h'
  4. Run some app in Flatpak, e.g. flatpak run --command=sh io.elementary.screenshot
  5. Run gsettings get org.gnome.desktop.interface clock-format in the sandboxed prompt. You should get '24h' regardless of the host's clock-format setting

Logs

N/A

Platform Information

  • elementary OS 6 Odin with fully updated
  • libgranite-dev: 6.1.0+r2071+pkg119~ubuntu6.1
  • flatpak: 1.10.2~ubuntu6.1

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions