Commit graph

113 commits

Author SHA1 Message Date
Felipe Borges
f5a008ce74 info-overview: Make System Details dialog more compact
Following the mockups at
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2573#note_1805506

Fixes #2573
2023-08-14 06:34:03 +00:00
Felipe Borges
0c9498d1f8 Mark some strings as translatable
These are strings that are presented in the UI that were not marked
for translation.

Fixes #2596
2023-08-11 12:07:00 +02:00
Alice Mikhaylenko
8df9709240 info-overview: Add mnemonic to the copy button 2023-08-02 12:51:48 +00:00
Alice Mikhaylenko
3535479c23 info-overview: Use AdwButtonContent for the copy button 2023-08-02 12:51:48 +00:00
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
Lukáš Tyrychtr
8c361e28cc info-overview: Label the system details that they make sense with a screen reader
Before this, the user could easily only access the property values,
not te names or group titles.
2023-07-18 13:51:31 +00:00
Cyber Phantom
32f2d9ea8d info-overview: Style the system information output as markdown 2023-07-17 09:25:26 +00:00
Cyber Phantom
27a20b026d info-overview: Show a toast notification when copying system report
It helps to imply that the copy action has completed.
2023-07-17 09:25:26 +00:00
Cyber Phantom
e90321f89b info-overview: Make the "Copy" button functional
The copy button now generates a system information report with all the system information.
The information is generated by calling the same methods used when populating the System Information window.
2023-07-17 09:25:26 +00:00
Cyber Phantom
b9a905f298 info-overview: Create dbus proxy inside get_gnome_version
get_gnome_version() relies on shell_proxy_ready() to provide it with shell proxy.
This means that we cant call get_gnome_version() without providing proxy as an argument which is fine normally but becomes tedious if we want to call this function multiple times in different scopes.

Fix this by creating the shell proxy inside get_gnome_version() function instead.
2023-07-17 09:25:26 +00:00
Cyber Phantom
2a1e5a5de8 info-overview: Remove unused gpu_data_free function
Since we're no longer processing the list of graphics devices inside of get_renderer_from_switcheroo, there's no need for this function
as the the list now gets passed around to a different function and automatically freed once it goes out of scope.
2023-07-17 09:25:26 +00:00
Cyber Phantom
f4bc3efb0f info-overview: Reverse the weights of default and non default GPUs in gpu_data_sort
Default and non default GPUs were associated with a weight of 1 and -1 respectively which meant default gpus were treated
as a "bigger" entity than non default ones. It meant that when sorting a list of GpuData, the default gpu would end up
at the end of the list since it was treated as the biggest. The resultant list after sorting would end up something like

our pointer
  |
  |
<gpu>, <gpu>, <gpu>, <gpu>, <default gpu>

With this change the weights of these gpus have been exchanged, making the default gpu to be treated as "smaller" this
changing the order of the sorted list into something like

our pointer
  |
  |
<default gpu>, <gpu>, <gpu>, <gpu>, <gpu>

This is pretty useful because when creating the gpu information row entries in create_graphics_rows, the default gpu is processed first so it becomes the first element added to the gpu entry list which is how we would expect it to be.
2023-07-17 09:25:26 +00:00
Cyber Phantom
7883b8e200 info-overview: Don't put an index at the end of default graphics device
This change brings it more inline with the mockup and it makes sense to not have a number for the default graphics device as that
s always going to be the first device.
2023-07-17 09:25:26 +00:00
Cyber Phantom
9b6993607f info-overview: Show each graphics device in it's own row
Part 1:

Currently all graphics devices have to share a single row for their names, this method doesn't pretty well for devices with long names or computers that may have multiple GPUs.
The new mockup fixes this by having a separate entry for each graphics device.

This commit turns graphics_row into a GtkBox, graphics_row is going to act like a space where gpu entries will be placed.
graphics_row will be populated in the code using create_graphics_row() to have separate entries for each graphics device

Part 2:

Currently all graphics devices have to share a single row for their names, this method doesn't pretty well for devices with l>
The new	mockup fixes this by having a separate entry for each graphics device.

This commit adds a method to popuplate graphics_row with GPU information entries.
It uses the existing logic from get_renderer_from_switcheroo to iterate over a list of graphics devices and build a CcInfoEntry for each device.
It finally appends the widget to graphics_row

Part 3:

Currently all graphics devices have to share a single row for their names, this method doesn't pretty well for devices with l>
The new mockup fixes this by having a separate entry for each graphics device.

The list of graphics devices is now processed in create_graphics_rows function, so remove that logic from get_renderer_from_switcheroo () and return a GSList instead of a string.
graphics_hardware_string has been renamed to graphics_hardware_list to imply the change.
Since create_graphics_rows expects a list, get_graphics_hardware method has been modified to create a renderer list from the outputs of get_renderer_from_session or get_renderer_from_helper in case that get_renderer_from_switcheroo fails.
2023-07-17 09:25: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
Cyber Phantom
8049135849 info-overview: Introduce CcSystemDetailsWindow
Introduce a new widget that will be used for displaying System Information in the about section
2023-07-17 09:25:26 +00:00
Cyber Phantom
f00643730e info-overview: Introduce CcInfoEntry
As of right now, we're using CcListRow to present information in the about section which is derived from AdwActionRow.
ActionRows have a certain style to them which doesn't match what the new mockup is going for.

This widget is made to closely match the requirements of the new design and will be used to replace CcListRow.
Methods to create a new InfoEntry as well as set value for a InfoEntry have also been provided.
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
Pablo Correa Gómez
7f7b65545c all: meson: do not specify resources from gresource files as dependencies
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
2023-05-24 08:34:14 +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
Bastien Nocera
6b97d27ea3 info-cleanup: Add test for info-cleanup
To make it easier to see whether our changes had the intended effect.
2022-12-02 13:11:13 +00:00
Bastien Nocera
a9ff350dbf info-overview: Remove "Mesa" prefix for Intel Iris driver
Remove "Mesa" from the start of the device name, it's data about the
driver which isn't relevant to us. It's always added before the name
of the device in `src/gallium/drivers/iris/iris_screen.c` in mesa.
2022-12-02 13:11:13 +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
Michael Catanzaro
bc01d726f5 info-overview: never upscale the system logo
If we scale up, the logo will become blurry. We should only ever be
willing to scale down, not scale up.

Hopefully fixes #1709
2022-10-25 15:08:53 -05:00
Jake Dane
89443fe550 desktop: Remove obsolete Bugzilla entries
The `X-GNOME-Bugzilla-*` entries were for use by bug-buddy, a GNOME 2
technology that's been gone for over a decade. These entries are
obsolete and can be removed from all desktop files.

The `X-GNOME-Settings-Panel` entry is also obsolete as far as I can
tell and only these panels had it in their desktop file: notifications,
sharing, sound and user-accounts. These entries can also be removed.

After removing the `X-GNOME-Bugzilla-*` entries, the desktop files have
no more variables in them. The meson `configure_file` step is therefor
pointless—there are no variables to configure. As such the
`*.desktop.in.in` files are renamed to `*.desktop.in` to reflect this
and `meson.build` files are modified to remove `configure_file` step.
2022-10-20 13:20:09 +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
Mohammed Sadiq
a4aa214d76 info-overview: Use adw-external-link icon
Replace the use of external-link-symbolic which doesn't
work with dark theme
2022-08-17 08:09:15 +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
d253fe188c info-overview: Add a placeholder while the GNOME version loads 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
Lukáš Tyrychtr
df30f44709 Fix indent 2022-05-10 21:35:50 +00:00
Lukáš Tyrychtr
450c05471b Label the device name textbox for a11y 2022-05-10 21:35:50 +00:00
Norbert Pfeiler
88e19f50c9 info-overview: Replace llvmpipe with “Software Rendering” 2022-03-23 09:36:24 +00:00
Norbert Pfeiler
a57d31f0cf info-overview: Add some commonly used trademarks
Those are not always present in the device string.
Guidance was taken from the usage on vendor websites.

NVIDIA actually has the rights to GTX™ but doesn’t seem to use it,
in contrast to RTX™.
2022-03-23 09:36:24 +00:00
Norbert Pfeiler
16fc5a95f8 info-overview: Remove some rare @ x.yz GHz specification 2022-03-23 09:36:24 +00:00