mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 22:16:00 +01:00
Report missing plugin/unsupported file type
This commit is contained in:
parent
e0efd8ab1e
commit
cf96d52790
2 changed files with 4 additions and 0 deletions
|
@ -110,6 +110,7 @@ zathura_document_open(zathura_plugin_manager_t* plugin_manager, const char*
|
|||
|
||||
if (plugin == NULL) {
|
||||
girara_error("unknown file type\n");
|
||||
error = ZATHURA_ERROR_UNKNOWN;
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
|
|
|
@ -562,6 +562,9 @@ document_open(zathura_t* zathura, const char* path, const char* password,
|
|||
zathura_document_t* document = zathura_document_open(zathura->plugins.manager, path, password, &error);
|
||||
|
||||
if (document == NULL) {
|
||||
if (error == NULL ) {
|
||||
girara_notify(zathura->ui.session, GIRARA_ERROR, _("Unsupported file type. Please install the necessary plugin."), false, NULL, NULL, NULL);
|
||||
}
|
||||
if (error == ZATHURA_ERROR_INVALID_PASSWORD) {
|
||||
zathura_password_dialog_info_t* password_dialog_info = malloc(sizeof(zathura_password_dialog_info_t));
|
||||
if (password_dialog_info != NULL) {
|
||||
|
|
Loading…
Reference in a new issue