Commit graph

10 commits

Author SHA1 Message Date
Alynx Zhou
cbfd3b1ad9 system/region: Prevent preview crash from accessing invalid pointer
In !2051, we switch back to real locale before setting the label text,
however, according to nl_langinfo's manpage, the returned pointer could
be invalid after switching locale or creating new locale, so the program
may crash.

To fix this, we save the result before switching locale, so we won't
access the invalid pointer after switching locale.
2024-01-04 11:23:54 +08:00
Felipe Borges
affa60edcf Revert "system: Replace dynamic System row subtitles with static text"
This reverts commit ea224c4045.

This was accidentally included in another MR.
2023-12-05 15:17:11 +01:00
Felipe Borges
ea224c4045 system: Replace dynamic System row subtitles with static text
Row subtitles in Settings are typically a description of the main label or setting.
You can see this in Mouse & Touchpad, Privacy, Sharing, and Wi-Fi.
For the System panel we did something a bit different and used the subtitle to show
the status of each panel.

Given the standard use of subtitles elsewhere, this feels a bit surprising which,
as a result, makes the panel harder to read. I think that a standard description
would probably also be more useful than the current labels.

Mockups https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/system/system-panel.png?ref_type=heads

This also removes the thin CcSystemPage abstract class because it was
only introduced to add the support for dynamic System row subtitle. Now
this abstraction is no longer necessary.

Fixes #2776
2023-12-05 14:07:13 +00:00
velsinki
7f79356ded system/region: Preview measurement format in current locale
The Formats preview tries to find the measurement format of the locale
to preview, and then displays it. However, it displays the text in the
default locale, instead of in the real current locale, as newlocale ()
with base = (locale_t) 0 will use the default locale.

This is fixed by switching back to the real locale before setting the
label text.

Fixes #2458

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2051>
2023-11-23 05:48:56 +00:00
Maximiliano Sandoval R
6ace6bb260 format-chooser: Close on escape
This was already implemented but it didn't work if the focus was on the
search entry since it comsumed the Escape input.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2002>
2023-11-06 14:32:49 +00:00
Maximiliano Sandoval R
76bf9b461b format-chooser: Add flat class to buttons in rows
Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2002>
2023-11-06 14:32:49 +00:00
Automeris naranja
478229be35 region: Fix mnemonics from the "Login Screen" section
"Language" and "Formats" rows from the "Login Screen" section
have the same mnemonics of their counterparts from the "Your Account"
section. Use other letters for mnemonics to fix that.
2023-11-05 17:38:22 -03:00
Automeris naranja
921664ccdb region: Add mnemonic to the "Log Out" button from the AdwBanner
Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2541
2023-11-05 17:38:20 -03:00
Felipe Borges
79f1b84964 system: Show page summaries as row subtitles in the main page
Per mockups in
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/raw/master/system/system-panel.png

This adds a thin abstract CcSystemPage object with a "summary" property.

Each CcListRow::subtitle is binded to its corresponded
CcSystemPage::summary.

See #2241
2023-11-02 12:15:11 +00:00
Gotam Gorabh
72973b9a8a system: Add 'Region Language' panel to system panel
Adding Region & Language page to the system panel.

https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/system/system-panel.png

See #2241
2023-11-02 12:15:11 +00:00