[gnome-control-center] keyboard: Don't handle mask separately



commit 2e7c9531fa0c181eea820a210b2fc2999700f76e
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Aug 27 01:57:41 2013 +0200

    keyboard: Don't handle mask separately
    
    Comparing masks is currently part of the early checks we perform to
    determine that two bindings are different. There's some convenience
    in that, however logically the mask is part of the binding, and
    separating the mask check from comparing the "rest" of the binding
    makes it harder to extend the comparison to consider multiple bindings.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673078

 panels/keyboard/cc-keyboard-manager.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/panels/keyboard/cc-keyboard-manager.c b/panels/keyboard/cc-keyboard-manager.c
index aff1908..e145b91 100644
--- a/panels/keyboard/cc-keyboard-manager.c
+++ b/panels/keyboard/cc-keyboard-manager.c
@@ -111,6 +111,9 @@ find_conflict (CcUniquenessData *data,
   if (data->orig_item && cc_keyboard_item_equal (data->orig_item, item))
     return FALSE;
 
+  if (data->new_mask != combo->mask)
+    return FALSE;
+
   if (data->new_keyval != 0)
     is_conflict = data->new_keyval == combo->keyval;
   else
@@ -128,13 +131,9 @@ compare_keys_for_uniqueness (CcKeyboardItem   *current_item,
 {
   CcKeyboardItem *reverse_item;
 
-  /* No conflict for: blanks, different modifiers or ourselves */
-  if (!current_item ||
-      data->orig_item == current_item ||
-      data->new_mask != current_item->primary_combo->mask)
-    {
-      return FALSE;
-    }
+  /* No conflict for: blanks or ourselves */
+  if (!current_item || data->orig_item == current_item)
+    return FALSE;
 
   reverse_item = cc_keyboard_item_get_reverse_item (current_item);
 


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