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
be717529
Commit
be717529
authored
Oct 25, 2016
by
Sebastian Ramacher
Browse files
Remove function pointer casts
Signed-off-by:
Sebastian Ramacher
<
sebastian+dev@ramacher.at
>
parent
10f8f897
Changes
4
Show whitespace changes
Inline
Side-by-side
zathura/callbacks.c
View file @
be717529
...
...
@@ -357,14 +357,16 @@ handle_link(GtkEntry* entry, girara_session_t* session,
}
bool
cb_sc_follow
(
GtkEntry
*
entry
,
girara_session_t
*
session
)
cb_sc_follow
(
GtkEntry
*
entry
,
void
*
data
)
{
girara_session_t
*
session
=
data
;
return
handle_link
(
entry
,
session
,
ZATHURA_LINK_ACTION_FOLLOW
);
}
bool
cb_sc_display_link
(
GtkEntry
*
entry
,
girara_session_t
*
session
)
cb_sc_display_link
(
GtkEntry
*
entry
,
void
*
data
)
{
girara_session_t
*
session
=
data
;
return
handle_link
(
entry
,
session
,
ZATHURA_LINK_ACTION_DISPLAY
);
}
...
...
@@ -395,7 +397,7 @@ password_dialog(gpointer data)
"Incorrect password. Enter password:"
,
true
,
NULL
,
(
girara_callback_inputbar_activate_t
)
cb_password_dialog
,
cb_password_dialog
,
dialog
);
}
...
...
@@ -404,12 +406,14 @@ password_dialog(gpointer data)
}
bool
cb_password_dialog
(
GtkEntry
*
entry
,
zathura_password_dialog_info_t
*
dialog
)
cb_password_dialog
(
GtkEntry
*
entry
,
void
*
data
)
{
if
(
entry
==
NULL
||
d
ialog
==
NULL
)
{
if
(
entry
==
NULL
||
d
ata
==
NULL
)
{
goto
error_ret
;
}
zathura_password_dialog_info_t
*
dialog
=
data
;
if
(
dialog
->
path
==
NULL
)
{
free
(
dialog
);
goto
error_ret
;
...
...
zathura/callbacks.h
View file @
be717529
...
...
@@ -110,7 +110,7 @@ void cb_index_row_activated(GtkTreeView* tree_view, GtkTreePath* path,
* @param session The girara session
* @return true if no error occurred and the event has been handled
*/
bool
cb_sc_follow
(
GtkEntry
*
entry
,
girara_session_t
*
session
);
bool
cb_sc_follow
(
GtkEntry
*
entry
,
void
*
session
);
/**
* Called when input has been passed to the sc_display_link dialog
...
...
@@ -119,7 +119,7 @@ bool cb_sc_follow(GtkEntry* entry, girara_session_t* session);
* @param session The girara session
* @return true if no error occurred and the event has been handled
*/
bool
cb_sc_display_link
(
GtkEntry
*
entry
,
girara_session_t
*
session
);
bool
cb_sc_display_link
(
GtkEntry
*
entry
,
void
*
session
);
/**
* Emitted when file has been changed
...
...
@@ -136,7 +136,7 @@ void cb_file_monitor(ZathuraFileMonitor* monitor, girara_session_t* session);
* @param dialog The dialog information
* @return true if input has been handled
*/
bool
cb_password_dialog
(
GtkEntry
*
entry
,
zathura_password_dialog_info_t
*
dialog
);
bool
cb_password_dialog
(
GtkEntry
*
entry
,
void
*
dialog
);
/**
* Emitted when the view has been resized
...
...
zathura/shortcuts.c
View file @
be717529
...
...
@@ -135,7 +135,7 @@ sc_display_link(girara_session_t* session, girara_argument_t* UNUSED(argument),
if
(
show_links
)
{
zathura_document_set_adjust_mode
(
zathura
->
document
,
ZATHURA_ADJUST_INPUTBAR
);
girara_dialog
(
zathura
->
ui
.
session
,
"Display link:"
,
FALSE
,
NULL
,
(
girara_callback_inputbar_activate_t
)
cb_sc_display_link
,
cb_sc_display_link
,
zathura
->
ui
.
session
);
}
...
...
@@ -223,7 +223,7 @@ sc_follow(girara_session_t* session, girara_argument_t* UNUSED(argument),
/* ask for input */
if
(
show_links
==
true
)
{
zathura_document_set_adjust_mode
(
zathura
->
document
,
ZATHURA_ADJUST_INPUTBAR
);
girara_dialog
(
zathura
->
ui
.
session
,
"Follow link:"
,
FALSE
,
NULL
,
(
girara_callback_inputbar_activate_t
)
cb_sc_follow
,
zathura
->
ui
.
session
);
girara_dialog
(
zathura
->
ui
.
session
,
"Follow link:"
,
FALSE
,
NULL
,
cb_sc_follow
,
zathura
->
ui
.
session
);
}
return
false
;
...
...
zathura/zathura.c
View file @
be717529
...
...
@@ -751,7 +751,7 @@ 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
);
cb_password_dialog
,
password_dialog_info
);
return
FALSE
;
}
...
...
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