Commit graph

55 commits

Author SHA1 Message Date
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +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
05187608f5 info-overview: Fix Software Updates row
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1587
2022-01-22 13:16:37 -08:00
Georges Basile Stavracas Neto
0ab20af9ba panels: Switch to CcPanel content
Start porting panels to the new panel format. This commit
temporarily makes panels have two titlebar, which will be
fixed soon.
2022-01-20 02:23:42 +00:00
Jan Beich
37b29c32cb meson: drop unused argument for i18n.merge_file()
Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.

panels/applications/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/background/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/camera/meson.build:10:5: ERROR: Function does not take positional arguments.
[...]
2022-01-07 17:22:43 +00:00
Christopher Davis
88027fc310 info-overview: Vertically clamp OS Logo
Otherwise it would grow as large as the page would let
it.
2022-01-06 22:15:30 +00:00
Christopher Davis
96ecd3acdf info-overview: Use AdwPreferences{Page,Group} 2022-01-06 22:15:30 +00:00
Christopher Davis
e637f47e78 cc-list-row: Subclass AdwActionRow
AdwActionRow handles many of the properties we use
CcListRow for. We can re-use it instead of re-creating it.

CcListRow is now an AdwActionRow with three suffixes.
The `activatable-widget` is set when the switch is visible.

Since our `icon-name` property was only used for the arrow
icon, it has been replaced with a `show-arrow` property.

The `bold` property has been removed - it was only used in
one place, and it's not a pattern used in other apps.

I decided to go this route because replacing all the
instances of CcListRow with AdwActionRow directly would
end up being more code.
2022-01-06 08:56:12 -08:00
Christopher Davis
981a8cea7b panels: Use .boxed-list instead of .content
The `.content` style class is deprecated in favor
of the `.boxed-list` style class, which is named
after the design pattern it's used for.
2021-12-16 12:52:44 -08: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
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