Commit graph

22833 commits

Author SHA1 Message Date
Lukáš Tyrychtr
ba79d849af displays: Use an AdwComboRow for the schedule type of the night light page
GtkComboBox is deprecated and not accessible, so this one is definitely better from this point of view.
2023-07-18 08:29:43 +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
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
Sabri Ünal
0b92a773a3 Update Turkish translation 2023-07-15 15:43:55 +00:00
Ngọc Quân Trần
b3509176e6 Update Vietnamese translation
(cherry picked from commit 41cfc2771d)
2023-07-15 02:14:13 +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
Yosef Or Boczko
e5ec9c0c51 Update Hebrew translation 2023-07-13 08:36:38 +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
Felipe Borges
250767e720 ci: Install dnf5-plugins instead of dnf-plugins-core
Since "builddep" is part of dnf5-plugins in DNF5.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/jobs/2933787

Unknown argument "builddep" for command "dnf5". Add "--help" for more information about the arguments.
$ echo "== Installing =="
== Installing ==
$ ninja -C _build install
ninja: Entering directory `_build'
ninja: fatal: chdir to '_build' - No such file or directory
Cleaning up project directory and file based variables 00:02
ERROR: Job failed: exit code 1
2023-07-11 13:16:52 +02:00
Felipe Borges
1e73e10435 ci: Add sassc dependency
Needed for our libadwaita local build.
2023-07-11 13:16:39 +02:00
Yosef Or Boczko
1290ae1170 Update Hebrew translation 2023-07-04 13:59:00 +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
Felipe Borges
a25697c2bc po: Add shell/cc-panel.ui file to POTFILES.in
Commit 266c55715a added a translatable
string to shell/cc-panel.ui file but the file wasn't marked for
translations.
2023-07-03 02:21:54 +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
Bruce Cowan
814a0990d7 Update British English translation
(cherry picked from commit 7f4603797b)
2023-07-02 20:12:51 +00:00
Sergej A
f5ae19ccc5 Update Russian translation 2023-06-30 12:37:00 +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