[gnome-control-center] shortcut-editor: ensure sensitive entries on creation mode



commit 4fac9192d81596bf98bba78ca8a06f1b43b0c108
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Jan 27 09:20:00 2017 -0200

    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

 panels/keyboard/cc-keyboard-shortcut-editor.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/panels/keyboard/cc-keyboard-shortcut-editor.c b/panels/keyboard/cc-keyboard-shortcut-editor.c
index a99e918..6dd13bc 100644
--- a/panels/keyboard/cc-keyboard-shortcut-editor.c
+++ b/panels/keyboard/cc-keyboard-shortcut-editor.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]