Commit graph

91 commits

Author SHA1 Message Date
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
Bastien Nocera
d0ecd000ff info-overview: Don't overlink print-renderer helper
Causes build errors linking against the builtin libhandy:
ninja: error: '/home/hadess/Projects/gnome-install/lib/libhandy-1.so', needed by 'panels/info-overview/gnome-control-center-print-renderer', missing and no known rule to make it
2020-12-11 17:24:09 +00:00
Adrien Plazas
f06379e30c Replace HdyColumn by HdyClamp
In libhandy 1, HdyClamp replaces HdyColumn. This stops setting values
when they match HdyClamp's defaults.
2020-07-20 08:04:28 +02:00
Adrien Plazas
9e2a2836d9 Use GtkDialog instead of HdyDialog
HdyDialog has been dropped in libhandy 1.
2020-07-20 08:04:28 +02: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
Mart Raudsepp
4d7406b8af info: Raise udisks minimum dependency for g_autoptr usage
g_autoptr(UDisksClient) usage was added, but udisks added the support
only in v2.8.2

Fixes: 6815787012
2020-04-16 04:06:11 +00: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
Robert Ancell
cd813016e4 info-overview: Replace ifdefs with #pragma once 2019-11-27 21:56:10 +00:00
Mohammed Sadiq
b871084080 info-overview: Fix a memory leak 2019-11-08 14:40:23 +05:30
Bastien Nocera
2007a5b240 info: Use new helper to fetch GL/GLES renderers 2019-11-06 09:27:10 +13:00
Bastien Nocera
5f6d5b77ac info: Add helper to print the GL/GLES renderer
This is a simplification of code that used to be in
gnome-session-check-accelerated.
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
3e39feb046 info: No need to put TM and (R) as exponents
The font glyphs already put those characters in the upper right of where
the character should be.
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
Robert Ancell
8a36c515e9 info-overview: Drop private structure
This class is not extended, so doesn't need it.
2019-10-29 09:47:41 +13:00
Alexandru Năstase
337e1efda0 info: Add 'hostname' keyword to info overview 2019-10-28 20:16:24 +00:00
Robert Ancell
9a2e821fe5 Initialize autoptr values to NULL.
These cases were safe, but if the code changed this risked freeing uninitialized
memory.
2019-10-03 10:58:38 +13:00
Robert Ancell
74740f5001 info-overview: Use GTK widget types 2019-09-25 13:50:28 +00:00
Robert Ancell
6815787012 info-overview: Simplify UDisks code
The client was stored in the class, but only used once at the time it was
acquired. All calls are sync.
2019-09-25 13:50:28 +00:00
Robert Ancell
01ffa51dc6 info-overview: Drop unused cancellable
It wasn't used and there were no async calls to connect it to.
2019-09-25 13:50:28 +00:00
Robert Ancell
12c95ab891 info-overview: Simplify getting graphics string
Previous code used a strucure with one element and stored it even though it was
only used once at the point it was determined.
2019-09-25 13:50:28 +00:00
Robert Ancell
85da3bc062 info-overview: Drop unused data from panel class.
The variables are stored in the panel but only used once. Two of them are never
used.
2019-09-25 13:50:28 +00:00
Robert Ancell
9fba05a287 info-overview: Move signal handler code into UI file 2019-09-25 13:50:28 +00:00
Robert Ancell
5f2081fe46 info-overview: Give appropriate name to widget 2019-09-25 13:50:28 +00:00
Robert Ancell
8e9e84853d info-overview: Drop unnecessary grid reordering code
When the virtualization widgets are hidden, the following widets don't need to
move up. This seems to be due to the orignal author thinking this was required
or a bug in GTK rendering a double space between these rows.
2019-09-25 13:50:28 +00:00
Robert Ancell
8f8924b067 info-overview: Drop unused reference to system image 2019-09-25 13:50:28 +00:00
Robert Ancell
713f138907 info-overview: Drop unused widget IDs 2019-09-25 13:50:28 +00:00
Robert Ancell
b02a49cfc6 info: Rename info panel to info-overview for consistency 2019-09-09 21:52:08 +00:00