[mousetweaks] Remove mouse orientation checks



commit e5759fa1e4f27c48e3874a7e4f799bb1b1c160dc
Author: Gerd Kohlberger <gerdk src gnome org>
Date:   Mon Oct 11 12:16:54 2010 +0200

    Remove mouse orientation checks
    
    gnome-settings-daemon no longer modifies the button mapping of the
    virtual XTEST device. See bug #627084.

 src/mt-common.h |    3 ---
 src/mt-main.c   |   23 -----------------------
 src/mt-main.h   |    1 -
 3 files changed, 0 insertions(+), 27 deletions(-)
---
diff --git a/src/mt-common.h b/src/mt-common.h
index d8e8b9d..1ab9507 100644
--- a/src/mt-common.h
+++ b/src/mt-common.h
@@ -51,9 +51,6 @@ G_BEGIN_DECLS
 #define OPT_STYLE     MT_GCONF_HOME "/button_layout"
 #define OPT_ANIMATE   MT_GCONF_HOME "/animate_cursor"
 
-#define GNOME_MOUSE_DIR "/desktop/gnome/peripherals/mouse"
-#define GNOME_MOUSE_ORIENT GNOME_MOUSE_DIR "/left_handed"
-
 enum
 {
     DWELL_MODE_CTW = 0,
diff --git a/src/mt-main.c b/src/mt-main.c
index 339007e..45d5dec 100644
--- a/src/mt-main.c
+++ b/src/mt-main.c
@@ -84,19 +84,6 @@ mt_main_generate_motion_event (GdkScreen *screen, gint x, gint y)
     gdk_error_trap_pop ();
 }
 
-static guint
-mt_main_check_mouse_orientation (MtData *mt, guint button)
-{
-    if (mt->left_handed)
-    {
-        if (button == 1)
-            return 3;
-        else if (button == 3)
-            return 1;
-    }
-    return button;
-}
-
 static void
 mt_main_generate_button_event (MtData *mt,
                                guint   button,
@@ -106,7 +93,6 @@ mt_main_generate_button_event (MtData *mt,
     Display *dpy;
 
     dpy = mt_common_get_xdisplay ();
-    button = mt_main_check_mouse_orientation (mt, button);
 
     gdk_error_trap_push ();
     switch (type)
@@ -644,10 +630,6 @@ gconf_value_changed (GConfClient *client,
         else
             mt_cursor_manager_restore_all (manager);
     }
-    else if (g_str_equal (key, GNOME_MOUSE_ORIENT) && value->type == GCONF_VALUE_BOOL)
-    {
-        mt->left_handed = gconf_value_get_bool (value);
-    }
 }
 
 static void
@@ -676,11 +658,6 @@ get_gconf_options (MtData *mt)
         gconf_client_get_int (mt->client, OPT_G_DRAG, NULL);
     mt->dwell_dirs[DWELL_CLICK_TYPE_RIGHT] =
         gconf_client_get_int (mt->client, OPT_G_RIGHT, NULL);
-
-    /* mouse orientation */
-    mt->left_handed = gconf_client_get_bool (mt->client,
-                                             GNOME_MOUSE_ORIENT,
-                                             NULL);
 }
 
 static MtData *
diff --git a/src/mt-main.h b/src/mt-main.h
index 818f020..ae2dd14 100644
--- a/src/mt-main.h
+++ b/src/mt-main.h
@@ -53,7 +53,6 @@ struct _MtData
     guint        animate_cursor : 1;
 
     /* state flags */
-    guint        left_handed           : 1;
     guint        dwell_drag_started    : 1;
     guint        dwell_gesture_started : 1;
     guint        override_cursor       : 1;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]