Commit dde97ecb authored by Jeremy Bicha's avatar Jeremy Bicha Committed by Georges Basile Stavracas Neto
Browse files

mouse: Don't use a separate box for touchpad switch

The Touchpad section looks like a single listbox
so let's handle it that way too.

This eliminates an unnecessary split in the touchpad
section that is noticeable when navigating with a keyboard.
parent 783918aa
Pipeline #54407 passed with stages
in 6 minutes and 41 seconds
......@@ -60,8 +60,9 @@ struct _CcMouseProperties
GtkWidget *tap_to_click_switch;
GtkWidget *touchpad_frame;
GtkWidget *touchpad_listbox;
GtkWidget *touchpad_natural_scrolling_row;
GtkWidget *touchpad_natural_scrolling_switch;
GtkWidget *touchpad_options_listbox;
GtkWidget *touchpad_speed_row;
GtkWidget *touchpad_speed_scale;
GtkWidget *touchpad_toggle_switch;
GtkWidget *two_finger_scrolling_row;
......@@ -280,7 +281,31 @@ setup_dialog (CcMouseProperties *self)
touchpad_enabled_set_mapping,
NULL, NULL);
g_settings_bind_with_mapping (self->touchpad_settings, "send-events",
self->touchpad_options_listbox, "sensitive",
self->touchpad_natural_scrolling_row, "sensitive",
G_SETTINGS_BIND_GET,
touchpad_enabled_get_mapping,
touchpad_enabled_set_mapping,
NULL, NULL);
g_settings_bind_with_mapping (self->touchpad_settings, "send-events",
self->touchpad_speed_row, "sensitive",
G_SETTINGS_BIND_GET,
touchpad_enabled_get_mapping,
touchpad_enabled_set_mapping,
NULL, NULL);
g_settings_bind_with_mapping (self->touchpad_settings, "send-events",
self->tap_to_click_row, "sensitive",
G_SETTINGS_BIND_GET,
touchpad_enabled_get_mapping,
touchpad_enabled_set_mapping,
NULL, NULL);
g_settings_bind_with_mapping (self->touchpad_settings, "send-events",
self->two_finger_scrolling_row, "sensitive",
G_SETTINGS_BIND_GET,
touchpad_enabled_get_mapping,
touchpad_enabled_set_mapping,
NULL, NULL);
g_settings_bind_with_mapping (self->touchpad_settings, "send-events",
self->edge_scrolling_row, "sensitive",
G_SETTINGS_BIND_GET,
touchpad_enabled_get_mapping,
touchpad_enabled_set_mapping,
......@@ -299,8 +324,6 @@ setup_dialog (CcMouseProperties *self)
G_SETTINGS_BIND_DEFAULT);
setup_touchpad_options (self);
gtk_list_box_set_header_func (GTK_LIST_BOX (self->touchpad_options_listbox), cc_list_box_update_header_func, NULL, NULL);
}
/* Callback issued when a button is clicked on the dialog */
......@@ -379,8 +402,12 @@ cc_mouse_properties_class_init (CcMousePropertiesClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, tap_to_click_switch);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, touchpad_frame);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, touchpad_listbox);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, touchpad_natural_scrolling_row);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, touchpad_natural_scrolling_switch);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, touchpad_options_listbox);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, touchpad_speed_row);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, tap_to_click_row);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, two_finger_scrolling_row);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, edge_scrolling_row);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, touchpad_speed_scale);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, touchpad_toggle_switch);
gtk_widget_class_bind_template_child (widget_class, CcMouseProperties, two_finger_scrolling_row);
......
......@@ -418,19 +418,6 @@
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">true</property>
<property name="orientation">horizontal</property>
</object>
</child>
<child>
<object class="GtkListBox" id="touchpad_options_listbox">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selection_mode">none</property>
<child>
<object class="GtkListBoxRow" id="touchpad_natural_scrolling_row">
<property name="visible">True</property>
......
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