From 05e03617e15987108bd14c088704d77c85c37b41 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Fri, 27 Jan 2017 11:13:44 -0200 Subject: [PATCH] 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. https://bugzilla.gnome.org/show_bug.cgi?id=777824 --- panels/keyboard/cc-keyboard-shortcut-editor.c | 2 +- panels/keyboard/shortcut-editor.ui | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/panels/keyboard/cc-keyboard-shortcut-editor.c b/panels/keyboard/cc-keyboard-shortcut-editor.c index 6dd13bc5f..315fb635b 100644 --- a/panels/keyboard/cc-keyboard-shortcut-editor.c +++ b/panels/keyboard/cc-keyboard-shortcut-editor.c @@ -945,7 +945,7 @@ cc_keyboard_shortcut_editor_set_mode (CcKeyboardShortcutEditor *self, /* Cleanup whatever was set before */ clear_custom_entries (self); - set_header_mode (self, HEADER_MODE_CUSTOM_CANCEL); + set_header_mode (self, HEADER_MODE_ADD); gtk_header_bar_set_title (GTK_HEADER_BAR (self->headerbar), _("Add Custom Shortcut")); gtk_stack_set_visible_child_name (GTK_STACK (self->stack), "custom"); diff --git a/panels/keyboard/shortcut-editor.ui b/panels/keyboard/shortcut-editor.ui index 41bb054da..787b82903 100644 --- a/panels/keyboard/shortcut-editor.ui +++ b/panels/keyboard/shortcut-editor.ui @@ -363,6 +363,7 @@ Add True + False True True