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

Merge branch 'develop' of pwmt.org:zathura into develop

parents f8061feb 8f83192d
......@@ -221,6 +221,17 @@ cb_file_monitor(GFileMonitor* monitor, GFile* file, GFile* UNUSED(other_file), G
sc_reload(session, NULL, NULL, 0);
}
static gboolean
password_dialog(gpointer data)
{
zathura_password_dialog_info_t* dialog = data;
if (dialog != NULL) {
girara_dialog(dialog->zathura->ui.session, "Incorrect password. Enter password:", true, NULL,
(girara_callback_inputbar_activate_t) cb_password_dialog, dialog);
}
return FALSE;
}
bool
cb_password_dialog(GtkEntry* entry, zathura_password_dialog_info_t* dialog)
{
......@@ -245,18 +256,19 @@ cb_password_dialog(GtkEntry* entry, zathura_password_dialog_info_t* dialog)
g_free(input);
}
girara_dialog(dialog->zathura->ui.session, "Enter password:", true, NULL,
(girara_callback_inputbar_activate_t) cb_password_dialog, dialog);
g_idle_add(password_dialog, dialog);
return false;
}
/* try to open document again */
document_open(dialog->zathura, dialog->path, input);
if (document_open(dialog->zathura, dialog->path, input) == false) {
g_idle_add(password_dialog, dialog);
} else {
g_free(dialog->path);
free(dialog);
}
g_free(input);
g_free(dialog->path);
free(dialog);
return true;
......
......@@ -23,13 +23,15 @@ sc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument),
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
for (unsigned int page_id = 0; page_id < zathura->document->number_of_pages; ++page_id) {
zathura_page_t* page = zathura->document->pages[page_id];
if (page == NULL) {
continue;
}
if (zathura->document != NULL) {
for (unsigned int page_id = 0; page_id < zathura->document->number_of_pages; ++page_id) {
zathura_page_t* page = zathura->document->pages[page_id];
if (page == NULL) {
continue;
}
g_object_set(page->drawing_area, "draw-links", FALSE, NULL);
g_object_set(page->drawing_area, "draw-links", FALSE, NULL);
}
}
girara_mode_set(session, session->modes.normal);
......
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