Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with host's clock-format GSettings #522

Closed
ryonakano opened this issue Aug 24, 2021 · 2 comments
Closed

Sync with host's clock-format GSettings #522

ryonakano opened this issue Aug 24, 2021 · 2 comments

Comments

@ryonakano
Copy link
Member

ryonakano commented Aug 24, 2021

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.

@jhaygood86
Copy link
Contributor

I fixed this in #527 by using the portal

@ryonakano
Copy link
Member Author

Should be fixed by #529. Thank you for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants