GNOME Bugzilla – Bug 777824
Untoggle Edit button on cancel
Last modified: 2017-01-27 16:21:58 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.
Created attachment 344389 [details] [review] shortcut-editor: untoggle Edit button on cancel
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.
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 on attachment 344390 [details] [review] shortcut-editor: untoggle Edit button on cancel As per comment 3
Created attachment 344391 [details] [review] shortcut-editor: untoggle Edit button on cancel Fixed.
Review of attachment 344391 [details] [review]: This breaks adding new custom shortcuts, the name field is insensitive.
Created attachment 344394 [details] [review] shortcut-editor: untoggle Edit button on cancel Fixed.
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.
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.
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.
Review of attachment 344394 [details] [review]: Sure, please commit to gnome-3-22 as well.
Review of attachment 344395 [details] [review]: Yep.
Review of attachment 344415 [details] [review]: Sure.
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