Commit graph

143 commits

Author SHA1 Message Date
Automeris naranja
788c3bacfb secure-shell-page: Port to AdwDialog 2024-04-09 09:18:31 +00:00
Xiaoguang Wang
535404bba2 datetime: Avoid emitting the time-changed signal
When setting the widget value, don’t emit the time-changed signal.

Fixes #2943
2024-04-09 09:07:11 +00:00
Automeris naranja
2bebe77422 remote-desktop: Use "copied to the clipboard" in AdwToasts
When using the copy buttons from Desktop Sharing/Remote Login pages,
the toasts don't show that the values were copied to the clipboard,
unlike in System > Secure Shell/About > System Details, for example.
So, fix this inconsistency.
2024-04-09 09:05:16 +00:00
Automeris naranja
a5aa2baa25 enterprise-login-dialog: Prevent buttons from being sensitive incorrectly
"Add" and "Enroll" buttons can still be sensitive without
calling main_page_validate() and enroll_page_validate()
respectively. Add an assertion check in both cases to
prevent these buttons being sensitive incorrectly.

Co-authored-by: Matthijs Velsink <mvelsink@gnome.org>
2024-04-08 13:54:04 +00:00
Ray Strode
ae2df95306 system, password-utils: Try to find word list harder
There are variety of word lists available in /usr/share/dict,
let's try more than just one.

Closes:
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2957
2024-04-08 10:57:20 +02:00
Automeris naranja
2c5f3169b3 region: Use the secondary-label property in all CcListRows
"Language" and "Format" rows show their value as a subtitle,
but this is inconsistent with Settings design pattern in which
the value label is shown at the right, so fix this inconsistency.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2914
2024-04-06 14:34:56 +00:00
Automeris naranja
7a7939d4ad date-time: Port dialogs to AdwDialog
Port the "Time Zone" and "Date & Time" dialogs to
AdwDialog.
2024-04-03 08:24:51 +00:00
Automeris naranja
c90d55b927 cc-tz-dialog: Minor UI tweaks to empty_page
- Use edit-find-symbolic
- Use "No Results Found" title
- Add "Try a different search" description
- Remove the margin-top because this causes the status
page to look misaligned

The first three changes will make the status page to look
more similar to the status page from the Settings sidebar
(when the search term doesn't return anything), improving
consistency.
2024-04-03 07:59:09 +00:00
Automeris naranja
17f2daaa9a users: Port "Add Enterprise User" dialog to AdwDialog 2024-04-02 16:00:56 +00:00
Automeris naranja
21bc6c5bb7 add-user-dialog: Port to AdwDialog 2024-04-02 15:16:00 +00:00
Automeris naranja
29f4fc46b0 system-details-dialog: Add top margin to "Software Information"
When the window is small, which makes the
"Hardware Information" and "Software Information"
sections to show vertically, the latter doesn't
properly separate from the first visually. Add a
top margin to fix that.
2024-04-02 15:11:40 +00:00
Automeris naranja
9ae687d827 system-details-window: Port to AdwDialog 2024-04-02 15:11:40 +00:00
Automeris naranja
62564c623f users: Don't use another style class for the remove avatar button
The "destructive-action" style class will already make
the button to have a red background.
2024-04-02 10:07:58 +00:00
Automeris naranja
df0c3a79d5 users: Use a single CSS for the entire panel
This also fixes the ".cutout-button" style being
set in "user-accounts-dialog.css", which is wrong
because this widget is located in the main panel
and not in the add user dialog.
2024-04-02 10:07:58 +00:00
Felipe Borges
994a540bfc system, datetime: Don't set datetime when auto time sync is enabled
The timedate1_call will fail because network time synchronization is enabled:

GDBus.Error:org.freedesktop.timedate1.AutomaticTimeSyncEnabled: Automatic time synchronization is enabled

Let's not set_time when NTP is not available, neither set time by
accident at the widget construction stage. When widgets signals are connected
in the UI file their respective callback was getting called. By moving
the signal connection to callbacks to the widget's _init method we
avoid the unwanted callback call.

Fixes #2945
2024-03-27 13:13:13 +00:00
Automeris naranja
6e3f7c6055 secure-shell-page: Use "Command copied to clipboard" string
When copying the login command, a toast appear
saying "Command copied". However, these kind of toasts
usually says that the text was copied *to the clipboard*,
like the toast from System > About > System Details > Copy.
2024-03-26 20:46:35 -03:00
Automeris naranja
2b1a66d7ce users: Rename "Add Enterprise User" to "Add Enterprise Login"
This button is labelled as "Add Enterprise Login" in
the mockups[1].

Also:
- Add missing mnemonic
- Add ellipsis to the button label, since it's required
when the button triggers further user interaction[2]

[1] a0e4f828ec
[2] https://developer.gnome.org/hig/guidelines/writing-style.html#ellipses
2024-03-25 15:08:29 +00:00
Philip Withnall
7bd8dd69cf users: Simplify parental controls keywords to remove spaces
Spaces aren’t supported in .desktop file keywords, as gnome-shell splits
the search term by spaces, and then prefix-matches each word separately
against the candidate keywords.

So a search term of ‘parental’ would match the ‘Parental Controls’
keyword, but a search term of ‘parental controls’ would not, as
‘controls’ doesn’t prefix-match anything.

Avoid that by removing spaces from the keywords.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: https://gitlab.freedesktop.org/pwithnall/malcontent/-/issues/48
2024-03-25 14:17:45 +00:00
Felipe Borges
942461d0d8 system, remote-desktop: Rename "RemoteSession" code to "RemoteLogin"
To be consistent with what we show in the UI and conciliate the
confusion with Secure Shell, which was formerly named "RemoteLogin".
2024-03-25 12:33:23 +00:00
Felipe Borges
9a05b542e2 system, secure-shell: Rename internal name from RemoteLogin
As the user facing name of this setting changed to "Secure Shell",
let's change its internal name to match it.

This avoids confusion with the Remote Desktop "Remote Session" setting,
which is now named "Remote Login" in the UI and should get its code
renamed to follow that consistently.
2024-03-25 12:33:23 +00:00
Felipe Borges
96cf88c68f system, remote-login: Fix header name typo
Fixes
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2211#note_2061610
2024-03-25 10:40:30 +00:00
Chris Williams
bdd1a1037a system/about: Make print-renderer helper log to stderr
This avoids debug logging appearing in the UI via stdout when
G_MESSAGES_DEBUG is used.

Fixes #2387
2024-03-21 11:00:45 +00:00
Automeris naranja
d5c66d25a0 about-page: Use property rows
Doing so, the system/hardware information rows
can be properly displayed in small screen sizes.
2024-03-21 09:32:48 +00:00
Felipe Borges
52f165f36b system: Load subpages on demand
Let's manually wire the row activation to the panel creation so that
we can create panels on demand.

This also makes calls to subpages directly avoid initializing the
other panels.

Fixes #2857
2024-03-20 15:48:57 +00:00
Felipe Borges
808ac116e2 system, remote-desktop: Don't start Desktop Sharing page hidden
At init it will verify whether the panel can be constructed in the
check_desktop_sharing_available call, and with that hide/show the
panel accordingly.

Fixes #2955
2024-03-18 11:49:17 +00:00
Automeris naranja
14f0a13162 add-user-dialog: Port to AdwToolbarView
Also, allow closing the dialog with ESC.
2024-03-14 10:57:18 +00:00
Automeris naranja
84ac927787 remote-login-page: Add missing mnemonic
Add mnemonic to the "SSH Login Command" row.
Also, use the letter "S" for the mnemonic of
the "Secure Shell" row.
2024-03-12 12:49:24 +00:00
Automeris naranja
cba40d5194 system: Fix broken mnemonics
Secure Shell and Software Updates rows are
using the letters R and U, respectively, for
their mnemonics. However, these letters are
already taken by other rows (Region & Language
and Users).

Fix that by choosing different letters.
2024-03-12 12:44:30 +00:00
Felipe Borges
a76ff8923f system: Use CcPanel.subpage for launching subpages
Rather than overriding the parameters property.
2024-03-12 10:03:08 +01:00
Automeris naranja
4de79c9694 remote-desktop-page: Minor UI changes to the "Encryption Fingerprint" dialog
Make this dialog design closer to what mockups
show[1] by:

- Removing window default-width/height,
so the window size follows the content size
- Using a compact AdwStatusPage
- Using larger fingerprint label horizontal margins
and reducing vertical ones

Also:

- Port the window to AdwToolbarView, which
makes the close button position to be consistent
with other windows
- Allow closing the window with ESC
- Add window size request properties to improve
adaptiveness

[1] cbb4810936
2024-03-12 00:46:21 +01:00
Automeris naranja
cb8819657b general: Rename "computer" strings to "device"
"Computer" isn't a suitable term for other device
form factors. Also, there are several strings in
Settings that already use "device", and cc-color-panel.ui
uses a mix of "computer" and "device" strings, which is
weird.
2024-03-11 15:19:55 +00:00
Matthijs Velsink
d26fb10c28 system, users: Remove leftover .desktop file
When the Users panel got moved to System, the original .desktop file was
also moved. However, that is now obsolute with
`panels/system/users/gnome-users-panel.desktop.in`. This old file is
also not referenced in any `meson.build` and contains an outdated `Exec`
line.

So, remove it.
2024-03-11 13:01:56 +00:00
Matthijs Velsink
672e911e09 users-page: Remove unused parameter
This parameter was accidentally left during changes to the original
commit in !2306, and was kept going into !2328.

Closes #2947
2024-03-06 18:31:25 +01:00
Automeris naranja
329e8c8fae remote-session-page: Fix to avoid a string freeze break
A previous commit[1] attempted to prevent "How to Connect"
section string from being translated twice[2].
Desktop Sharing and Remote Login pages have this same
string, but the latter was missing a period at the
end of the phrase, which caused the duplicated issue.

The commit[1] didn't fix the issue entirely, because
the string from the Desktop Sharing page was using
a different apostrophe symbol than the Remote Login page
counterpart (which is the recommended apostrophe symbol
acc. to HIG[3]).

Fix the issue by using the same apostrophe symbol mentioned
above in the string from the Remote Login page. This will
cause the translation from the Desktop Sharing string to be
reused, thus a string freeze break won't happen.

See also: https://gitlab.gnome.org/Teams/Translation/Coordination/-/issues/133

[1] b4131d3b0a
[2] https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2936
[3] https://developer.gnome.org/hig/guidelines/typography.html
2024-03-04 12:22:39 -03:00
Automeris naranja
b4131d3b0a remote-session-page: Add missing period to a phrase
The description text from the "How to Connect" session
doesn't end with a period, unlike the same description
that is located in the Desktop Sharing page[1]. This
unnecessarily duplicate the strings in Damned Lies
and creates an inconsistency.

Add a period to that description text to fix the issue.

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/46.rc/panels/system/remote-desktop/cc-remote-session-page.ui?ref_type=tags#L42

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2936
2024-03-04 05:05:34 +00:00
Ray Strode
857265c250 system, remote-desktop: Set port row insensitive when appropriate
Right now we set a subtitle of "" when the port is invalid. This
leads to the "Port" title getting center aligned vertically.

We also keep the port sensitive even when it's empty and there is
little value in copying it.

This commit changes the subtitle to " " so it serves as a
placeholder to keep the "Port" title top aligned. This commit
also makes the port insensitive in that case so the user never
copies the placeholder space.

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2934
2024-03-03 09:26:52 -05:00
Ray Strode
aa99ca5b5b system, remote-desktop: Set port row insensitive when appropriate
Right now we set a subtitle of "" when the port is invalid. This
leads to the "Port" title getting center aligned vertically.

We also keep the port sensitive even when it's empty and there is
little value in copying it.

This commit changes the subtitle to " " so it serves as a
placeholder to keep the "Port" title top aligned. This commit
also makes the port insensitive in that case so the user never
copies the placeholder space.
2024-03-03 09:26:40 -05:00
Adrian Vovk
87a62a7c4a users: Fixup buggy AdwNavigation behavior
Previously, events from accountsservice would be used to change the
state of the AdwNavigation in ways that don't correspond to the event
that happened. For example, deleting an account would pop the top page
off the stack, even if that page didn't belong to that account.

Especially buggy is the behavior of replacing the currently visible page
with the contents of an account that just changed. systemd-homed changes
the user record whenever authentication happens successfully. So, user
Foo might be trying to edit user Bar, type in their password at the
polkit prompt, and end up looking at a broken version of their own
settings page again: the title would be "Bar", there'd be no list of
users, and hitting the back button would take Foo back to the same
settings page they're currently looking at.

This commits refactors the handling of the accountsservice signals to
fix all the bugs

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2911
2024-03-03 09:19:13 +00:00
Automeris naranja
bb604ad9dd remote-desktop-page: Decrease AdwBreakpoint max-width
650p is way too much and makes the bottom bar to
appear when there is still space available in
the headerbar. Use 450p so the bottom bar will only
appear when the headerbar doesn't have enough
space available.

Follow-up from a4224d9e21
2024-03-02 23:07:35 -03:00
Automeris naranja
a4224d9e21 remote-desktop-page: Use AdwBreakpointBin
When the window width is small, the view switcher
labels get very ellipsized, making them difficult
to read.

Use AdwBreakpointBin to show the view switchers
at the bottom at the page (like in the Mouse & Touchpad
panel) when the window width is small.
2024-03-02 22:50:01 -03:00
Automeris naranja
d9be89a5de remote-desktop: Fix page contents being cut when window is small
- Use halign correctly ("left" and "right" aren't
valid values) and use hexpand in the
"Verify Encryption" button, since halign needs
hexpand set to "true"

- Ditch the spacer box, as it causes the page contents
to not scale correctly when the window width is small

- Add can-shrink property to "Generate New Password" and
"Verify Encryption" buttons so they can shrink when
the window width is small

- Also, set the margin-top only in the GtkBox to avoid
redundancy

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2933
2024-03-02 22:49:45 -03:00
Automeris naranja
e84623473c remote-session-page: Several small fixes
- Fix the activatable-widget from port_row,
which was pointing to copy_address_button

- Remove a11y labels from copy buttons
because Orca also reads tooltips

- Remove .property style class from entry rows
since this class is only meant to be used
in AdwActionRow and AdwExpanderRow[1]

- Set the copy buttons as suffix widgets
directly, because wrapping them in a GtkBox
is unnecessary

- Fix indentation

[1] https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html#property-rows
2024-03-02 19:58:47 -03:00
Automeris naranja
7ec7e98df6 desktop-sharing-page: Several small fixes
- Fix the activatable-widget from port_row,
which was pointing to copy_address_button

- Remove a11y labels from copy buttons
because Orca also reads tooltips

- Remove .property style class from entry rows
since this class is only meant to be used
in AdwActionRow and AdwExpanderRow[1]

- Set the copy buttons as suffix widgets
directly, because wrapping them in a GtkBox
is unnecessary

- Fix indentation

[1] https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/style-classes.html#property-rows
2024-03-02 19:58:39 -03:00
Ray Strode
2f66bd7ab5 system, remote-session: Stop critical if no fingerprint
The code currently assumes that if the fingerprint is non-null it's
valid, but gnome-remote-desktop can also set the fingerprint to an
empty string if there's no certificate yet.

This commit makes sure to handle both NULL and empty fingerprints.
2024-03-02 17:43:48 +00:00
Ray Strode
f3b966ba5b system, remote-session: Fix fingerprint dialog when first setting user/pass
If the username and password get set then the certificate fingerprint
isn't updated even if that lets the service start.

This commit fixes things by doing a round trip through the service after
setting the username/password to

1. Make sure the change actually worked
2. Trigger our fingerprint dialog setting code that currently only runs
on reading username/password
2024-03-02 17:43:48 +00:00
Ray Strode
10ac3e8440 system, remote-desktop: Add Generate New Password button
The designs for remote desktop include a generate password
button, so this commit adds one.
2024-03-02 11:10:54 -05:00
Felipe Borges
b001b2dde5 system, remote-desktop: Add "Remote Session" settings
See 85110609cd/remote-desktop/remote-desktop.png
2024-03-02 11:10:54 -05:00
Felipe Borges
524742acec system, remote-desktop: Update strings and styling for "Desktop Sharing"
Following the updates on the mokcups at
85110609cd/remote-desktop/remote-desktop.png
2024-03-02 10:58:35 -05:00
Ray Strode
4b35dd5b8c system, remote-desktop: Generate D-Bus proxy code for gnome-remote-desktop
We'll need this to query the status of the service for
Remote Session support.
2024-03-02 10:54:18 -05:00
Ray Strode
cf39376cca system, remote-desktop: Add new polkit policy
Remote session support needs to be able to start systemd units
and also manage gnome-remote-desktop.

This commit adds a polkit policy to accomodate both subactions
with one overarching action that only needs to be unlocked one time.
2024-03-02 10:54:18 -05:00