Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
f41fc252
Commit
f41fc252
authored
Oct 15, 2015
by
Sebastian Ramacher
Browse files
Open password dialog after handling current input (fixes #468)
Signed-off-by:
Sebastian Ramacher
<
sebastian+dev@ramacher.at
>
parent
63e477fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
zathura/zathura.c
View file @
f41fc252
...
...
@@ -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
;
}
bool
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
)
{
if
(
error
==
ZATHURA_ERROR_INVALID_PASSWORD
)
{
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
{
free
(
password_dialog_info
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment