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.
parent 4fac9192
......@@ -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");
......@@ -363,6 +363,7 @@
<object class="GtkButton" id="add_button">
<property name="label" translatable="yes">Add</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="add_button_clicked_cb" object="CcKeyboardShortcutEditor" swapped="yes" />
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment