[gnome-settings-daemon] a11y-keyboard: Use macro for everything mask



commit 0bc81bad702d314cfc975ab4df58817a45a6dd05
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Jan 28 17:58:50 2013 +0100

    a11y-keyboard: Use macro for everything mask
    
    Less to copy/paste

 plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
index 7acd274..33e4665 100644
--- a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
+++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
@@ -62,6 +62,17 @@ struct GsdA11yKeyboardManagerPrivate
         NotifyNotification *notification;
 };
 
+#define DEFAULT_XKB_SET_CONTROLS_MASK           XkbSlowKeysMask         | \
+                                                XkbBounceKeysMask       | \
+                                                XkbStickyKeysMask       | \
+                                                XkbMouseKeysMask        | \
+                                                XkbMouseKeysAccelMask   | \
+                                                XkbAccessXKeysMask      | \
+                                                XkbAccessXTimeoutMask   | \
+                                                XkbAccessXFeedbackMask  | \
+                                                XkbControlsEnabledMask
+
+
 static void     gsd_a11y_keyboard_manager_class_init  (GsdA11yKeyboardManagerClass *klass);
 static void     gsd_a11y_keyboard_manager_init        (GsdA11yKeyboardManager      *a11y_keyboard_manager);
 static void     gsd_a11y_keyboard_manager_finalize    (GObject             *object);
@@ -306,15 +317,7 @@ set_server_from_gsettings (GsdA11yKeyboardManager *manager)
 
         gdk_error_trap_push ();
         XkbSetControls (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
-                        XkbSlowKeysMask         |
-                        XkbBounceKeysMask       |
-                        XkbStickyKeysMask       |
-                        XkbMouseKeysMask        |
-                        XkbMouseKeysAccelMask   |
-                        XkbAccessXKeysMask      |
-                        XkbAccessXTimeoutMask   |
-                        XkbAccessXFeedbackMask  |
-                        XkbControlsEnabledMask,
+                        DEFAULT_XKB_SET_CONTROLS_MASK,
                         desc);
 
         XkbFreeKeyboard (desc, XkbAllComponentsMask, True);



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