Commit graph

7583 commits

Author SHA1 Message Date
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
Eric Daigle
322830e3cc keyboard: fix input row movement options
As described in #2565, the "Move Up" and "Move Down" popover menu options
are currently displayed for all input rows in the list, doing nothing if clicked
when a row is at the top or bottom of the list respectively. This commit adds
checks when creating and moving the input rows and disables these options at the
top and bottom of the list respectively, removing a useless menu option.

Fixes #2565
2023-07-17 09:19:09 +00:00
Eric Daigle
a85bc780dc search: fix search panel row movement options
As described in	#2565, the "Move Up" and "Move Down" popover menu options
are currently displayed	for all	search panel rows in the list, doing nothing
if clicked when a row is at the top or bottom of the list respectively.
This commit adds checks when creating and moving the search panel rows
and disables these options at the top and bottom of the list respectively,
removing a useless menu option.

Fixes #2565
2023-07-17 09:19:09 +00:00
Carlos Garnacho
4e340b7602 keyboard: Spawn "tecla" to show keyboard map
This is a modern replacement for gkbd-keyboard-display, stuck in gtk3
and X11 (libxklavier).
2023-07-13 13:11:13 +00:00
Felipe Borges
d0dd72f747 online-accounts: Improve "offline" message text
According to mockups at
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/online-accounts/online-accounts.png
2023-07-12 18:03:59 +02:00
Felipe Borges
9ca9c03d06 online-accounts: Use AdwBanner to indicate when we're offline
Fixes #2201
2023-07-12 18:01:06 +02:00
Automeris naranja
2e8bf16a25 online-accounts: Improve the title of the account providers section
This change modifies the title of the account providers section
to follow the mockup below:

https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/online-accounts/online-accounts.png
2023-07-12 17:58:32 +02:00
Automeris naranja
b637117bf6 online-accounts: Update the a11y label of the connected accounts section
The a11y label of the accounts section was linked to the "accounts_label" object,
which got replaced by the panel description in https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1669/diffs?commit_id=597a83d2df465585b7ea216a199e3b2940afca40
2023-07-12 17:58:32 +02:00
Automeris naranja
6d99393981 online-accounts: Add title for the connected accounts section
This change adds a title for the connected accounts section
in order to follow the mockup below:

https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/online-accounts/online-accounts.png
2023-07-12 17:58:32 +02:00
Automeris naranja
b29b5ca259 online-accounts: Add panel description
This change adds a description to the Online Accounts panel
in order to follow the mockup below:

https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/online-accounts/online-accounts.png
2023-07-12 17:58:32 +02:00
Felipe Borges
2bfc70782c user-accounts: Set widget sensitivities when we can't obtain GPermission
The banner will show a message indicating a failure to Unlock the panel,
but we still should "lock" widgets by making them sensitive accordingly
to the current permission.

Fixes !1708
2023-07-12 15:57:06 +00:00
Felipe Borges
5bc8ffe8e0 common: Handle when CcPermissionInfobar doesn't have a GPermission
The widget should default to showing the error message when its
missing its respective GPermission object, instead of throwing
a critical error message.

We also hide the "Unlock" button when there's no GPermission set.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1708
2023-07-12 15:57:06 +00:00
Felipe Borges
9ff812f6e8 common: Add default title to Permission Infobar
Whenever there isn't a GPermission set, the infobar should show
"Error: some settings cannot be unlocked".

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1708#note_1742075
2023-07-12 15:57:06 +00:00
velsinki
38ed5ec2df users: close CcAvatarChooser before GtkFileDialog
This makes sure the focus is immediately on the GtkFileDialog instead of
the CcAvatarChooser behind it. This was already added in !1685, but was
accidentally removed in !1822.

Fixes #2315
2023-07-11 11:30:46 +00:00
Marcos Miller
b5ce4fafcd keyboard: replace 'gtk_widget_hide' and 'gtk_widget_show' 2023-07-03 10:33:39 +00:00
Marcos Miller
f35779a0b0 Keyboard: elements jump in UI
When editing shortcut key combination and this new combination already
exists in another shortcut, a message (new_shortcut_conflict_label) is
shown, but when clicking on the reset button (reset_custom_button) the
elements Name, Command and Shortcut skip.

It turned out that these jumps were due to the current values of the
width_chars and max_width_chars properties of the new_shortcut_conflict_label
element. So by setting these properties to zero the jumps don't occur.
2023-07-03 10:33:39 +00:00
Marcos Miller
e7de7e3941 Keyboard: Align button to create shortcut
The 'Set Shortcut...' button is inside a GtkStack having only one
column, not allowing to expand it.

I removed GtkStack keeping its 'Set Shortcut' child taking up two
columns.

[Issue #2107](https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2107)
2023-07-03 10:33:39 +00:00
Lukáš Tyrychtr
701f7c6cf6 users-panel, cc-awatar-chooser: Don't request a symlink target for a file info when
it is not a symlink.

That previously caused a debug message, but will cause a g_critical.
Fixes #2547
2023-07-03 10:25:41 +00:00
Mohammed Sadiq
d4dee45d76 user-accounts: Fix some memory leaks 2023-07-03 01:56:24 +00:00
Mohammed Sadiq
53092efece a11y: Fix a memory leak 2023-07-03 01:56:24 +00:00
Mohammed Sadiq
c22f03e2a6 search: Fix a memory leak 2023-07-03 01:56:24 +00:00
Mohammed Sadiq
1e4ef1fdb0 power: Fix a memory leak 2023-07-03 01:56:24 +00:00
Mohammed Sadiq
39f21e4229 network: Fix some memory leaks 2023-07-03 01:56:24 +00:00
Felipe Borges
fd1ac377ae network: Use AdwSwitchRow for wifi device enable row
In commit 2a33247f52 the
cc_list_row_get_active() method got removed despite still being
used in the network settings. This was breaking our build.
2023-06-30 11:52:42 +02:00
Lukáš Tyrychtr
b706f1261b network-connection-editor: Fix a keyboard trapped on the Cancel button when adding a VPN connection
It required two changes:
* Setting the stack page only after all pages are initialized
* And removing the VPN choices list from its bin only after that
2023-06-30 09:37:21 +00:00
Marco Melorio
2a33247f52 common: Remove switch feature to CcListRow
AdwSwitchRow should be used now instead.
2023-06-30 09:06:56 +00:00
Marco Melorio
b75bb10bb6 misc: Replace usage of CcListRow + switch with AdwSwitchRow
That feature will be removed in the next commit.
2023-06-30 09:06:56 +00:00
Marco Melorio
f9cd79e871 wwan: Replace usage of CcListRow + switch with AdwSwitchRow 2023-06-30 09:06:56 +00:00
Marco Melorio
d62378058f ua: Port to AdwSwitchRow
This was easy since it was already using CcListRow which is already a
switch wrapper.
2023-06-30 09:06:56 +00:00
Marco Melorio
25ad05ebe6 apps: Remove CcToggleRow and use AdwSwitchRow instead 2023-06-30 09:06:56 +00:00
Eric Daigle
c639561982 cc-firmware-security-dialog: don't translate technical report
As described in #2524, the technical report copied from the device security panel
is currently translated, potentially confusing supporters and developers who
expect bug reports to be in English.

This commit makes the strings used to compile the technical report non-translatable,
causing the report to be compiled in English regardless of the user's locale settings.

Closes #2524

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1831>
2023-06-28 00:44:00 +00:00
velsinki
b942a4a6b4 users: Draw avatar crop corners to inside of crop
The crop corners were drawn with the center of the corner lines at the
edges of the crop. This resulted in the corners being visually cut if
the crop is dragged to the edge of the image. Instead, we can draw the
corner lines such that they are inside the edge of the crop, i.e.
shifted by half their linewidth.

We now use relative moves to draw the lines, which simplifies the
movements.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1824>
2023-06-28 00:05:36 +00:00
velsinki
5e87979815 users: Improve rounding of avatar crop edges
If crop.x changes due to a drag, crop.x + crop.width remains fixed, as
thet is the opposite edge. However, in the mapping of paintable to
widget coordinates, crop->x + crop->width can vary due to rounding
errors. This fixes that, so that crop->x + crop->width does not vary,
with the same fix in the y direction.

However, the edges of the circle can still remain jittery due to integer
rounding, which is not fixed by using 'width / 2.0' instead of 'width /
2', since the width and height might differ by a pixel. Instead, draw an
ellipse, which removes edge jitter completely.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1824>
2023-06-28 00:05:36 +00:00
Dirk Su
b7c0c42317 Check best_mode exist before adding flag
When there is no compatible clone mode, the best_mode will be NULL
. It will cause gnome-control-center crash when access to the
variable.
2023-06-27 23:34:23 +00:00
Automeris naranja
34e8c96cb5 apps: Use header capitalization in the "No apps" AdwStatusPage
This change adds header capitalization to the "No apps" AdwStatusPage
title and to the "Install some..." button.

https://developer.gnome.org/hig/guidelines/writing-style.html
2023-06-27 16:32:44 -03:00
Automeris naranja
083b70758d apps: Add mnemonics to several buttons
This change adds mnemonics to the following buttons:

- Install some...
- App Details
- Open
- Clear Cache
2023-06-27 16:28:10 -03:00
Automeris naranja
cc76a6289c bluetooth: Add mnemonic to the "Turn Off Airplane Mode" button 2023-06-27 16:25:08 -03:00
Automeris naranja
c136cf5d65 firmware-security-dialog: Add mnemonic to the "Copy Technical Report" button 2023-06-27 16:24:30 -03:00
Automeris naranja
4151c06012 keyboard-shortcut-dialog: Add mnemonic to the "Add Shortcut" button 2023-06-27 16:23:42 -03:00
Automeris naranja
d621855dc8 users: Add mnemonics to the "Remove User" and "Add User" buttons 2023-06-27 16:22:56 -03:00
Automeris naranja
9469c3c674 printers: Add mnemonics to the "Add Printer" buttons 2023-06-27 16:21:37 -03:00