Commit graph

20 commits

Author SHA1 Message Date
Andrea Azzarone
0d16cd3feb keyboard: Make "Set Shortcut" button accessible
Set 'can-focus' property to True for change_custom_shortcut_button, fixing
keyboard navigation in the shortcut editor dialog.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/45
2018-03-30 15:27:26 +00:00
Georges Basile Stavracas Neto
7c405d77a7 keyboard: Inform that 'backspace' is the clear key
The Keyboard shortcut editor dialog gives no clue on how
to disable a shortcut, and users were confused by this
lack of information.

Fix that by informing the user about the Backspace role
when editing a shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=777401
2017-05-10 20:45:07 -03:00
Georges Basile Stavracas Neto
dce6fe6add keyboard: Move Remove button to the header bar
According to the mockups [1], the Remove button should
be placed at the start of the header bar. Currently,
however, it is positioned below the custom shortcut edit
button.

Fix that by moving the remove button to the header bar.

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/keyboard/keyboard-wires.png

https://bugzilla.gnome.org/show_bug.cgi?id=777846
2017-05-02 07:20:29 -03:00
Mohammed Sadiq
eeddf497af keyboard: Discard the added shortcut on Escape
If the user press Escape key after the user have set some shortcut,
don't save the newly set shortcut, and close the dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=778748
2017-04-27 10:20:56 -03:00
Piotr Drąg
555e230508 Remove no longer necessary contexts from translatable strings
These strings changed recently and now their contexts don't disambiguate
anything.
2017-02-12 16:02:22 +01:00
Georges Basile Stavracas Neto
c57cadf50b keyboard: make the "Set" and "Add" buttons blue
Per the available mockups [1], the "Set" and "Add" buttons
are the suggested action of the dialog and should be blue.

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/keyboard/keyboard-wires.png

https://bugzilla.gnome.org/show_bug.cgi?id=777842
2017-02-08 14:15:16 -02:00
Georges Basile Stavracas Neto
20f52da5e2 keyboard: switch to the reset button
Per the mockups [1], when editing a custom shortcut, there is
a reset button right after the current shortcut. When there
is no shortcut set, it shows a "Set Shortcut" button instead.
The current UI to edit a shortcut, however, diverges from
the proposed one since we use an "Edit" button instead.

Fix that by swapping the Edit button with a reset button, and
adapt the code to not depend on the edit button anymore.

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/keyboard/keyboard-wires.png

https://bugzilla.gnome.org/show_bug.cgi?id=777845
2017-01-30 13:24:33 -02:00
Georges Basile Stavracas Neto
8200fa860d keyboard: follow mockups for shortcut change button label
Per the mockups [1], this should be "Set Shortcut…".

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/keyboard/keyboard-wires.png

https://bugzilla.gnome.org/show_bug.cgi?id=777844
2017-01-30 08:52:37 -02:00
Georges Basile Stavracas Neto
05e03617e1 shortcut-editor: fix headerbar state when adding shortcut
When adding a custom shortcut, the header mode was set to be
only "Cancel". Per mockups, the "Add" button should also be
visible but insensitive.

Fix that by correctly setting the header mode on creation mode.

https://bugzilla.gnome.org/show_bug.cgi?id=777824
2017-01-27 14:20:47 -02:00
Piotr Drąg
9daa1633e9 Disambiguate "Set Shortcut" string with context 2016-09-25 01:59:45 +02:00
Yosef Or Boczko
8aae1f1973 Mark another string as translatable 2016-09-09 12:49:45 +03:00
Yosef Or Boczko
3d868c0888 Mark some strings as translatable 2016-09-09 12:36:03 +03:00
Georges Basile Stavracas Neto
778395f61b shortcut-editor: show custom page while waiting for input
While waiting for keyboard input, as per the new proposed mockup,
the shortcut editor dialog should show a custom page with an icon
that indicates the required action. The current code, however, does
not expose this new customized page.

Fix that by adding this new page and controlling the time when it
shows and hides.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
9c4b27309d shortcut-editor: move widgets into a stack
The stack will be used by the next patches to show
an call for action page.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
cbff1e7b0a shortcut-editor: update reset button position and style
The Reset button, according to the mockups, should be placed
at the right side (left on rtl) of the shortcut label. Also,
rather than a plain string, the button should use a symbolic
icon for 'edit-clear' action.

This patch moves and updates the Reset button to match the
mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
c5cd32f797 shortcut-editor: use a different page to edit custom shortcuts
When adding a new keyboard shortcut, in accordance to the mockups,
the dialog should present a new page calling for an action from the
user.

This patch adds this page, and adapts the code to show it whenever
the user wants to change the shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
472959657b shortcut-editor: add 'Set' button
The Set button will be used to update a standard
shortcut.

This patch adds it to the headerbar.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
1c85479742 keyboard: add support to reset shortcuts to their default values
Following the proposed mockups, the shortcut list must
have the ability to reset modified to non-default shortcuts
right from the listbox.

After adding the necessary API in CcKeyboardItem, adding
the user-visible elements to enable that is easy.

To make that happen, add a button that resets the
keyboard shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:48:31 -03:00
Georges Basile Stavracas Neto
4e50c3c375 keyboard: bring back uniqueness check
The collision detection code was removed in commit a0a155884e
as the cleanup was happening because the previous code was closely
tied to the user interface components.

Because that code wasn't appliable to the new listbox UI, it was
temporarily removed.

This patch re-adds this feature to work with the new code orgazination.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:48:22 -03:00
Georges Basile Stavracas Neto
a0a155884e keyboard: introduce CcKeyboardShortcutEditor
The current CcKeyboardPanel used to manage keyboard
editing through GtkCellRendererAccel, which was replaced
when we moved to use a GtkListBox. Because of that,
the ability to edit shortcuts is now missing.

Re-add shortcut editing capabilities through a new dialog,
which is done according to the latest mockups available.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -03:00