diff options
-rw-r--r-- | capplets/mouse/mate-mouse-properties.c | 18 | ||||
-rw-r--r-- | capplets/mouse/mate-mouse-properties.ui | 31 | ||||
-rw-r--r-- | configure.ac | 4 |
3 files changed, 51 insertions, 2 deletions
diff --git a/capplets/mouse/mate-mouse-properties.c b/capplets/mouse/mate-mouse-properties.c index 2c2292a4..a3c06e60 100644 --- a/capplets/mouse/mate-mouse-properties.c +++ b/capplets/mouse/mate-mouse-properties.c @@ -49,6 +49,12 @@ enum DOUBLE_CLICK_TEST_ON }; +typedef enum { + ACCEL_PROFILE_DEFAULT, + ACCEL_PROFILE_ADAPTIVE, + ACCEL_PROFILE_FLAT +} AccelProfile; + #define MOUSE_SCHEMA "org.mate.peripherals-mouse" #define INTERFACE_SCHEMA "org.mate.interface" #define DOUBLE_CLICK_KEY "double-click" @@ -218,6 +224,13 @@ synaptics_check_capabilities (GtkBuilder *dialog) } static void +accel_profile_combobox_changed_callback (GtkWidget *combobox, void *data) +{ + AccelProfile value = gtk_combo_box_get_active (GTK_COMBO_BOX (combobox)); + g_settings_set_enum (mouse_settings, (const gchar *) "accel-profile", value); +} + +static void comboxbox_changed (GtkWidget *combobox, GtkBuilder *dialog, const char *key) { gint value = gtk_combo_box_get_active (GTK_COMBO_BOX (combobox)); @@ -293,6 +306,11 @@ setup_dialog (GtkBuilder *dialog) gtk_range_get_adjustment (GTK_RANGE (WID ("sensitivity_scale"))), "value", G_SETTINGS_BIND_DEFAULT); + g_signal_connect (WID ("mouse_accel_profile"), "changed", + G_CALLBACK (accel_profile_combobox_changed_callback), NULL); + gtk_combo_box_set_active (GTK_COMBO_BOX (WID ("mouse_accel_profile")), + g_settings_get_enum (mouse_settings, "accel-profile")); + /* DnD threshold */ g_settings_bind (mouse_settings, "drag-threshold", gtk_range_get_adjustment (GTK_RANGE (WID ("drag_threshold_scale"))), "value", diff --git a/capplets/mouse/mate-mouse-properties.ui b/capplets/mouse/mate-mouse-properties.ui index a2990fa7..9c353240 100644 --- a/capplets/mouse/mate-mouse-properties.ui +++ b/capplets/mouse/mate-mouse-properties.ui @@ -512,6 +512,37 @@ <property name="top_attach">1</property> </packing> </child> + <child> + <object class="GtkLabel" id="mouse_accel_profile_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Acceleration _Profile:</property> + <property name="use_underline">True</property> + <property name="justify">center</property> + <property name="mnemonic_widget">mouse_accel_profile</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="mouse_accel_profile"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <items> + <item translatable="yes" id="default">Default</item> + <item translatable="yes" id="adaptive">Adaptive</item> + <item translatable="yes" id="flat">Flat</item> + </items> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + </packing> + </child> </object> </child> </object> diff --git a/configure.ac b/configure.ac index e7ef54ab..f14ffe1c 100644 --- a/configure.ac +++ b/configure.ac @@ -79,9 +79,9 @@ AC_SUBST(SCREENSAVER_LIBS) GLIB_REQUIRED=2.50.0 GTK_REQUIRED=3.22.0 MARCO_REQUIRED=1.17.0 -MSD_REQUIRED=1.23.0 +MSD_REQUIRED=1.23.1 MATEKBD_REQUIRED=1.17.0 -MATE_DESKTOP_REQUIRED=1.23.1 +MATE_DESKTOP_REQUIRED=1.23.2 APPINDICATOR_REQUIRED=0.0.13 ENGINES_FOLDER="theming-engines" |