Commit graph

61 commits

Author SHA1 Message Date
Felipe Borges
cc5b7c14c3 info-overview: Hide entire software updates group instead of row
We were only hiding the updates row, leaving its AdwPreferencesGroup
visible with no rows.

Let's hide the entire group instead.
2023-07-19 08:38:26 +00:00
Cyber Phantom
17b29d1e2d info-overview: Move the information entries into CcSystemDetailsWindow
In the new mockup, about page only displays a overview of information and most of the system information is presented as a seprate window.

Rewrite the info page to follow the new mockup
2023-07-17 09:25:26 +00:00
Robert Ancell
09e45e03d9 info-overview: Fix name of parent class variable 2023-06-06 07:54:38 +00:00
Michael Catanzaro
718af17905 info-overview: show only the GNOME major version
What we have is the GNOME Shell version, which is NOT the same as the
GNOME version. I thought it'd be nicest to rename this to "GNOME Shell
Version" but it seems we want to keep that as an internal codename not
exposed to users. So instead, let's just show only the major version,
which should hopefully match. This is very generic and much less useful
but I don't see a better solution.

See previous discussion in:

https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1481
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1805

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1814>
2023-05-31 21:03:23 +00:00
Chris Mayo
92c4b6a706 Fix panel crashes due to unknown types in UI descriptions
Error building template class 'CcSearchPanel' for an instance of type 'CcSearchPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcDisplayPanel' for an instance of type 'CcDisplayPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcMousePanel' for an instance of type 'CcMousePanel': .:0:0 Invalid object type 'CcIllustratedRow'

Error building template class 'CcKeyboardPanel' for an instance of type 'CcKeyboardPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcRegionPanel' for an instance of type 'CcRegionPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcUaPanel' for an instance of type 'CcUaPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcAvatarChooser'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcTzDialog'
cc_tz_dialog_get_selected_location: assertion 'CC_IS_TZ_DIALOG (self)' failed
dumped core
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcInfoOverviewPanel' for an instance of type 'CcInfoOverviewPanel': .:0:0 Invalid object type 'CcHostnameEntry'
2023-04-17 12:14:58 +00:00
Sayan Bhattacharjee
0524a6eee6 info-overview: Show each GPU in it's own line
When having multiple GPUs, each GPUs are now seperated by a newline
instead of the previously used seperator: " / ".
This particular fix works ONLY for systems that use switcheroo-control.

Also, this commit allows the 'secondary_label' of 'CcListRow' to have
'lines' set to '4' and 'wrap' to 'True', along with 'hexpand'
and 'halign' set to 'True' to accommodate long strings on all labels
which previously suffered from a issue of getting truncated if
the strings are too long.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2125
2023-04-11 11:20:28 +00:00
Lukáš Tyrychtr
1bfa4be664 info-overview: Actually don't show the firmware version row when in a VM
The previous logic was hiding the row when we were not under virtualization.
Fixes #2351
2023-02-21 10:04:27 +00:00
Marco Melorio
9fc2b6c7f9 overview: Remove deprecated gtk_widget_show/hide usage 2023-01-02 22:10:39 +00:00
Felipe Borges
9871a09143 common, info-overview, sharing: Use AdwEntryRow for Hostname entries
See mockups in https://gitlab.gnome.org/Teams/Design/settings-mockups/-/issues/48
2022-12-13 16:16:08 +00:00
Felipe Borges
f3f81d37b2 info-overview: Update logo when dark-mode changes
Otherwise the logo will only change once the panel gets reloaded.

Fixes #1627
2022-12-02 12:12:48 +01:00
Felipe Borges
e39e21eac3 info-overview: Don't show "Firmware Version" row in virtual machines
This value comes from systemd-hostnamed, which harvests it from
/sys/class/dmi/id/bios_version, which happens to be empty/invalid
in virtual machines (at least KVM powered virtualization).

For this reason, we are better off hiding the "Firmware Version"
row when gnome-control-center is running in a VM.

Fixes #2181
2022-11-28 16:45:06 +00:00
Nitin Joshi
57405b83d2 info-overview: Add "Firmware Version" row
Users often need information like Firmware version, serial number. Hence, it's
better to provide it by default in GNOME.
This changes is to display Firmware version only in "About" menu.

Reference: #1543
2022-11-16 09:34:56 +00:00
Felipe Borges
b5a62e9c6e info-overview: Add "Kernel Version" row
Fixes #1112
2022-10-20 10:07:51 +00:00
Felipe Borges
afd173c799 info: Make get_hardware_model use a hostnamed property getter
This way we have a convenient way to obtain systemd-hostnamed
properties.
2022-10-20 10:07:51 +00:00
Will Thompson
50a92f110d info-overview: show BUILD_ID in separate row
Previously, if os-release included the BUILD_ID field, it was smushed
into the OS Name row as follows:

    OS Name                    Endless OS 5.0.0; Build ID: 220810-230009

This is unsightly in English; and in languages where the translations of
"OS Name" and "Build ID" are long, the build ID may be ellipsised and
hence useless:

    Nom du système   Endless OS 5.0.0 ; (identifiant de construction ...
    d'exploitation

Instead, display the build ID in a separate row, and hide it if not
present.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1347
2022-08-12 01:24:37 +00:00
Amy
8949aeb338 info-overview: remove extra whitespace
Commit 61908b02 ("
info-overview: change fetch order for consistency") introduces
undesired whitespace. While remaking the commit is not necessary, as it
will not affect bisecting, the whitespace should be eliminated.

This patch removes the whitespace, leaving only one preceding and
proceeding line for the get_hardware_model call.
2022-06-10 17:40:34 +00:00
Amy
f2f2807e84 info-overview: change fetch order for consistency
Currently, the order in which info_overview_panel_setup_overview fetches
data is essentially random. For ease of maintainability and
understanding, the fetches should be ordered by their appearance as rows
in the panel.

This patch changes the order so that it corresponds with the panel's UI
order.
2022-06-10 17:40:34 +00:00
Robert Ancell
4f3eb61395 info-overview: Replace deprecated g_spawn_check_exit_status 2022-05-31 15:21:48 +12:00
Adrien Plazas
d548309f34 info-overview-panel: Use the external link icon for the updates link
This makes it explicit it opens another application to perform the
action.
2022-05-12 23:04:51 +00:00
Michael Catanzaro
69f51bdab0 info-overview: add build option to control distributor logo
Currently, we display a 256x256 version of the OS icon from
/etc/os-release. This is too big for my taste, and it's also not
sufficient for distros that want to display a logo that is not an icon.
For instance, because we no longer display the operating system name
immediately beneath the logo, it may be desirable to use a logo variant
that includes text. This patch adds a meson build option that
distributions can use to override the logo, and a second build option to
specify a different logo for use in dark mode.
2022-05-10 23:16:40 +00:00
Bastien Nocera
88f87de748 info-overview: Remove old version.xml loading code 2022-05-10 23:00:59 +00:00
Bastien Nocera
bfc567955f info-overview: Load GNOME version from gnome-shell
See https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5406
2022-05-10 23:00:59 +00:00
Bastien Nocera
8914fae8da info-overview: Don't load version.xml info we don't use
We don't use the distributor or date info from gnome-desktop's version.xml
so no need to parse it.
2022-05-10 23:00:59 +00:00
Felipe Borges
b094a0b392 info-overview: Allow changing "Device Name" by pressing "Enter"
The hostname/device name dialog has only a GtkEntry. So a user
navigating with only a keyboard should be able to apply their
changes by pressing "Enter".
2022-03-07 17:02:20 +00:00
Norbert Pfeiler
c340798b5c info-overview: Remove trailing space after CPU name
It was apparent when selecting the text, as the text is right aligned.

»AMD® Ryzen threadripper 1950x 16-core processor × 32 «
↓
»AMD® Ryzen threadripper 1950x 16-core processor × 32«
2022-01-29 12:39:12 +01:00
Bastien Nocera
25518a6bca info: Use udev to get the hardware RAM size
libgtop gets the RAM size as is visible to the OS, so the physical RAM
size minus all the reserved areas listed at the top of your usual Linux
dmesg output.

Use systemd 248's MEMORY_ARRAY_* properties attached to the pseudo-DMI
device to get the size of the RAM sticks/chips as the user expects.

Closes: #1540
2022-01-27 10:08:37 +01:00
Bastien Nocera
a079eba2a7 info: Split code that fetches RAM amount 2022-01-27 10:07:41 +01:00
Christopher Davis
96ecd3acdf info-overview: Use AdwPreferences{Page,Group} 2022-01-06 22:15:30 +00:00
Georges Basile Stavracas Neto
3c8a0aa0b1 info-overview: Port to GTK4
- Remove visible=True properties from the UI file
 - Use GtkPicture for the OS logo
 - Drop gtk_dialog_run()
 - Port gnome-control-center-print-renderer to GTK4
   by using GdkSurface to create the GL context
2021-12-14 22:34:21 -03:00
Bastien Nocera
43b40b3b4a info-overview: Make sure -dark non-text logo variant is handled
gtk_image_set_from_icon_name() would fallback from $LOGO-text-dark to
$LOGO-text to $LOGO, leaving out $LOGO-dark which might be available.

Make sure it's in the list of possibilities by using
g_themed_icon_new_from_names() and listing it explicitly as a possible
icon name instead.

Fixes: a3b8964a19
Closes: #1415
2021-08-23 18:39:34 +02:00
Mohammed Sadiq
5ba4bc0fa9 info: Initialize autoptr variables with NULL
So as to avoid invalid free
2021-08-12 15:02:12 +00:00
Eric
4383f020e7 Switch to g_get_os_info to read os_release
As described in #1346, GLib 2.64 includes a g_get_os_info() function,
providing access to keys from /etc/os-release. This commit replaces calls to
gnome-control-center's custom parser (in panels/common/cc-os-release.c)
with calls to this new function, and deletes the custom parser code.

Closes #1346
2021-06-15 21:54:35 +00:00
Bastien Nocera
fdd629293d info-overview: Make logo non-square
Make the logo non-square by setting its pixel size to -1. If (or when)
scaling the logo down is needed, we should instead use GtkIconTheme to
load the backing pixbuf, and use it to populate the GtkImage.
2021-05-21 15:00:20 +00:00
Bastien Nocera
df4857d960 info-overview: Simplify GNOME logo setting
Use the same code path for setting the GNOME logo as for setting the
distribution logo.
2021-05-21 15:00:20 +00:00
Bastien Nocera
a3b8964a19 info-overview: Look for -text and -dark logo variants
When loading the LOGO icon name from /etc/os-release, append -text to
prefer a textual variant of the logo if it exists, and -dark if the
theme variant is dark.

This allows distributors to ship textual and dark variants of their
logos without adding more fields to /etc/os-release, or more code
specific to logo handling for specific distributions.

$LOGO: default icon
$LOGO-dark: default icon when dark theme is used
$LOGO-text: icon with text
$LOGO-text-dark: icon with text when dark theme is used
2021-05-21 15:00:20 +00:00
Jan Kot
df9c4d726f info-overview: Hide software_updates_row when allow-updates is false. 2021-05-07 03:56:48 +00:00
Mohammed Sadiq
8318d94e2f info: Use 'content' style for listboxes
Which results in rounded corners for the list box, which matches
the latest design.
2021-05-07 03:52:37 +00:00
Kalev Lember
a64bb833ee info-overview: Don't show GNOME micro version
With the new versioning scheme, GNOME just has major.minor versions
(e.g. 40.rc, 40.0) and micro versions are no longer used. Even if
gnome-desktop happens to get a micro version to fix a bug, it's not
something we should show in the UI.
2021-04-13 01:26:22 +00:00
Javier Fernández
f39cd5a93b info-overview: Implements usage of os-release to search for the OS logo
By default info-overview panel shows the Gnome logo from a static
resource, currently every distro patches this component to show their logos

info-overview panel could use `/etc/os-release` file to fetch the OS logo
instead this static resource
2021-02-11 14:04:14 +01:00
Felipe Borges
cc446bb2fb info-overview: Present Hardware "vendor" and "model" fields
These fields can help users identify their hardware vendor and model,
helping hardware vendors debug device specific problems.

This information is provided by systemd-hostnamed, which sources
this information from hwdb, and fallbacks to the DMI device. See
https://github.com/systemd/systemd/pull/15531

See https://teams.fedoraproject.org/project/silverblue/us/127
2021-01-27 13:47:28 +00:00
Robert Ancell
84c8803d76 info-overview: Search path for gnome-software rather than rely on exact location 2020-12-13 21:45:56 +00:00
Robert Ancell
e74a41794c info-overview: Remove unnecessary initialization of string.
Was introduced in 4d5f81e, but doesn't make sense or do anything.
2020-04-21 10:02:17 +12:00
Bastien Nocera
4d5f81e996 info-overview: Verify data coming from switcheroo-control
Don't crash if the data coming from switcheroo-control is somehow
garbage, and make sure that we actually got pairs of key-values.

Closes: #944
2020-04-08 14:13:45 +02:00
Felipe Borges
20566947ee info-overview: Set "Rename" button insensitive if no changes are made
Fixes #879
2020-02-28 15:43:44 +01:00
Bastien Nocera
783c13d0cc info: Fix sorting of GPU descriptions when there's more than one
Not that it makes that much of a difference, but none of the GPUs we
listed were marked as the default one. The variable that holds the
boolean variant was also changed to make it clearer that it held the
value rather than was a value.
2019-12-03 12:42:55 +01:00
Bastien Nocera
2007a5b240 info: Use new helper to fetch GL/GLES renderers 2019-11-06 09:27:10 +13:00
Bastien Nocera
2e17bc7516 info: Fix Graphics text with NVidia drivers or >2 GPUs
Use switcheroo-control to get the list of GPUs. For each one of the GPUs
listed, switcheroo-control will give us environment variable we should
set before running our helper to be able to get the renderer from it.

This means that it will finally work when one of the GPUs is driven
with the NVidia drivers, as switcheroo-control sets the correct envvars
for this driver, and that we also support more than 2 GPUs.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/601
2019-11-06 09:27:10 +13:00
Bastien Nocera
212e406d7f info: Remove "x11 or wayland" check
This check was added when Wayland support was added, so we wouldn't
try to run an X11-only helper. The helper now supports Wayland, and
gnome-control-center (and GNOME) only supports X11 and Wayland. In fact,
we always want to run that code.
2019-11-05 16:38:49 +01:00
Bastien Nocera
e121dbcebc info: Add windowing system field
This is supposed to give information that's not easily accessible to an
end user otherwise. It's supposed to give information "at a glance" and
should be removed when X11 is removed.
2019-11-04 18:59:27 -03:00
Mohammed Sadiq
8821a37ed2 info: Implement new design
This is based on the design at
https://teams.pages.gitlab.gnome.org/Design/web-experiments/settings/about
2019-10-29 10:13:23 +13:00