Commit graph

57 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
d8d85bae12 keyboard: make Add button insensitive after editing
When creating a new keyboard shortcut, the Add button gets
sensitive when all the fields are valid. If the user tries
to create a new shortcut right after closing the shortcut
editor dialog, the Add button is still sensitive even with
invalid custom fields.

Fix that by making the Add button sensitive whenever we
finish editing the new custom shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
cf3ff886ca keyboard: change standard shortcut top label
Per feedback, the current call-to-action label isn't very clear
and is too long.

Fix that by rewording the label.

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
60b235754e keyboard: move keyboard management code to custom class
Instead of having CcKeyboardPanel managing both UI and backend code,
factor the backend code to a new CcKeyboardManager class and drop
backend management from the panel itself.

The new backend class handles the loading, creation and removal and
search of keyboard shortcuts. It also resolves reversible shortcuts
when searching.

This patch moves the code to this new class, and updates the rest of
the Keyboard panel to use it instead.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -03:00
Georges Basile Stavracas Neto
70bba2bbcd keyboard: avoid stray Meta modified
While using the Keyboard shortcut editor dialog under
Wayland, the user receives a <Meta> key even when this
key isn't present in the physical keyboard nor in the
keymap.

This is probably the result of Wayland inheriting from
X's xkb.

To work around that, simply filter out this modifier.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -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