Commit graph

529 commits

Author SHA1 Message Date
Automeris naranja
4b56c8b666 keyboard-shortcut-dialog: Fix typo in function name 2024-03-01 09:45:42 +00:00
Automeris naranja
0aeb0b55a7 general: Add translator comments about the "Search" term
Clarify in which occasions this term should be
phrased as a verb or as a noun.

Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2903
2024-02-29 13:48:20 +00:00
Automeris naranja
1978468396 general: Remove a11y label from some search entries
These search entries have placeholder texts,
which are also read by Orca. Therefore, using
an a11y label is redundant.

Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2903
2024-02-29 13:48:20 +00:00
Automeris naranja
d997c6e0fa general: Remove "activatable" property from some CcListRows
The CcListRow template already sets the row
as activatable[1].

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/gnome-45/panels/common/cc-list-row.ui?ref_type=heads#L4
2024-02-20 07:32:37 +00:00
Matthijs Velsink
3a253bc4b1 general: Use g_clear_handle_id to remove GSources
Using `g_clear_handle_id()` in combination with `g_source_remove()` can
save a lot of boiler plate code.

This removes about 110 lines of code for free.
2024-02-06 09:22:07 +00:00
Monster
d2abde0349 keyboard: Remove periods in descriptions 2024-02-05 10:57:11 +00:00
Automeris naranja
b1d1302053 general: Remove a11y labels from buttons that have tooltips
Orca also reads tooltips, so having both a11y labels
and tooltips is redundant.

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2023#note_1915854
2024-01-30 13:28:48 +00:00
Automeris naranja
735e12ada6 xkb-modifier-dialog: Use AdwActionRow to show the key options
Ditch GtkListBox and use AdwActionRow to display
the key options, adding them directly to the
preferences group.

This fixes two issues:
- Orca not reading the key options and their states
- The xkb-modifier-dialog rows looking inconsistent
with other rows with radio buttons, such as the ones
from the Multitasking and Keyboard panels

Also, remove visible=true from the AdwActionRow,
since GTK4 shows all widgets by default.
2024-01-25 12:58:00 +00:00
Bharat
19e75e0fb0 Keyboard: Add title to AdwNavigationPage
Add blank title to AdwNavigationPage
in the cc-keyboard-shortcut-dialog.ui

Fixes #2850
2024-01-22 14:10:12 +00:00
Automeris naranja
af72bcaabd xkb-modifier-dialog: Port to AdwPreferencesPage
Also, use `<property name="content">` to put the
content widgets.
2024-01-18 12:07:53 +00:00
Automeris naranja
ae73d2d324 input-chooser: Reduce window width
The input chooser window width is unnecessarily
big, so this change reduces it to avoid unused space.
2023-12-21 09:30:06 +00:00
Automeris naranja
5cf922a24e keyboard-shortcut-dialog: Add mnemonic to the "Reset All" button
Also, organize the properties (from the "Reset All" button)
together in the .ui file instead of mixing them with the signal name.
2023-12-14 16:46:34 -03:00
Kevin Bullock
f19a7abf59 keyboard: Add Left Ctrl to Compose Key options 2023-11-29 19:37:47 +00:00
Automeris naranja
f15d260323 input-row: Add tooltip to the ellipsis button from CCInputRow
Closes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/605
2023-11-29 10:12:30 +00:00
Automeris naranja
a0d7c2b13f keyboard-shortcut-dialog: Make search entry smaller
The search entry is way too big, even more than
all shortcut category rows; this makes the UI
to look unbalanced. Make the search entry smaller
to fix that.
2023-11-27 09:54:02 +00:00
Automeris naranja
3416dab979 keyboard-shortcut-dialog: Tweak reset shortcuts confirmation dialog
Properly explain what resetting shortcuts actually does.
String reference:
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2669#note_1921867

Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2669
2023-11-27 09:54:02 +00:00
Automeris naranja
5611dd2fc5 keyboard-shortcut-dialog: Tweak Reset button
Move the Reset button to the bottom add
.pill and .destructive-style classes to it. Also,
remove its tooltip.

Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2669
2023-11-27 09:54:02 +00:00
Marcos Miller
2e96b6d8cd keyboard: port ShortcutEditor from GtkDialog for AdwWindow/AdwToolbarView
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2624
2023-11-24 10:26:31 +00:00
Automeris naranja
8322ccf6c1 input-chooser: Rename "Add an Input Source" to "Add Input Source"
This will be consistent with the writing style used in Settings
(e.g. "Connect to Hidden Network" and "Add Printer" instead of
"Connect to a Hidden Network" and "Add a Printer" respectively).
2023-11-24 09:41:33 +00:00
Automeris naranja
3c0c5b7423 keyboard: Add missing mnemonics
Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2541

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2049>
2023-11-24 00:23:21 +00:00
Automeris naranja
ea31bb091e keyboard-shortcut-editor: Add mnemonic to the "Set Shortcut" button
Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2541

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2049>
2023-11-24 00:23:21 +00:00
Automeris naranja
c961832741 keyboard-shortcut-dialog: Add missing mnemonics
Partially fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2541

Part-of: <https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2049>
2023-11-24 00:23:21 +00:00
Lukáš Tyrychtr
536612b00e keyboard: Add Insert as a choice for the compose key
Fixes #2765
2023-11-23 12:34:04 +00:00
Maximiliano Sandoval R
6121bb0a49
input-chooser: Only capture input while visible
Otherwise writing in the dialog would filter it even if the search bar
is not visible.
2023-11-19 20:48:26 +01:00
Maximiliano Sandoval R
769287a59b
input-chooser: Port to AdwWindow 2023-11-19 20:48:26 +01:00
Automeris naranja
20fe6f3895 input-list-box: Add ellipsis to add_input_row label
"Use an ellipsis (…) at the end of a label if further input or
confirmation is required from the user before the action can be carried out".

https://developer.gnome.org/hig/guidelines/writing-style.html
2023-10-27 12:55:49 +00:00
Maximiliano Sandoval R
549496f68f
keyboard: Add back close buttons to dialogs 2023-10-26 18:00:20 +02:00
Felipe Borges
958024a7ec meson: Replace deprecated meson.{source|build}_root functions
https://mesonbuild.com/Reference-manual_builtin_meson.html#mesonbuild_root
2023-10-25 15:49:13 +02:00
Maximiliano Sandoval R
abab4956ad
xkb-modifier-dialog: Port to AdwWindow
We add a toolbar view containing a scrolled window.

- We set the margins to 12 instead of 18
- Use AdwHeaderBar
- Set minimum size and default size
- Make resizable so it fits on small screens

See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2624
2023-10-22 10:19:39 +02:00
Maximiliano Sandoval R
526217badb keyboard-shortcut-dialog: Allow escape to close
At the moment the search entry is consuming the Escape key press, so we
have to manually tell it what to do with it.

We clear the search on the first press, if there is input, and close the
window otherwise.
2023-10-20 10:55:01 +00:00
Maximiliano Sandoval R
2e12bf3bbe input-list-box: Add a label to the add button
This way it looks a bit more full and helps with a11y. Values taken from
the app Secrets.
2023-10-20 08:58:35 +00:00
Maximiliano Sandoval R
a98748f535 input-list-box: Use ActionRow instead of label
This way it has the correct height.
2023-10-20 08:58:35 +00:00
Marco Melorio
acd3e4a9c6 keyboard: Fix "argument discards const qualifier" warning 2023-10-12 10:09:44 +02:00
Felipe Borges
5ff13e2def keyboard: Show title buttons at the initial state of "Set Shortcuts" dialog
Fixes #1078
2023-10-10 09:55:31 +00:00
kramo
6a95124c88 keyboard: Add outline to shortcut graphic arrows 2023-10-03 09:08:05 +00:00
Felipe Borges
48d9256a3c keyboard: Add debug message when launching keyboard previewer
See
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1892
2023-09-08 10:58:59 +02:00
Carlos Garnacho
bb8c08221c keyboard: Call "tecla" previewer through full path
Make the binary called be either the one found at build time,
or the one installed as a subproject, instead of relying on
PATH to find the executable.
2023-09-08 10:58:59 +02:00
Michael Catanzaro
2030ec9327 keyboard: fix error in previous commit
I used the wrong value here.

This should have been caught by an unused variable warning, but
gnome-control-center has so many build warnings that nobody will ever
notice a new one....
2023-08-28 16:41:43 -05:00
Michael Catanzaro
8e41fbead8 keyboard: write to mru-sources setting if it has never been set before
Fedora's anaconda wants to know the current input source separately from
the configured input sources. Installing the configured input sources in
the order they are configured is good, but not good enough because only
the currently-active input source at the time the LUKS passphrase is
entered can be used to decrypt the disk post-install, so anaconda needs
a way to know what the active input source is. Currently, there is no
way to find this. For example:

 * User has English (US) input source configured by default
 * User adds Czech input source
 * User reorders Czech input source to be first in the list

In this scenario, the Czech input source is first in the list, but
English is still the currently-active input source, and there's no way
to know this. Only the mru-sources setting can indicate the active input
source, but because the active input source has never been changed,
mru-sources still has its default value.

The key to fixing this is that if mru-sources holds its default value,
then the user has never changed input sources before, and the first
input source that is previously configured is therefore the most recently
used. So we can copy the previous value of the sources setting to
mru-sources, and then applications can trust that either (a) mru-sources
will indicate the current input source, or (b) the current input source
is the first configured input source if mru-sources is empty.

https://bugzilla.redhat.com/show_bug.cgi?id=2231085
2023-08-25 09:14:57 +00:00
Alice Mikhaylenko
4680f362f3 Port to AdwNavigationSplitView 2023-08-25 08:00:43 +00:00
Christopher Davis
23249b2def keyboard: Port to AdwToolbarView 2023-08-25 08:00:43 +00:00
Christopher Davis
2a94420350 keyboard-shortcut-dialog: Port to AdwNavigationView
AdwNavigationView is a new widget meant to be used specifically
for navigation, unlike AdwLeaflet which was multipurpose.
AdwNavigationView provides a cleaner API, and when used in
conjuction with the new AdwToolbarView widget we get automatic
titles, back buttons, gestures, actions, and window controls.
In addition, AdwToolbarView provides a new style with flat headers
and an undershoot.

This commit ports the keyboard shortcut dialog to use both of
these new widgets, allowing us to simplify our navigation.
2023-08-25 08:00:43 +00:00
Michael Catanzaro
fd296004e7 keyboard: Fix criticals when input chooser is destroyed
This fixes the first critical reported in #2616. And the second issue
reported there appears to be a GTK bug, so let's close #2616.

Fixes #2616
2023-08-24 08:16:47 +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
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
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
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
Automeris naranja
4151c06012 keyboard-shortcut-dialog: Add mnemonic to the "Add Shortcut" button 2023-06-27 16:23:42 -03:00