Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_int_config_keybindings.c 


Log Message:
Add ability to have seperate NumLock key bindings for on & off states.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_keybindings.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- e_int_config_keybindings.c  27 Nov 2006 16:01:50 -0000      1.44
+++ e_int_config_keybindings.c  11 Dec 2006 10:19:46 -0000      1.45
@@ -910,7 +910,7 @@
    if (bi2->modifiers & E_BINDING_MODIFIER_ALT) j++;
    if (bi2->modifiers & E_BINDING_MODIFIER_SHIFT) j++;
    if (bi2->modifiers & E_BINDING_MODIFIER_WIN) j++;
-
+   
    if (i < j) return -1;
    else if (i > j) return 1; 
    
@@ -1004,7 +1004,7 @@
    cfdata = data;
 
    if (ev->win != cfdata->locals.bind_win) return 1;
-
+   
    if (!strcmp(ev->keyname, "Escape") &&
        !(ev->modifiers & ECORE_X_MODIFIER_SHIFT) &&
        !(ev->modifiers & ECORE_X_MODIFIER_CTRL) &&
@@ -1041,7 +1041,9 @@
               mod |= E_BINDING_MODIFIER_ALT;
             if (ev->modifiers & ECORE_X_MODIFIER_WIN)
               mod |= E_BINDING_MODIFIER_WIN;
-
+            if (ev->modifiers & ECORE_X_LOCK_NUM) 
+              mod |= ECORE_X_LOCK_NUM;
+            
             if (cfdata->locals.add)
               {
                  found = 0;
@@ -1305,7 +1307,7 @@
        if (b[0]) strcat(b, " + ");
        strcat(b, _("WIN"));
      }
-
+   
    if (bi->key && bi->key[0])
      {
        char *l;
@@ -1317,6 +1319,12 @@
        free(l);
      }
 
+   if (bi->modifiers & ECORE_X_LOCK_NUM) 
+     {
+       if (b[0]) strcat(b, " ");
+       strcat(b, _("OFF"));
+     }
+   
    if (!b[0]) return strdup(TEXT_NONE_ACTION_KEY);
    return strdup(b);
 }



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to