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.

https://bugzilla.gnome.org/show_bug.cgi?id=777824
This commit is contained in:
Georges Basile Stavracas Neto 2017-01-27 09:20:00 -02:00
parent ecf352c1d2
commit 4fac9192d8

View file

@ -949,6 +949,8 @@ cc_keyboard_shortcut_editor_set_mode (CcKeyboardShortcutEditor *self,
gtk_header_bar_set_title (GTK_HEADER_BAR (self->headerbar), _("Add Custom Shortcut"));
gtk_stack_set_visible_child_name (GTK_STACK (self->stack), "custom");
gtk_widget_set_sensitive (self->command_entry, TRUE);
gtk_widget_set_sensitive (self->name_entry, TRUE);
gtk_widget_hide (self->remove_button);
gtk_widget_hide (self->edit_button);