From 0b0e6bc987da4fd88a7854ebb12bde705e92c428 Mon Sep 17 00:00:00 2001 From: Perberos Date: Thu, 1 Dec 2011 21:51:44 -0300 Subject: moving from https://github.com/perberos/mate-desktop-environment --- capplets/mouse/Makefile.am | 35 + capplets/mouse/double-click-maybe.png | Bin 0 -> 4643 bytes capplets/mouse/double-click-off.png | Bin 0 -> 4751 bytes capplets/mouse/double-click-on.png | Bin 0 -> 6360 bytes capplets/mouse/mate-mouse-accessibility.c | 232 +++ capplets/mouse/mate-mouse-accessibility.h | 33 + capplets/mouse/mate-mouse-properties.c | 647 ++++++++ capplets/mouse/mate-mouse-properties.ui | 1707 ++++++++++++++++++++++ capplets/mouse/mate-settings-mouse.desktop.in.in | 14 + 9 files changed, 2668 insertions(+) create mode 100644 capplets/mouse/Makefile.am create mode 100644 capplets/mouse/double-click-maybe.png create mode 100644 capplets/mouse/double-click-off.png create mode 100644 capplets/mouse/double-click-on.png create mode 100644 capplets/mouse/mate-mouse-accessibility.c create mode 100644 capplets/mouse/mate-mouse-accessibility.h create mode 100644 capplets/mouse/mate-mouse-properties.c create mode 100644 capplets/mouse/mate-mouse-properties.ui create mode 100644 capplets/mouse/mate-settings-mouse.desktop.in.in (limited to 'capplets/mouse') diff --git a/capplets/mouse/Makefile.am b/capplets/mouse/Makefile.am new file mode 100644 index 00000000..c60082a5 --- /dev/null +++ b/capplets/mouse/Makefile.am @@ -0,0 +1,35 @@ +# This is used in MATECC_CAPPLETS_CFLAGS +cappletname = mouse + +bin_PROGRAMS = mate-mouse-properties + +mate_mouse_properties_LDADD = $(MATECC_CAPPLETS_LIBS) +mate_mouse_properties_SOURCES = \ + mate-mouse-properties.c \ + mate-mouse-accessibility.c \ + mate-mouse-accessibility.h + +@INTLTOOL_DESKTOP_RULE@ + +pixmapdir = $(pkgdatadir)/pixmaps +pixmap_DATA = \ + double-click-on.png \ + double-click-off.png \ + double-click-maybe.png + +uidir = $(pkgdatadir)/ui +ui_DATA = mate-mouse-properties.ui + +desktopdir = $(datadir)/applications +Desktop_in_files = mate-settings-mouse.desktop.in +desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop) + +INCLUDES = \ + $(MATECC_CAPPLETS_CFLAGS) \ + -DMATELOCALEDIR="\"$(datadir)/locale\"" \ + -DMATECC_DATA_DIR="\"$(pkgdatadir)\"" \ + -DMATECC_UI_DIR="\"$(uidir)\"" +CLEANFILES = $(MATECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA) +EXTRA_DIST = $(ui_DATA) $(pixmap_DATA) + +-include $(top_srcdir)/git.mk diff --git a/capplets/mouse/double-click-maybe.png b/capplets/mouse/double-click-maybe.png new file mode 100644 index 00000000..6504e2e9 Binary files /dev/null and b/capplets/mouse/double-click-maybe.png differ diff --git a/capplets/mouse/double-click-off.png b/capplets/mouse/double-click-off.png new file mode 100644 index 00000000..ab428d13 Binary files /dev/null and b/capplets/mouse/double-click-off.png differ diff --git a/capplets/mouse/double-click-on.png b/capplets/mouse/double-click-on.png new file mode 100644 index 00000000..1ee9202e Binary files /dev/null and b/capplets/mouse/double-click-on.png differ diff --git a/capplets/mouse/mate-mouse-accessibility.c b/capplets/mouse/mate-mouse-accessibility.c new file mode 100644 index 00000000..a1c4277b --- /dev/null +++ b/capplets/mouse/mate-mouse-accessibility.c @@ -0,0 +1,232 @@ +/* + * Copyright (C) 2007 Gerd Kohlberger + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "capplet-util.h" +#include "mateconf-property-editor.h" + +#define MT_MATECONF_HOME "/desktop/mate/accessibility/mouse" + +/* 5th entry in combo box */ +#define DIRECTION_DISABLE 4 + +enum { + CLICK_TYPE_SINGLE, + CLICK_TYPE_DOUBLE, + CLICK_TYPE_DRAG, + CLICK_TYPE_SECONDARY, + N_CLICK_TYPES +}; + +static void +update_mode_sensitivity (GtkBuilder *dialog, gint mode) +{ + gtk_widget_set_sensitive (WID ("box_ctw"), !mode); + gtk_widget_set_sensitive (WID ("box_gesture"), mode); +} + +/* check if a direction (gesture mode) is already in use */ +static gboolean +verify_setting (MateConfClient *client, gint value, gint type) +{ + gint i, ct[N_CLICK_TYPES]; + + ct[CLICK_TYPE_SINGLE] = + mateconf_client_get_int (client, + MT_MATECONF_HOME "/dwell_gesture_single", + NULL); + ct[CLICK_TYPE_DOUBLE] = + mateconf_client_get_int (client, + MT_MATECONF_HOME "/dwell_gesture_double", + NULL); + ct[CLICK_TYPE_DRAG] = + mateconf_client_get_int (client, + MT_MATECONF_HOME "/dwell_gesture_drag", + NULL); + ct[CLICK_TYPE_SECONDARY] = + mateconf_client_get_int (client, + MT_MATECONF_HOME "/dwell_gesture_secondary", + NULL); + + for (i = 0; i < N_CLICK_TYPES; ++i) { + if (i == type) + continue; + if (ct[i] == value) + return FALSE; + } + + return TRUE; +} + +static void +populate_gesture_combo (GtkWidget *combo) +{ + GtkListStore *model; + GtkTreeIter iter; + GtkCellRenderer *cr; + + model = gtk_list_store_new (1, G_TYPE_STRING); + + gtk_list_store_append (model, &iter); + /* Translators: this is the gesture to trigger/choose the click type. + Don't include the prefix "gesture|" in the translation. */ + gtk_list_store_set (model, &iter, 0, Q_("gesture|Move left"), -1); + + gtk_list_store_append (model, &iter); + /* Translators: this is the gesture to trigger/choose the click type. + Don't include the prefix "gesture|" in the translation. */ + gtk_list_store_set (model, &iter, 0, Q_("gesture|Move right"), -1); + + gtk_list_store_append (model, &iter); + /* Translators: this is the gesture to trigger/choose the click type. + Don't include the prefix "gesture|" in the translation. */ + gtk_list_store_set (model, &iter, 0, Q_("gesture|Move up"), -1); + + gtk_list_store_append (model, &iter); + /* Translators: this is the gesture to trigger/choose the click type. + Don't include the prefix "gesture|" in the translation. */ + gtk_list_store_set (model, &iter, 0, Q_("gesture|Move down"), -1); + + gtk_list_store_append (model, &iter); + /* Translators: this is the gesture to trigger/choose the click type. + Don't include the prefix "gesture|" in the translation. */ + gtk_list_store_set (model, &iter, 0, Q_("gesture|Disabled"), -1); + + gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (model)); + + cr = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cr, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cr, + "text", 0, + NULL); +} + +static void +delay_enable_toggled_cb (GtkWidget *checkbox, GtkBuilder *dialog) +{ + gtk_widget_set_sensitive (WID ("delay_box"), + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox))); +} + +static void +dwell_enable_toggled_cb (GtkWidget *checkbox, GtkBuilder *dialog) +{ + gtk_widget_set_sensitive (WID ("dwell_box"), + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox))); +} + +static void +gesture_single (GtkComboBox *combo, gpointer data) +{ + if (!verify_setting (data, gtk_combo_box_get_active (combo), CLICK_TYPE_SINGLE)) + gtk_combo_box_set_active (combo, DIRECTION_DISABLE); +} + +static void +gesture_double (GtkComboBox *combo, gpointer data) +{ + if (!verify_setting (data, gtk_combo_box_get_active (combo), CLICK_TYPE_DOUBLE)) + gtk_combo_box_set_active (combo, DIRECTION_DISABLE); +} + +static void +gesture_drag (GtkComboBox *combo, gpointer data) +{ + if (!verify_setting (data, gtk_combo_box_get_active (combo), CLICK_TYPE_DRAG)) + gtk_combo_box_set_active (combo, DIRECTION_DISABLE); +} + +static void +gesture_secondary (GtkComboBox *combo, gpointer data) +{ + if (!verify_setting (data, gtk_combo_box_get_active (combo), CLICK_TYPE_SECONDARY)) + gtk_combo_box_set_active (combo, DIRECTION_DISABLE); +} + +static void +mateconf_value_changed (MateConfClient *client, + const gchar *key, + MateConfValue *value, + gpointer dialog) +{ + if (g_str_equal (key, MT_MATECONF_HOME "/dwell_mode")) + update_mode_sensitivity (dialog, mateconf_value_get_int (value)); +} + +void +setup_accessibility (GtkBuilder *dialog, MateConfClient *client) +{ + mateconf_client_add_dir (client, MT_MATECONF_HOME, + MATECONF_CLIENT_PRELOAD_ONELEVEL, NULL); + g_signal_connect (client, "value_changed", + G_CALLBACK (mateconf_value_changed), dialog); + + mateconf_peditor_new_boolean (NULL, MT_MATECONF_HOME "/dwell_enable", + WID ("dwell_enable"), NULL); + mateconf_peditor_new_boolean (NULL, MT_MATECONF_HOME "/delay_enable", + WID ("delay_enable"), NULL); + mateconf_peditor_new_boolean (NULL, MT_MATECONF_HOME "/dwell_show_ctw", + WID ("dwell_show_ctw"), NULL); + + mateconf_peditor_new_numeric_range (NULL, MT_MATECONF_HOME "/delay_time", + WID ("delay_time"), NULL); + mateconf_peditor_new_numeric_range (NULL, MT_MATECONF_HOME "/dwell_time", + WID ("dwell_time"), NULL); + mateconf_peditor_new_numeric_range (NULL, MT_MATECONF_HOME "/threshold", + WID ("threshold"), NULL); + + mateconf_peditor_new_select_radio (NULL, MT_MATECONF_HOME "/dwell_mode", + gtk_radio_button_get_group (GTK_RADIO_BUTTON (WID ("dwell_mode_ctw"))), + NULL); + update_mode_sensitivity (dialog, + mateconf_client_get_int (client, + MT_MATECONF_HOME "/dwell_mode", + NULL)); + + populate_gesture_combo (WID ("dwell_gest_single")); + mateconf_peditor_new_combo_box (NULL, MT_MATECONF_HOME "/dwell_gesture_single", + WID ("dwell_gest_single"), NULL); + g_signal_connect (WID ("dwell_gest_single"), "changed", + G_CALLBACK (gesture_single), client); + + populate_gesture_combo (WID ("dwell_gest_double")); + mateconf_peditor_new_combo_box (NULL, MT_MATECONF_HOME "/dwell_gesture_double", + WID ("dwell_gest_double"), NULL); + g_signal_connect (WID ("dwell_gest_double"), "changed", + G_CALLBACK (gesture_double), client); + + populate_gesture_combo (WID ("dwell_gest_drag")); + mateconf_peditor_new_combo_box (NULL, MT_MATECONF_HOME "/dwell_gesture_drag", + WID ("dwell_gest_drag"), NULL); + g_signal_connect (WID ("dwell_gest_drag"), "changed", + G_CALLBACK (gesture_drag), client); + + populate_gesture_combo (WID ("dwell_gest_secondary")); + mateconf_peditor_new_combo_box (NULL, MT_MATECONF_HOME "/dwell_gesture_secondary", + WID ("dwell_gest_secondary"), NULL); + g_signal_connect (WID ("dwell_gest_secondary"), "changed", + G_CALLBACK (gesture_secondary), client); + + g_signal_connect (WID ("delay_enable"), "toggled", + G_CALLBACK (delay_enable_toggled_cb), dialog); + delay_enable_toggled_cb (WID ("delay_enable"), dialog); + g_signal_connect (WID ("dwell_enable"), "toggled", + G_CALLBACK (dwell_enable_toggled_cb), dialog); + dwell_enable_toggled_cb (WID ("dwell_enable"), dialog); +} diff --git a/capplets/mouse/mate-mouse-accessibility.h b/capplets/mouse/mate-mouse-accessibility.h new file mode 100644 index 00000000..0fd4ad33 --- /dev/null +++ b/capplets/mouse/mate-mouse-accessibility.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2007 Gerd Kohlberger + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __MATE_MOUSE_A11Y_H +#define __MATE_MOUSE_A11Y_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +void setup_accessibility (GtkBuilder *dialog, MateConfClient *client); + +#ifdef __cplusplus +} +#endif + +#endif /* __MATE_MOUSE_A11Y_H */ diff --git a/capplets/mouse/mate-mouse-properties.c b/capplets/mouse/mate-mouse-properties.c new file mode 100644 index 00000000..8e9824b9 --- /dev/null +++ b/capplets/mouse/mate-mouse-properties.c @@ -0,0 +1,647 @@ +/* -*- mode: c; style: linux -*- */ + +/* mouse-properties-capplet.c + * Copyright (C) 2001 Red Hat, Inc. + * Copyright (C) 2001 Ximian, Inc. + * + * Written by: Jonathon Blandford , + * Bradford Hovinen , + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +#include + +#include +#include +#include +#include +#include + +#include "capplet-util.h" +#include "mateconf-property-editor.h" +#include "activate-settings-daemon.h" +#include "capplet-stock-icons.h" +#include "mate-mouse-accessibility.h" + +#include +#include +#include +#ifdef HAVE_XINPUT +#include +#include +#endif + +#ifdef HAVE_XCURSOR +#include +#endif + +enum +{ + DOUBLE_CLICK_TEST_OFF, + DOUBLE_CLICK_TEST_MAYBE, + DOUBLE_CLICK_TEST_ON +}; + +/* We use this in at least half a dozen places, so it makes sense just to + * define the macro */ + +#define DOUBLE_CLICK_KEY "/desktop/mate/peripherals/mouse/double_click" + +/* State in testing the double-click speed. Global for a great deal of + * convenience + */ +static gint double_click_state = DOUBLE_CLICK_TEST_OFF; + +/* normalization routines */ +/* All of our scales but double_click are on the range 1->10 as a result, we + * have a few routines to convert from whatever the mateconf key is to our range. + */ +static MateConfValue * +double_click_from_mateconf (MateConfPropertyEditor *peditor, const MateConfValue *value) +{ + MateConfValue *new_value; + + new_value = mateconf_value_new (MATECONF_VALUE_INT); + mateconf_value_set_int (new_value, CLAMP ((int) floor ((mateconf_value_get_int (value) + 50) / 100.0) * 100, 100, 1000)); + return new_value; +} + +static void +get_default_mouse_info (int *default_numerator, int *default_denominator, int *default_threshold) +{ + int numerator, denominator; + int threshold; + int tmp_num, tmp_den, tmp_threshold; + + /* Query X for the default value */ + XGetPointerControl (GDK_DISPLAY (), &numerator, &denominator, + &threshold); + XChangePointerControl (GDK_DISPLAY (), True, True, -1, -1, -1); + XGetPointerControl (GDK_DISPLAY (), &tmp_num, &tmp_den, &tmp_threshold); + XChangePointerControl (GDK_DISPLAY (), True, True, numerator, denominator, threshold); + + if (default_numerator) + *default_numerator = tmp_num; + + if (default_denominator) + *default_denominator = tmp_den; + + if (default_threshold) + *default_threshold = tmp_threshold; + +} + +static MateConfValue * +motion_acceleration_from_mateconf (MateConfPropertyEditor *peditor, + const MateConfValue *value) +{ + MateConfValue *new_value; + gfloat motion_acceleration; + + new_value = mateconf_value_new (MATECONF_VALUE_FLOAT); + + if (mateconf_value_get_float (value) == -1.0) { + int numerator, denominator; + + get_default_mouse_info (&numerator, &denominator, NULL); + + motion_acceleration = CLAMP ((gfloat)(numerator / denominator), 0.2, 6.0); + } + else { + motion_acceleration = CLAMP (mateconf_value_get_float (value), 0.2, 6.0); + } + + if (motion_acceleration >= 1) + mateconf_value_set_float (new_value, motion_acceleration + 4); + else + mateconf_value_set_float (new_value, motion_acceleration * 5); + + return new_value; +} + +static MateConfValue * +motion_acceleration_to_mateconf (MateConfPropertyEditor *peditor, + const MateConfValue *value) +{ + MateConfValue *new_value; + gfloat motion_acceleration; + + new_value = mateconf_value_new (MATECONF_VALUE_FLOAT); + motion_acceleration = CLAMP (mateconf_value_get_float (value), 1.0, 10.0); + + if (motion_acceleration < 5) + mateconf_value_set_float (new_value, motion_acceleration / 5.0); + else + mateconf_value_set_float (new_value, motion_acceleration - 4); + + return new_value; +} + +static MateConfValue * +threshold_from_mateconf (MateConfPropertyEditor *peditor, + const MateConfValue *value) +{ + MateConfValue *new_value; + + new_value = mateconf_value_new (MATECONF_VALUE_FLOAT); + + if (mateconf_value_get_int (value) == -1) { + int threshold; + + get_default_mouse_info (NULL, NULL, &threshold); + mateconf_value_set_float (new_value, CLAMP (threshold, 1, 10)); + } + else { + mateconf_value_set_float (new_value, CLAMP (mateconf_value_get_int (value), 1, 10)); + } + + return new_value; +} + +static MateConfValue * +drag_threshold_from_mateconf (MateConfPropertyEditor *peditor, + const MateConfValue *value) +{ + MateConfValue *new_value; + + new_value = mateconf_value_new (MATECONF_VALUE_FLOAT); + + mateconf_value_set_float (new_value, CLAMP (mateconf_value_get_int (value), 1, 10)); + + return new_value; +} + +/* Double Click handling */ + +struct test_data_t +{ + gint *timeout_id; + GtkWidget *image; +}; + +/* Timeout for the double click test */ + +static gboolean +test_maybe_timeout (struct test_data_t *data) +{ + double_click_state = DOUBLE_CLICK_TEST_OFF; + + gtk_image_set_from_stock (GTK_IMAGE (data->image), + MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size()); + + *data->timeout_id = 0; + + return FALSE; +} + +/* Callback issued when the user clicks the double click testing area. */ + +static gboolean +event_box_button_press_event (GtkWidget *widget, + GdkEventButton *event, + MateConfChangeSet *changeset) +{ + gint double_click_time; + MateConfValue *value; + static struct test_data_t data; + static gint test_on_timeout_id = 0; + static gint test_maybe_timeout_id = 0; + static guint32 double_click_timestamp = 0; + GtkWidget *image; + MateConfClient *client; + + if (event->type != GDK_BUTTON_PRESS) + return FALSE; + + image = g_object_get_data (G_OBJECT (widget), "image"); + + if (!(changeset && mateconf_change_set_check_value (changeset, DOUBLE_CLICK_KEY, &value))) { + client = mateconf_client_get_default(); + double_click_time = mateconf_client_get_int (client, DOUBLE_CLICK_KEY, NULL); + g_object_unref (client); + + } else + double_click_time = mateconf_value_get_int (value); + + if (test_maybe_timeout_id != 0) + g_source_remove (test_maybe_timeout_id); + if (test_on_timeout_id != 0) + g_source_remove (test_on_timeout_id); + + switch (double_click_state) { + case DOUBLE_CLICK_TEST_OFF: + double_click_state = DOUBLE_CLICK_TEST_MAYBE; + data.image = image; + data.timeout_id = &test_maybe_timeout_id; + test_maybe_timeout_id = g_timeout_add (double_click_time, (GtkFunction) test_maybe_timeout, &data); + break; + case DOUBLE_CLICK_TEST_MAYBE: + if (event->time - double_click_timestamp < double_click_time) { + double_click_state = DOUBLE_CLICK_TEST_ON; + data.image = image; + data.timeout_id = &test_on_timeout_id; + test_on_timeout_id = g_timeout_add (2500, (GtkFunction) test_maybe_timeout, &data); + } + break; + case DOUBLE_CLICK_TEST_ON: + double_click_state = DOUBLE_CLICK_TEST_OFF; + break; + } + + double_click_timestamp = event->time; + + switch (double_click_state) { + case DOUBLE_CLICK_TEST_ON: + gtk_image_set_from_stock (GTK_IMAGE (image), + MOUSE_DBLCLCK_ON, mouse_capplet_dblclck_icon_get_size()); + break; + case DOUBLE_CLICK_TEST_MAYBE: + gtk_image_set_from_stock (GTK_IMAGE (image), + MOUSE_DBLCLCK_MAYBE, mouse_capplet_dblclck_icon_get_size()); + break; + case DOUBLE_CLICK_TEST_OFF: + gtk_image_set_from_stock (GTK_IMAGE (image), + MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size()); + break; + } + + return TRUE; +} + +static void +orientation_radio_button_release_event (GtkWidget *widget, + GdkEventButton *event) +{ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); +} + +static MateConfValue * +left_handed_from_mateconf (MateConfPropertyEditor *peditor, + const MateConfValue *value) +{ + MateConfValue *new_value; + + new_value = mateconf_value_new (MATECONF_VALUE_INT); + + mateconf_value_set_int (new_value, mateconf_value_get_bool (value)); + + return new_value; +} + +static MateConfValue * +left_handed_to_mateconf (MateConfPropertyEditor *peditor, + const MateConfValue *value) +{ + MateConfValue *new_value; + + new_value = mateconf_value_new (MATECONF_VALUE_BOOL); + + mateconf_value_set_bool (new_value, mateconf_value_get_int (value) == 1); + + return new_value; +} + +static void +scrollmethod_changed_event (MateConfPropertyEditor *peditor, + const gchar *key, + const MateConfValue *value, + GtkBuilder *dialog) +{ + GtkToggleButton *disabled = GTK_TOGGLE_BUTTON (WID ("scroll_disabled_radio")); + + gtk_widget_set_sensitive (WID ("horiz_scroll_toggle"), + !gtk_toggle_button_get_active (disabled)); +} + +static void +synaptics_check_capabilities (GtkBuilder *dialog) +{ +#ifdef HAVE_XINPUT + int numdevices, i; + XDeviceInfo *devicelist; + Atom realtype, prop; + int realformat; + unsigned long nitems, bytes_after; + unsigned char *data; + + prop = XInternAtom (GDK_DISPLAY (), "Synaptics Capabilities", True); + if (!prop) + return; + + devicelist = XListInputDevices (GDK_DISPLAY (), &numdevices); + for (i = 0; i < numdevices; i++) { + if (devicelist[i].use != IsXExtensionPointer) + continue; + + gdk_error_trap_push (); + XDevice *device = XOpenDevice (GDK_DISPLAY (), + devicelist[i].id); + if (gdk_error_trap_pop ()) + continue; + + gdk_error_trap_push (); + if ((XGetDeviceProperty (GDK_DISPLAY (), device, prop, 0, 2, False, + XA_INTEGER, &realtype, &realformat, &nitems, + &bytes_after, &data) == Success) && (realtype != None)) { + /* Property data is booleans for has_left, has_middle, + * has_right, has_double, has_triple */ + if (!data[0]) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("tap_to_click_toggle")), TRUE); + gtk_widget_set_sensitive (WID ("tap_to_click_toggle"), FALSE); + } + + if (!data[3]) + gtk_widget_set_sensitive (WID ("scroll_twofinger_radio"), FALSE); + + XFree (data); + } + gdk_error_trap_pop (); + + XCloseDevice (GDK_DISPLAY (), device); + } + XFreeDeviceList (devicelist); +#endif +} + +static gboolean +find_synaptics (void) +{ + gboolean ret = FALSE; +#ifdef HAVE_XINPUT + int numdevices, i; + XDeviceInfo *devicelist; + Atom realtype, prop; + int realformat; + unsigned long nitems, bytes_after; + unsigned char *data; + XExtensionVersion *version; + + /* Input device properties require version 1.5 or higher */ + version = XGetExtensionVersion (GDK_DISPLAY (), "XInputExtension"); + if (!version->present || + (version->major_version * 1000 + version->minor_version) < 1005) { + XFree (version); + return False; + } + + prop = XInternAtom (GDK_DISPLAY (), "Synaptics Off", True); + if (!prop) + return False; + + devicelist = XListInputDevices (GDK_DISPLAY (), &numdevices); + for (i = 0; i < numdevices; i++) { + if (devicelist[i].use != IsXExtensionPointer) + continue; + + gdk_error_trap_push(); + XDevice *device = XOpenDevice (GDK_DISPLAY (), + devicelist[i].id); + if (gdk_error_trap_pop ()) + continue; + + gdk_error_trap_push (); + if ((XGetDeviceProperty (GDK_DISPLAY (), device, prop, 0, 1, False, + XA_INTEGER, &realtype, &realformat, &nitems, + &bytes_after, &data) == Success) && (realtype != None)) { + XFree (data); + ret = TRUE; + } + gdk_error_trap_pop (); + + XCloseDevice (GDK_DISPLAY (), device); + + if (ret) + break; + } + + XFree (version); + XFreeDeviceList (devicelist); +#endif + return ret; +} + +/* Set up the property editors in the dialog. */ +static void +setup_dialog (GtkBuilder *dialog, MateConfChangeSet *changeset) +{ + GtkRadioButton *radio; + GObject *peditor; + + /* Orientation radio buttons */ + radio = GTK_RADIO_BUTTON (WID ("left_handed_radio")); + peditor = mateconf_peditor_new_select_radio + (changeset, "/desktop/mate/peripherals/mouse/left_handed", gtk_radio_button_get_group (radio), + "conv-to-widget-cb", left_handed_from_mateconf, + "conv-from-widget-cb", left_handed_to_mateconf, + NULL); + /* explicitly connect to button-release so that you can change orientation with either button */ + g_signal_connect (WID ("right_handed_radio"), "button_release_event", + G_CALLBACK (orientation_radio_button_release_event), NULL); + g_signal_connect (WID ("left_handed_radio"), "button_release_event", + G_CALLBACK (orientation_radio_button_release_event), NULL); + + /* Locate pointer toggle */ + peditor = mateconf_peditor_new_boolean + (changeset, "/desktop/mate/peripherals/mouse/locate_pointer", WID ("locate_pointer_toggle"), NULL); + + /* Double-click time */ + peditor = mateconf_peditor_new_numeric_range + (changeset, DOUBLE_CLICK_KEY, WID ("delay_scale"), + "conv-to-widget-cb", double_click_from_mateconf, + NULL); + gtk_image_set_from_stock (GTK_IMAGE (WID ("double_click_image")), MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size ()); + g_object_set_data (G_OBJECT (WID ("double_click_eventbox")), "image", WID ("double_click_image")); + g_signal_connect (WID ("double_click_eventbox"), "button_press_event", + G_CALLBACK (event_box_button_press_event), changeset); + + /* speed */ + mateconf_peditor_new_numeric_range + (changeset, "/desktop/mate/peripherals/mouse/motion_acceleration", WID ("accel_scale"), + "conv-to-widget-cb", motion_acceleration_from_mateconf, + "conv-from-widget-cb", motion_acceleration_to_mateconf, + NULL); + + mateconf_peditor_new_numeric_range + (changeset, "/desktop/mate/peripherals/mouse/motion_threshold", WID ("sensitivity_scale"), + "conv-to-widget-cb", threshold_from_mateconf, + NULL); + + /* DnD threshold */ + mateconf_peditor_new_numeric_range + (changeset, "/desktop/mate/peripherals/mouse/drag_threshold", WID ("drag_threshold_scale"), + "conv-to-widget-cb", drag_threshold_from_mateconf, + NULL); + + /* Trackpad page */ + if (find_synaptics () == FALSE) + gtk_notebook_remove_page (GTK_NOTEBOOK (WID ("prefs_widget")), -1); + else { + mateconf_peditor_new_boolean + (changeset, "/desktop/mate/peripherals/touchpad/disable_while_typing", WID ("disable_w_typing_toggle"), NULL); + mateconf_peditor_new_boolean + (changeset, "/desktop/mate/peripherals/touchpad/tap_to_click", WID ("tap_to_click_toggle"), NULL); + mateconf_peditor_new_boolean + (changeset, "/desktop/mate/peripherals/touchpad/horiz_scroll_enabled", WID ("horiz_scroll_toggle"), NULL); + radio = GTK_RADIO_BUTTON (WID ("scroll_disabled_radio")); + peditor = mateconf_peditor_new_select_radio + (changeset, "/desktop/mate/peripherals/touchpad/scroll_method", gtk_radio_button_get_group (radio), + NULL); + + synaptics_check_capabilities (dialog); + scrollmethod_changed_event (MATECONF_PROPERTY_EDITOR (peditor), NULL, NULL, dialog); + g_signal_connect (peditor, "value-changed", + G_CALLBACK (scrollmethod_changed_event), dialog); + } + +} + +/* Construct the dialog */ + +static GtkBuilder * +create_dialog (void) +{ + GtkBuilder *dialog; + GtkSizeGroup *size_group; + GError *error = NULL; + + dialog = gtk_builder_new (); + gtk_builder_add_from_file (dialog, MATECC_UI_DIR "/mate-mouse-properties.ui", &error); + if (error != NULL) { + g_warning ("Error loading UI file: %s", error->message); + return NULL; + } + + size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); + gtk_size_group_add_widget (size_group, WID ("acceleration_label")); + gtk_size_group_add_widget (size_group, WID ("sensitivity_label")); + gtk_size_group_add_widget (size_group, WID ("threshold_label")); + gtk_size_group_add_widget (size_group, WID ("timeout_label")); + + size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); + gtk_size_group_add_widget (size_group, WID ("acceleration_fast_label")); + gtk_size_group_add_widget (size_group, WID ("sensitivity_high_label")); + gtk_size_group_add_widget (size_group, WID ("threshold_large_label")); + gtk_size_group_add_widget (size_group, WID ("timeout_long_label")); + + size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); + gtk_size_group_add_widget (size_group, WID ("acceleration_slow_label")); + gtk_size_group_add_widget (size_group, WID ("sensitivity_low_label")); + gtk_size_group_add_widget (size_group, WID ("threshold_small_label")); + gtk_size_group_add_widget (size_group, WID ("timeout_short_label")); + + size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); + gtk_size_group_add_widget (size_group, WID ("simulated_delay_label")); + gtk_size_group_add_widget (size_group, WID ("dwell_delay_label")); + gtk_size_group_add_widget (size_group, WID ("dwell_threshold_label")); + + size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); + gtk_size_group_add_widget (size_group, WID ("simulated_delay_short_label")); + gtk_size_group_add_widget (size_group, WID ("dwell_delay_short_label")); + gtk_size_group_add_widget (size_group, WID ("dwell_threshold_small_label")); + + size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL); + gtk_size_group_add_widget (size_group, WID ("simulated_delay_long_label")); + gtk_size_group_add_widget (size_group, WID ("dwell_delay_long_label")); + gtk_size_group_add_widget (size_group, WID ("dwell_threshold_large_label")); + + return dialog; +} + +/* Callback issued when a button is clicked on the dialog */ + +static void +dialog_response_cb (GtkDialog *dialog, gint response_id, MateConfChangeSet *changeset) +{ + if (response_id == GTK_RESPONSE_HELP) + capplet_help (GTK_WINDOW (dialog), + "goscustperiph-5"); + else + gtk_main_quit (); +} + +int +main (int argc, char **argv) +{ + MateConfClient *client; + GtkBuilder *dialog; + GtkWidget *dialog_win, *w; + gchar *start_page = NULL; + + GOptionContext *context; + GOptionEntry cap_options[] = { + {"show-page", 'p', G_OPTION_FLAG_IN_MAIN, + G_OPTION_ARG_STRING, + &start_page, + /* TRANSLATORS: don't translate the terms in brackets */ + N_("Specify the name of the page to show (general|accessibility)"), + N_("page") }, + {NULL} + }; + + context = g_option_context_new (_("- MATE Mouse Preferences")); + g_option_context_add_main_entries (context, cap_options, GETTEXT_PACKAGE); + capplet_init (context, &argc, &argv); + + capplet_init_stock_icons (); + + activate_settings_daemon (); + + client = mateconf_client_get_default (); + mateconf_client_add_dir (client, "/desktop/mate/peripherals/mouse", MATECONF_CLIENT_PRELOAD_ONELEVEL, NULL); + mateconf_client_add_dir (client, "/desktop/mate/peripherals/touchpad", MATECONF_CLIENT_PRELOAD_ONELEVEL, NULL); + + dialog = create_dialog (); + + if (dialog) { + setup_dialog (dialog, NULL); + setup_accessibility (dialog, client); + + dialog_win = WID ("mouse_properties_dialog"); + g_signal_connect (dialog_win, "response", + G_CALLBACK (dialog_response_cb), NULL); + + if (start_page != NULL) { + gchar *page_name; + + page_name = g_strconcat (start_page, "_vbox", NULL); + g_free (start_page); + + w = WID (page_name); + if (w != NULL) { + GtkNotebook *nb; + gint pindex; + + nb = GTK_NOTEBOOK (WID ("prefs_widget")); + pindex = gtk_notebook_page_num (nb, w); + if (pindex != -1) + gtk_notebook_set_current_page (nb, pindex); + } + g_free (page_name); + } + + capplet_set_icon (dialog_win, "input-mouse"); + gtk_widget_show (dialog_win); + + gtk_main (); + + g_object_unref (dialog); + } + + g_object_unref (client); + + return 0; +} diff --git a/capplets/mouse/mate-mouse-properties.ui b/capplets/mouse/mate-mouse-properties.ui new file mode 100644 index 00000000..b855ff11 --- /dev/null +++ b/capplets/mouse/mate-mouse-properties.ui @@ -0,0 +1,1707 @@ + + + + 10 + 1 + 1 + 1 + 0 + 6 + + + 10 + 1 + 1 + 1 + 0 + 1 + + + 10 + 1 + 1 + 1 + 0 + 1 + + + 1000 + 100 + 100 + 100 + 0 + 400 + + + 3 + 0.5 + 0.10000000000000001 + 0.10000000000000001 + 0 + 1.2 + + + 3 + 0.20000000000000001 + 0.10000000000000001 + 0.10000000000000001 + 0 + 1.2 + + + 30 + 0 + 1 + 1 + 0 + 15 + + + + + 5 + Mouse Preferences + dialog + False + + + True + vertical + 2 + + + True + True + 5 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + vertical + 18 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Mouse Orientation + + + + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 6 + + + _Right-handed + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + True + + + 0 + + + + + _Left-handed + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + True + right_handed_radio + + + 1 + + + + + + + 1 + + + + + False + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Locate Pointer + + + + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + 12 + + + Sh_ow position of pointer when the Control key is pressed + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + + + + + 1 + + + + + False + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Pointer Speed + + + + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + 12 + + + True + 2 + 3 + 12 + 6 + + + True + 0 + _Acceleration: + True + center + accel_scale + + + GTK_FILL + GTK_FILL + + + + + True + 0 + _Sensitivity: + True + center + sensitivity_scale + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + + + True + 1 + Slow + center + + + + + + + False + 0 + + + + + True + True + discontinuous + adjustment1 + False + right + + + 1 + + + + + True + 0 + Fast + center + + + + + + + False + 2 + + + + + 1 + 3 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + + + True + 1 + Low + center + + + + + + + False + 0 + + + + + True + True + discontinuous + adjustment2 + 0 + False + + + 1 + + + + + True + 0 + High + center + + + + + + + False + 2 + + + + + 1 + 3 + 1 + 2 + + + + + + + 1 + + + + + False + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Drag and Drop + + + + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 12 + + + True + 12 + + + True + 0 + Thr_eshold: + True + center + drag_threshold_scale + + + False + False + 0 + + + + + True + 6 + + + True + 1 + Small + center + + + + + + + False + False + 0 + + + + + True + True + discontinuous + adjustment3 + 0 + False + + + + + + Cursor blinks speed + + + + + 1 + + + + + True + 0 + Large + + + + + + + False + False + 2 + + + + + 1 + + + + + 0 + + + + + + + 1 + + + + + False + 3 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Double-Click Timeout + + + + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 12 + + + True + 12 + + + True + 0 + _Timeout: + True + center + delay_scale + + + False + False + 0 + + + + + True + 6 + + + True + 1 + Short + + + + + + + False + False + 0 + + + + + True + True + discontinuous + adjustment4 + False + + + + + + Cursor blinks speed + + + + + 1 + + + + + True + 0 + Long + + + + + + + False + False + 2 + + + + + 1 + + + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + 180 + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + To test your double-click settings, try to double-click on the light bulb. + True + + + + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-missing-image + + + + + 1 + + + + + 1 + + + + + + + 1 + + + + + False + 4 + + + + + + + True + General + center + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + vertical + 18 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Simulated Secondary Click + + + + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 6 + + + _Trigger secondary click by holding down the primary button + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + 12 + + + True + 0 + _Delay: + True + center + delay_time + + + False + False + 0 + + + + + True + 6 + + + True + 1 + 0.4699999988079071 + Short + + + + + + + False + False + 0 + + + + + True + True + discontinuous + adjustment5 + False + + + + + + Cursor blinks speed + + + + + 1 + + + + + True + 0 + Long + + + + + + + False + False + 2 + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + False + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Dwell Click + + + + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 6 + + + _Initiate click when stopping pointer movement + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 6 + + + True + 2 + 3 + 12 + 6 + + + True + 0 + _Motion threshold: + True + center + threshold + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 0 + D_elay: + True + center + dwell_time + + + GTK_FILL + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + + + True + 1 + Short + center + + + + + + + False + 0 + + + + + True + True + discontinuous + adjustment6 + False + right + + + 1 + + + + + True + 0 + Long + center + + + + + + + False + 2 + + + + + 1 + 3 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + + + True + 1 + Small + center + + + + + + + False + 0 + + + + + True + True + discontinuous + adjustment7 + 0 + False + + + 1 + + + + + True + 0 + Large + center + + + + + + + False + 2 + + + + + 1 + 3 + 1 + 2 + + + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 6 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 6 + + + Choose type of click _beforehand + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + True + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 6 + + + Show click type _window + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 6 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-dialog-info + + + False + 0 + + + + + 320 + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + You can also use the Dwell Click panel applet to choose the click type. + True + + + + + + 1 + + + + + 1 + + + + + + + 1 + + + + + False + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 6 + + + Choose type of click with mo_use gestures + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + True + dwell_mode_ctw + + + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 4 + 2 + 12 + 6 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + 3 + 4 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + 2 + 3 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + Seco_ndary click: + True + dwell_gest_secondary + + + 3 + 4 + GTK_FILL + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + D_rag click: + True + dwell_gest_drag + + + 2 + 3 + GTK_FILL + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + D_ouble click: + True + dwell_gest_double + + + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + _Single click: + True + dwell_gest_single + + + GTK_FILL + GTK_FILL + + + + + + + 1 + + + + + False + 1 + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + False + 1 + + + + + + + True + Accessibility + center + + + 1 + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + vertical + 18 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 6 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + 0 + General + + + + + + False + False + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + 0 + + + + False + False + 0 + + + + + Disable _touchpad while typing + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + True + + + 1 + + + + + False + False + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + 0 + + + + False + False + 0 + + + + + Enable _mouse clicks with touchpad + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + True + + + 1 + + + + + False + False + 2 + + + + + False + False + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + 6 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + 0 + Scrolling + + + + + + False + False + 0 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + 0 + + + + False + False + 0 + + + + + True + + + _Disabled + True + True + False + True + True + + + False + False + 0 + + + + + _Edge scrolling + True + True + False + True + True + scroll_disabled_radio + + + False + False + 1 + + + + + Two-_finger scrolling + True + True + False + True + True + scroll_disabled_radio + + + False + False + 2 + + + + + 1 + + + + + False + False + 1 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + 0 + + + + False + False + 0 + + + + + Enable h_orizontal scrolling + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + True + + + 1 + + + + + False + False + 2 + + + + + False + False + 1 + + + + + + + True + Touchpad + center + + + 2 + False + + + + + 1 + + + + + True + end + + + gtk-help + True + True + True + False + True + + + False + False + 0 + + + + + gtk-close + True + True + True + False + True + + + False + False + 1 + + + + + False + end + 0 + + + + + + helpbutton1 + closebutton1 + + + diff --git a/capplets/mouse/mate-settings-mouse.desktop.in.in b/capplets/mouse/mate-settings-mouse.desktop.in.in new file mode 100644 index 00000000..5fca5e02 --- /dev/null +++ b/capplets/mouse/mate-settings-mouse.desktop.in.in @@ -0,0 +1,14 @@ +[Desktop Entry] +_Name=Mouse +_Comment=Set your mouse preferences +Exec=mate-mouse-properties +Icon=input-mouse +Terminal=false +Type=Application +StartupNotify=true +Categories=MATE;GTK;Settings;HardwareSettings; +OnlyShowIn=MATE; +X-MATE-Bugzilla-Bugzilla=MATE +X-MATE-Bugzilla-Product=mate-control-center +X-MATE-Bugzilla-Component=mouse +X-MATE-Bugzilla-Version=@VERSION@ -- cgit v1.2.1