mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	keybind: s/add/create/
This commit is contained in:
		
							parent
							
								
									97c29987e2
								
							
						
					
					
						commit
						b2504bdf9a
					
				
					 3 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -14,9 +14,9 @@ struct keybind {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * keybind_add - parse keybind and add to linked list
 | 
					 * keybind_create - parse keybind and add to linked list
 | 
				
			||||||
 * @keybind: key combination
 | 
					 * @keybind: key combination
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
struct keybind *keybind_add(const char *keybind);
 | 
					struct keybind *keybind_create(const char *keybind);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* __LABWC_KEYBIND_H */
 | 
					#endif /* __LABWC_KEYBIND_H */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,7 +22,7 @@ static uint32_t parse_modifier(const char *symname)
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct keybind *keybind_add(const char *keybind)
 | 
					struct keybind *keybind_create(const char *keybind)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct keybind *k = calloc(1, sizeof(struct keybind));
 | 
						struct keybind *k = calloc(1, sizeof(struct keybind));
 | 
				
			||||||
	xkb_keysym_t keysyms[32];
 | 
						xkb_keysym_t keysyms[32];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -44,7 +44,7 @@ static void fill_keybind(char *nodename, char *content)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	rstrip(nodename, ".keybind.keyboard");
 | 
						rstrip(nodename, ".keybind.keyboard");
 | 
				
			||||||
	if (!strcmp(nodename, "key"))
 | 
						if (!strcmp(nodename, "key"))
 | 
				
			||||||
		current_keybind = keybind_add(content);
 | 
							current_keybind = keybind_create(content);
 | 
				
			||||||
	/* We expect <keybind key=""> to come first */
 | 
						/* We expect <keybind key=""> to come first */
 | 
				
			||||||
	BUG_ON(!current_keybind);
 | 
						BUG_ON(!current_keybind);
 | 
				
			||||||
	if (!strcmp(nodename, "name.action")) {
 | 
						if (!strcmp(nodename, "name.action")) {
 | 
				
			||||||
| 
						 | 
					@ -223,7 +223,7 @@ static void bind(const char *binding, const char *action)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (!binding || !action)
 | 
						if (!binding || !action)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	struct keybind *k = keybind_add(binding);
 | 
						struct keybind *k = keybind_create(binding);
 | 
				
			||||||
	if (k)
 | 
						if (k)
 | 
				
			||||||
		k->action = strdup(action);
 | 
							k->action = strdup(action);
 | 
				
			||||||
	info("binding %s: %s", binding, action);
 | 
						info("binding %s: %s", binding, action);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue