keyboard: Fix behavior of "Replace" when adding custom shortcut
In the shortcut editor, the "Replace" button is shown instead of "Set" or "Add" when there is a collision. But this executes the same code as "Set", so when adding a shortcut, it doesn't actually work.
This commit is contained in:
parent
5c0f6e1cde
commit
099426714c
1 changed files with 5 additions and 3 deletions
|
@ -69,6 +69,7 @@ struct _CcKeyboardShortcutEditor
|
||||||
|
|
||||||
static void command_entry_changed_cb (CcKeyboardShortcutEditor *self);
|
static void command_entry_changed_cb (CcKeyboardShortcutEditor *self);
|
||||||
static void name_entry_changed_cb (CcKeyboardShortcutEditor *self);
|
static void name_entry_changed_cb (CcKeyboardShortcutEditor *self);
|
||||||
|
static void set_button_clicked_cb (CcKeyboardShortcutEditor *self);
|
||||||
|
|
||||||
G_DEFINE_TYPE (CcKeyboardShortcutEditor, cc_keyboard_shortcut_editor, GTK_TYPE_DIALOG)
|
G_DEFINE_TYPE (CcKeyboardShortcutEditor, cc_keyboard_shortcut_editor, GTK_TYPE_DIALOG)
|
||||||
|
|
||||||
|
@ -485,9 +486,10 @@ remove_button_clicked_cb (CcKeyboardShortcutEditor *self)
|
||||||
static void
|
static void
|
||||||
replace_button_clicked_cb (CcKeyboardShortcutEditor *self)
|
replace_button_clicked_cb (CcKeyboardShortcutEditor *self)
|
||||||
{
|
{
|
||||||
update_shortcut (self);
|
if (self->mode == CC_SHORTCUT_EDITOR_CREATE)
|
||||||
|
add_button_clicked_cb (self);
|
||||||
gtk_widget_hide (GTK_WIDGET (self));
|
else
|
||||||
|
set_button_clicked_cb (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Reference in a new issue