Closed Bug 1685804 Opened 5 years ago Closed 5 years ago

Use nsIGSettingsService in OSPreferences_gtk

Categories

(Core :: Internationalization, defect, P1)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: dminor, Assigned: dminor)

References

Details

Attachments

(1 file)

I ran into this while working on Bug 1420335, we're currently using gtk code in OSPreferences_gtk to look up whether we should use a 12 or 24 hour clock, but we have a nsIGSettingsService service in tree to handle this. It also looks like the current code is not working properly.

It also looks like the current code is not working properly.

Can you elaborate?

We wrote it at the time when Ubuntu was using Unity and we wanted to handle both (they differed in how they handled that!), and I am quite certain that at the time it worked.

Flags: needinfo?(dminor)

On my Ubuntu 20.04 system, $XDG_CURRENT_DESKTOP is "GNOME", and the "org.gnome.desktop.interface" schema works for me when using nsIGSettingsService, but not with the older code. If we can trust this [1] it looks like Ubuntu 16.04 and earlier reported "Unity". From what I can tell, 16.04 is supported until April 2021, so I think it makes sense to leave the check for Unity, but switch to using nsIGSettingsService.

[1] https://askubuntu.com/questions/72549/how-to-determine-which-window-manager-is-running/227669#227669

Flags: needinfo?(dminor)

Well, it seems to be working fine this morning. So I guess either I was imagining things on Friday afternoon (possible!) or a system restart fixed things for me. I still think it makes sense to switch over to nsIGSettingsService rather than have our own code for doing this.

This switches over to using nsIGSettingsService.

Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae73e36cbf2a Use nsIGSettingsService in OSPreferences_gtk; r=zbraniecki

Seems that these test results assume that the system clock cycle is set to 12h, and fail if it is set to 24h. It looks like my mach try auto job missed running the gtests, sorry.

Flags: needinfo?(dminor)

A try run with the expectations updated to accept either AM/PM or 24h times: https://treeherder.mozilla.org/jobs?repo=try&revision=bf90144c59398e7dcd332dafe59c3978607b9afc.

That this change caused test failures makes it seem like I wasn't imagining things and something was not working with the previous implementation.

Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bdc025488805 Use nsIGSettingsService in OSPreferences_gtk; r=zbraniecki
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Blocks: 1726464
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: