mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Give a visible (popup) error message when failed to open theme
This commit is contained in:
parent
46f1e6f107
commit
13a83e3495
1 changed files with 4 additions and 1 deletions
|
@ -860,7 +860,10 @@ gboolean rofi_theme_parse_file ( const char *file )
|
|||
char *filename = rofi_expand_path ( file );
|
||||
yyin = fopen ( filename, "rb" );
|
||||
if ( yyin == NULL ) {
|
||||
fprintf ( stderr, "Failed to open file: %s: '%s'\n", filename, strerror ( errno ) );
|
||||
char *str = g_markup_printf_escaped ( "Failed to open theme: <i>%s</i>\nError: <b>%s</b>",
|
||||
filename, strerror ( errno ) );
|
||||
rofi_add_error_message ( g_string_new ( str ) );
|
||||
g_free(str);
|
||||
g_free ( filename );
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue