mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Include in error mesg, what key failed to bind.
This commit is contained in:
parent
29cacd0e83
commit
a9dbd787cf
2 changed files with 8 additions and 2 deletions
|
@ -127,6 +127,11 @@ gboolean parse_keys_abe ( void )
|
|||
if ( x11_parse_key ( entry, &( kb->modmask ), &( kb->keysym ), &( kb->release ), error_msg ) ) {
|
||||
abe[iter].num_bindings++;
|
||||
}
|
||||
else {
|
||||
char *name = g_markup_escape_text ( abe[iter].name, -1 );
|
||||
g_string_append_printf ( error_msg, "Failed to set binding for: <b>%s</b>\n\n", name );
|
||||
g_free ( name );
|
||||
}
|
||||
}
|
||||
|
||||
g_free ( keystr );
|
||||
|
|
|
@ -678,10 +678,11 @@ gboolean x11_parse_key ( const char *combo, unsigned int *mod, xkb_keysym_t *key
|
|||
g_free ( input_key );
|
||||
|
||||
if ( error_msg ) {
|
||||
g_string_append_printf ( str, "Sorry, rofi cannot understand the key combination: <i>%s</i>\n", combo );
|
||||
char *name = g_markup_escape_text ( combo, -1 );
|
||||
g_string_append_printf ( str, "Cannot understand the key combination: <i>%s</i>\n", name );
|
||||
g_string_append ( str, error_msg );
|
||||
g_free ( name );
|
||||
g_free ( error_msg );
|
||||
g_string_append_c ( str, '\n' );
|
||||
return FALSE;
|
||||
}
|
||||
*key = sym;
|
||||
|
|
Loading…
Reference in a new issue