After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777824 - Untoggle Edit button on cancel
Untoggle Edit button on cancel
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Keyboard
unspecified
Other All
: Normal normal
: ---
Assigned To: Rui Matos
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-27 10:26 UTC by Georges Basile Stavracas Neto
Modified: 2017-01-27 16:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shortcut-editor: untoggle Edit button on cancel (1.14 KB, patch)
2017-01-27 10:26 UTC, Georges Basile Stavracas Neto
none Details | Review
shortcut-editor: untoggle Edit button on cancel (1.40 KB, patch)
2017-01-27 10:46 UTC, Georges Basile Stavracas Neto
none Details | Review
shortcut-editor: untoggle Edit button on cancel (2.21 KB, patch)
2017-01-27 10:52 UTC, Georges Basile Stavracas Neto
none Details | Review
shortcut-editor: untoggle Edit button on cancel (1.72 KB, patch)
2017-01-27 11:19 UTC, Georges Basile Stavracas Neto
committed Details | Review
shortcut-editor: ensure sensitive entries on creation mode (1.46 KB, patch)
2017-01-27 11:22 UTC, Georges Basile Stavracas Neto
committed Details | Review
shortcut-editor: fix headerbar state when adding shortcut (2.03 KB, patch)
2017-01-27 13:15 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Georges Basile Stavracas Neto 2017-01-27 10:26:25 UTC
When canceling the editing of a custom shortcut, the "Edit" button
keeps pressed, causing inconsistencies when editing future custom
events.

Fix that by properly untoggling the Edit button when cancelling
the editing.
Comment 1 Georges Basile Stavracas Neto 2017-01-27 10:26:30 UTC
Created attachment 344389 [details] [review]
shortcut-editor: untoggle Edit button on cancel
Comment 2 Georges Basile Stavracas Neto 2017-01-27 10:46:25 UTC
Created attachment 344390 [details] [review]
shortcut-editor: untoggle Edit button on cancel

When canceling the editing of a custom shortcut, the "Edit" button
keeps pressed, causing inconsistencies when editing future custom
events.

To reproduce that:
 - Open a custom shortcut and click "Edit"
 - Start typing the new shortcut; the "Cancel" button will appear
 - *Before* completing the new shortcut, click "Cancel"; the dialog will hide
 - Open a custom shortcut again; the "Edit" button is still toggled

Fix that by properly untoggling the Edit button when cancelling
the editing.
Comment 3 Bastien Nocera 2017-01-27 10:46:42 UTC
Doesn't work as expected, or at least not in all cases:

1. Open already set custom shortcut
2. Click the Edit button
3. Close the dialogue with the Close button
4. Re-open the custom shortcut edit dialogue
5. Edit button is still pressed
Comment 4 Bastien Nocera 2017-01-27 10:47:09 UTC
Comment on attachment 344390 [details] [review]
shortcut-editor: untoggle Edit button on cancel

As per comment 3
Comment 5 Georges Basile Stavracas Neto 2017-01-27 10:52:55 UTC
Created attachment 344391 [details] [review]
shortcut-editor: untoggle Edit button on cancel

Fixed.
Comment 6 Bastien Nocera 2017-01-27 11:02:37 UTC
Review of attachment 344391 [details] [review]:

This breaks adding new custom shortcuts, the name field is insensitive.
Comment 7 Georges Basile Stavracas Neto 2017-01-27 11:19:42 UTC
Created attachment 344394 [details] [review]
shortcut-editor: untoggle Edit button on cancel

Fixed.
Comment 8 Georges Basile Stavracas Neto 2017-01-27 11:22:34 UTC
Created attachment 344395 [details] [review]
shortcut-editor: ensure sensitive entries on creation mode

When creating a new shortcut, we currently assume the entries are
sensitive and just show the dialog. This, however, may not be, for
example after previously canceling the editing of a custom shortcut,
leading to a state where the name and command entries are insensitive.

Fix that by always making sure the entries are sensitive when
setting the dialog to creation mode.
Comment 9 Bastien Nocera 2017-01-27 11:41:30 UTC
When creating a new custom shortcut, the "Add" button only appears (insensitive) once something is typed in the command or name field. It should appear straight away when the dialogue is presented.
Comment 10 Georges Basile Stavracas Neto 2017-01-27 13:15:39 UTC
Created attachment 344415 [details] [review]
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.
Comment 11 Bastien Nocera 2017-01-27 16:15:52 UTC
Review of attachment 344394 [details] [review]:

Sure, please commit to gnome-3-22 as well.
Comment 12 Bastien Nocera 2017-01-27 16:16:38 UTC
Review of attachment 344395 [details] [review]:

Yep.
Comment 13 Bastien Nocera 2017-01-27 16:17:29 UTC
Review of attachment 344415 [details] [review]:

Sure.
Comment 14 Georges Basile Stavracas Neto 2017-01-27 16:21:46 UTC
Thanks for the reviews.

Attachment 344394 [details] pushed as ecf352c - shortcut-editor: untoggle Edit button on cancel
Attachment 344395 [details] pushed as 4fac919 - shortcut-editor: ensure sensitive entries on creation mode
Attachment 344415 [details] pushed as 05e0361 - shortcut-editor: fix headerbar state when adding shortcut