universal-access: add Double-click delay to Pointing & Clicking section
According to the new Mouse & Touchpad panel designs at https://wiki.gnome.org/Design/SystemSettings/Mouse, Double-click delay belongs to the Universal Access panel. https://bugzilla.gnome.org/show_bug.cgi?id=756872
This commit is contained in:
parent
b494873332
commit
87f3dfab02
2 changed files with 70 additions and 0 deletions
|
@ -86,6 +86,10 @@
|
|||
#define KEY_DWELL_TIME "dwell-time"
|
||||
#define KEY_DWELL_THRESHOLD "dwell-threshold"
|
||||
|
||||
/* gnome-settings-daemon settings */
|
||||
#define GSD_MOUSE_SETTINGS "org.gnome.settings-daemon.peripherals.mouse"
|
||||
#define KEY_DOUBLE_CLICK_DELAY "double-click"
|
||||
|
||||
#define SCROLL_HEIGHT 490
|
||||
|
||||
CC_PANEL_REGISTER (CcUaPanel, cc_ua_panel)
|
||||
|
@ -100,6 +104,7 @@ struct _CcUaPanelPrivate
|
|||
GSettings *kb_settings;
|
||||
GSettings *mouse_settings;
|
||||
GSettings *application_settings;
|
||||
GSettings *gsd_mouse_settings;
|
||||
|
||||
ZoomOptions *zoom_options;
|
||||
|
||||
|
@ -759,6 +764,12 @@ cc_ua_panel_init_mouse (CcUaPanel *self)
|
|||
|
||||
g_object_set_data (G_OBJECT (WID ("row_click_assist")), "dialog", dialog);
|
||||
|
||||
g_settings_bind (priv->gsd_mouse_settings, "double-click",
|
||||
gtk_range_get_adjustment (GTK_RANGE (WID ("scale_double_click_delay"))), "value",
|
||||
G_SETTINGS_BIND_DEFAULT);
|
||||
|
||||
gtk_scale_add_mark (GTK_SCALE (WID ("scale_double_click_delay")), 400, GTK_POS_BOTTOM, NULL);
|
||||
|
||||
g_signal_connect (dialog, "delete-event",
|
||||
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
|
||||
}
|
||||
|
@ -797,6 +808,7 @@ cc_ua_panel_init (CcUaPanel *self)
|
|||
priv->wm_settings = g_settings_new (WM_SETTINGS);
|
||||
priv->kb_settings = g_settings_new (KEYBOARD_SETTINGS);
|
||||
priv->mouse_settings = g_settings_new (MOUSE_SETTINGS);
|
||||
priv->gsd_mouse_settings = g_settings_new (GSD_MOUSE_SETTINGS);
|
||||
priv->application_settings = g_settings_new (APPLICATION_SETTINGS);
|
||||
|
||||
priv->builder = gtk_builder_new ();
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkAdjustment" id="double-click-delay-adjustment">
|
||||
<property name="lower">100</property>
|
||||
<property name="upper">1000</property>
|
||||
<property name="value">400</property>
|
||||
<property name="step_increment">100</property>
|
||||
<property name="page_increment">100</property>
|
||||
</object>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="GtkScrolledWindow" id="universal_access_panel">
|
||||
<property name="visible">True</property>
|
||||
|
@ -744,6 +751,57 @@
|
|||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="row_double_click_delay">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box_double_click_delay">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="heading_double_click_delay">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_start">20</property>
|
||||
<property name="margin_end">20</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Double-Click Delay</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale_double_click_delay">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="adjustment">double-click-delay-adjustment</property>
|
||||
<property name="draw_value">False</property>
|
||||
<property name="margin_start">20</property>
|
||||
<property name="margin_end">20</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="double_click_scale-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes">Double-Click Delay</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
|
|
Loading…
Add table
Reference in a new issue