- Timestamp:
- Mar 24, 2011, 4:09:22 PM (13 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- 45e2c95
- Parents:
- c809f5e
- git-author:
- David Benjamin <davidben@mit.edu> (03/10/11 15:14:32)
- git-committer:
- David Benjamin <davidben@mit.edu> (03/24/11 16:09:22)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
keymap.c
rf25df21 rb13daa0 38 38 int i; 39 39 40 if ((kb = g_new(owl_keybinding, 1)) == NULL) return(-1); 41 if (0 != owl_keybinding_init(kb, keyseq, command, function_fn, desc)) { 42 g_free(kb); 43 return(-1); 44 } 40 kb = owl_keybinding_new(keyseq, command, function_fn, desc); 41 if (kb == NULL) 42 return -1; 45 43 /* see if another matching binding, and if so remove it. 46 44 * otherwise just add this one. … … 63 61 int i; 64 62 65 if ((kb = g_new(owl_keybinding, 1)) == NULL) return(-1); 66 if (0 != owl_keybinding_make_keys(kb, keyseq)) { 67 g_free(kb); 68 return(-1); 69 } 63 kb = owl_keybinding_new(keyseq, NULL, NULL, NULL); 64 if (kb == NULL) 65 return -1; 70 66 71 67 for (i = owl_list_get_size(&km->bindings)-1; i >= 0; i--) { … … 74 70 owl_list_remove_element(&km->bindings, i); 75 71 owl_keybinding_delete(curkb); 72 owl_keybinding_delete(kb); 76 73 return(0); 77 74 } 78 75 } 76 owl_keybinding_delete(kb); 79 77 return(-2); 80 78 }
Note: See TracChangeset
for help on using the changeset viewer.