[gnome-control-center] keyboard: fix seat grabbing when setting custom shortcut
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] keyboard: fix seat grabbing when setting custom shortcut
- Date: Tue, 30 Jun 2020 03:53:36 +0000 (UTC)
commit 34883c0c338208dae141e23107cc2040720c78f3
Author: Ian Douglas Scott <idscott system76 com>
Date: Mon Jun 29 15:25:27 2020 -0700
keyboard: fix seat grabbing when setting custom shortcut
The callback `edit_custom_shortcut_button_toggled_cb()` was unused,
presumably a relic of an earlier UI design.
panels/keyboard/cc-keyboard-shortcut-editor.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/panels/keyboard/cc-keyboard-shortcut-editor.c b/panels/keyboard/cc-keyboard-shortcut-editor.c
index f907efd1c..5e96af3a8 100644
--- a/panels/keyboard/cc-keyboard-shortcut-editor.c
+++ b/panels/keyboard/cc-keyboard-shortcut-editor.c
@@ -482,6 +482,7 @@ cancel_button_clicked_cb (GtkWidget *button,
static void
change_custom_shortcut_button_clicked_cb (CcKeyboardShortcutEditor *self)
{
+ grab_seat (self);
set_shortcut_editor_page (self, PAGE_CUSTOM_EDIT);
set_header_mode (self, HEADER_MODE_NONE);
}
@@ -492,17 +493,6 @@ command_entry_changed_cb (CcKeyboardShortcutEditor *self)
setup_custom_shortcut (self);
}
-static void
-edit_custom_shortcut_button_toggled_cb (CcKeyboardShortcutEditor *self,
- GParamSpec *pspec,
- GtkToggleButton *button)
-{
- if (gtk_toggle_button_get_active (button))
- grab_seat (self);
- else
- release_grab (self);
-}
-
static void
name_entry_changed_cb (CcKeyboardShortcutEditor *self)
{
@@ -636,6 +626,8 @@ setup_keyboard_item (CcKeyboardShortcutEditor *self,
g_signal_handlers_unblock_by_func (self->command_entry, command_entry_changed_cb, self);
g_signal_handlers_unblock_by_func (self->name_entry, name_entry_changed_cb, self);
+
+ release_grab (self);
}
/* Show the apropriate view */
@@ -920,7 +912,6 @@ cc_keyboard_shortcut_editor_class_init (CcKeyboardShortcutEditorClass *klass)
gtk_widget_class_bind_template_callback (widget_class, cancel_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, change_custom_shortcut_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, command_entry_changed_cb);
- gtk_widget_class_bind_template_callback (widget_class, edit_custom_shortcut_button_toggled_cb);
gtk_widget_class_bind_template_callback (widget_class, name_entry_changed_cb);
gtk_widget_class_bind_template_callback (widget_class, remove_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, replace_button_clicked_cb);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]