Commit f41fc252 authored by Sebastian Ramacher's avatar Sebastian Ramacher
Browse files

Open password dialog after handling current input (fixes #468)

Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <>
parent 63e477fd
......@@ -596,6 +596,16 @@ get_formatted_filename(zathura_t* zathura, const char* file_path, bool statusbar
static gboolean
document_open_password_dialog(gpointer data)
zathura_password_dialog_info_t* password_dialog_info = data;
girara_dialog(password_dialog_info->zathura->ui.session, _("Enter password:"), true, NULL,
(girara_callback_inputbar_activate_t) cb_password_dialog, password_dialog_info);
return FALSE;
document_open(zathura_t* zathura, const char* path, const char* password,
int page_number)
......@@ -610,14 +620,14 @@ document_open(zathura_t* zathura, const char* path, const char* password,
if (document == NULL) {
girara_debug("Invalid or no password.");
zathura_password_dialog_info_t* password_dialog_info = malloc(sizeof(zathura_password_dialog_info_t));
if (password_dialog_info != NULL) {
password_dialog_info->zathura = zathura;
if (path != NULL) {
password_dialog_info->path = g_strdup(path);
girara_dialog(zathura->ui.session, "Enter password:", true, NULL,
(girara_callback_inputbar_activate_t) cb_password_dialog, password_dialog_info);
gdk_threads_add_idle(document_open_password_dialog, password_dialog_info);
goto error_out;
} else {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment