Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zathura
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
59
Issues
59
List
Boards
Labels
Milestones
Custom Issue Tracker
Custom Issue Tracker
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwmt
zathura
Commits
6ccfd7f9
Commit
6ccfd7f9
authored
Apr 28, 2019
by
Sebastian Ramacher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Constify value
parent
641799c4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
21 deletions
+21
-21
zathura/callbacks.c
zathura/callbacks.c
+8
-8
zathura/callbacks.h
zathura/callbacks.h
+4
-4
zathura/config.c
zathura/config.c
+8
-8
zathura/main.c
zathura/main.c
+1
-1
No files found.
zathura/callbacks.c
View file @
6ccfd7f9
...
...
@@ -294,7 +294,7 @@ cb_scale_factor(GObject* object, GParamSpec* UNUSED(pspec), gpointer data)
}
void
cb_page_layout_value_changed
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
UNUSED
(
type
),
void
*
value
,
void
*
UNUSED
(
data
))
cb_page_layout_value_changed
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
UNUSED
(
type
),
const
void
*
value
,
void
*
UNUSED
(
data
))
{
g_return_if_fail
(
value
!=
NULL
);
g_return_if_fail
(
session
!=
NULL
);
...
...
@@ -303,7 +303,7 @@ cb_page_layout_value_changed(girara_session_t* session, const char* name, girara
/* pages-per-row must not be 0 */
if
(
g_strcmp0
(
name
,
"pages-per-row"
)
==
0
)
{
unsigned
int
pages_per_row
=
*
((
unsigned
int
*
)
value
);
unsigned
int
pages_per_row
=
*
((
const
unsigned
int
*
)
value
);
if
(
pages_per_row
==
0
)
{
pages_per_row
=
1
;
girara_setting_set
(
session
,
name
,
&
pages_per_row
);
...
...
@@ -559,7 +559,7 @@ cb_view_resized(GtkWidget* UNUSED(widget), GtkAllocation* UNUSED(allocation), za
void
cb_setting_recolor_change
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
UNUSED
(
type
),
void
*
value
,
void
*
UNUSED
(
data
))
girara_setting_type_t
UNUSED
(
type
),
const
void
*
value
,
void
*
UNUSED
(
data
))
{
g_return_if_fail
(
value
!=
NULL
);
g_return_if_fail
(
session
!=
NULL
);
...
...
@@ -567,7 +567,7 @@ cb_setting_recolor_change(girara_session_t* session, const char* name,
g_return_if_fail
(
name
!=
NULL
);
zathura_t
*
zathura
=
session
->
global
.
data
;
const
bool
bool_value
=
*
((
bool
*
)
value
);
const
bool
bool_value
=
*
((
const
bool
*
)
value
);
if
(
zathura
->
sync
.
render_thread
!=
NULL
&&
zathura_renderer_recolor_enabled
(
zathura
->
sync
.
render_thread
)
!=
bool_value
)
{
zathura_renderer_enable_recolor
(
zathura
->
sync
.
render_thread
,
bool_value
);
...
...
@@ -577,7 +577,7 @@ cb_setting_recolor_change(girara_session_t* session, const char* name,
void
cb_setting_recolor_keep_hue_change
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
UNUSED
(
type
),
void
*
value
,
void
*
UNUSED
(
data
))
girara_setting_type_t
UNUSED
(
type
),
const
void
*
value
,
void
*
UNUSED
(
data
))
{
g_return_if_fail
(
value
!=
NULL
);
g_return_if_fail
(
session
!=
NULL
);
...
...
@@ -585,7 +585,7 @@ cb_setting_recolor_keep_hue_change(girara_session_t* session, const char* name,
g_return_if_fail
(
name
!=
NULL
);
zathura_t
*
zathura
=
session
->
global
.
data
;
const
bool
bool_value
=
*
((
bool
*
)
value
);
const
bool
bool_value
=
*
((
const
bool
*
)
value
);
if
(
zathura
->
sync
.
render_thread
!=
NULL
&&
zathura_renderer_recolor_hue_enabled
(
zathura
->
sync
.
render_thread
)
!=
bool_value
)
{
zathura_renderer_enable_recolor_hue
(
zathura
->
sync
.
render_thread
,
bool_value
);
...
...
@@ -595,7 +595,7 @@ cb_setting_recolor_keep_hue_change(girara_session_t* session, const char* name,
void
cb_setting_recolor_keep_reverse_video_change
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
UNUSED
(
type
),
void
*
value
,
void
*
UNUSED
(
data
))
girara_setting_type_t
UNUSED
(
type
),
const
void
*
value
,
void
*
UNUSED
(
data
))
{
g_return_if_fail
(
value
!=
NULL
);
g_return_if_fail
(
session
!=
NULL
);
...
...
@@ -603,7 +603,7 @@ cb_setting_recolor_keep_reverse_video_change(girara_session_t* session, const ch
g_return_if_fail
(
name
!=
NULL
);
zathura_t
*
zathura
=
session
->
global
.
data
;
const
bool
bool_value
=
*
((
bool
*
)
value
);
const
bool
bool_value
=
*
((
const
bool
*
)
value
);
if
(
zathura
->
sync
.
render_thread
!=
NULL
&&
zathura_renderer_recolor_reverse_video_enabled
(
zathura
->
sync
.
render_thread
)
!=
bool_value
)
{
zathura_renderer_enable_recolor_reverse_video
(
zathura
->
sync
.
render_thread
,
bool_value
);
...
...
zathura/callbacks.h
View file @
6ccfd7f9
...
...
@@ -143,7 +143,7 @@ void cb_scale_factor(GObject* object, GParamSpec* pspec, gpointer data);
* @param data Custom data
*/
void
cb_page_layout_value_changed
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
type
,
void
*
value
,
void
*
data
);
girara_setting_type_t
type
,
const
void
*
value
,
void
*
data
);
/**
* Called when an index element is activated (e.g.: double click)
...
...
@@ -211,7 +211,7 @@ gboolean cb_view_resized(GtkWidget* widget, GtkAllocation* allocation, zathura_t
* @param data Custom data
*/
void
cb_setting_recolor_change
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
type
,
void
*
value
,
void
*
data
);
girara_setting_type_t
type
,
const
void
*
value
,
void
*
data
);
/**
* Emitted when the 'recolor-keephue' setting is changed
...
...
@@ -223,7 +223,7 @@ void cb_setting_recolor_change(girara_session_t* session, const char* name,
* @param data Custom data
*/
void
cb_setting_recolor_keep_hue_change
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
type
,
void
*
value
,
void
*
data
);
girara_setting_type_t
type
,
const
void
*
value
,
void
*
data
);
/**
* Emitted when the 'recolor-reverse-video' setting is changed
...
...
@@ -235,7 +235,7 @@ void cb_setting_recolor_keep_hue_change(girara_session_t* session, const char* n
* @param data Custom data
*/
void
cb_setting_recolor_keep_reverse_video_change
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
type
,
void
*
value
,
void
*
data
);
const
char
*
name
,
girara_setting_type_t
type
,
const
void
*
value
,
void
*
data
);
/**
* Unknown command handler which is used to handle the strict numeric goto
...
...
zathura/config.c
View file @
6ccfd7f9
...
...
@@ -23,7 +23,7 @@
static
void
cb_jumplist_change
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
UNUSED
(
type
),
void
*
value
,
void
*
UNUSED
(
data
))
girara_setting_type_t
UNUSED
(
type
),
const
void
*
value
,
void
*
UNUSED
(
data
))
{
g_return_if_fail
(
value
!=
NULL
);
g_return_if_fail
(
session
!=
NULL
);
...
...
@@ -46,7 +46,7 @@ cb_jumplist_change(girara_session_t* session, const char* name,
static
void
cb_color_change
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
UNUSED
(
type
),
void
*
value
,
void
*
UNUSED
(
data
))
girara_setting_type_t
UNUSED
(
type
),
const
void
*
value
,
void
*
UNUSED
(
data
))
{
g_return_if_fail
(
value
!=
NULL
);
g_return_if_fail
(
session
!=
NULL
);
...
...
@@ -78,34 +78,34 @@ cb_color_change(girara_session_t* session, const char* name,
static
void
cb_nohlsearch_changed
(
girara_session_t
*
session
,
const
char
*
UNUSED
(
name
),
girara_setting_type_t
UNUSED
(
type
),
void
*
value
,
void
*
UNUSED
(
data
))
girara_setting_type_t
UNUSED
(
type
),
const
void
*
value
,
void
*
UNUSED
(
data
))
{
g_return_if_fail
(
value
!=
NULL
);
g_return_if_fail
(
session
!=
NULL
);
g_return_if_fail
(
session
->
global
.
data
!=
NULL
);
zathura_t
*
zathura
=
session
->
global
.
data
;
bool
*
bvalue
=
value
;
const
bool
*
bvalue
=
value
;
document_draw_search_results
(
zathura
,
!*
bvalue
);
render_all
(
zathura
);
}
static
void
cb_incsearch_changed
(
girara_session_t
*
session
,
const
char
*
UNUSED
(
name
),
girara_setting_type_t
UNUSED
(
type
),
void
*
value
,
void
*
UNUSED
(
data
))
girara_setting_type_t
UNUSED
(
type
),
const
void
*
value
,
void
*
UNUSED
(
data
))
{
g_return_if_fail
(
value
!=
NULL
);
g_return_if_fail
(
session
!=
NULL
);
g_return_if_fail
(
session
->
global
.
data
!=
NULL
);
bool
inc_search
=
*
(
bool
*
)
value
;
bool
inc_search
=
*
(
const
bool
*
)
value
;
girara_special_command_add
(
session
,
'/'
,
cmd_search
,
inc_search
,
FORWARD
,
NULL
);
girara_special_command_add
(
session
,
'?'
,
cmd_search
,
inc_search
,
BACKWARD
,
NULL
);
}
static
void
cb_sandbox_changed
(
girara_session_t
*
session
,
const
char
*
UNUSED
(
name
),
girara_setting_type_t
UNUSED
(
type
),
void
*
value
,
void
*
UNUSED
(
data
))
girara_setting_type_t
UNUSED
(
type
),
const
void
*
value
,
void
*
UNUSED
(
data
))
{
g_return_if_fail
(
value
!=
NULL
);
g_return_if_fail
(
session
!=
NULL
);
...
...
@@ -126,7 +126,7 @@ cb_sandbox_changed(girara_session_t* session, const char* UNUSED(name),
static
void
cb_window_statbusbar_changed
(
girara_session_t
*
session
,
const
char
*
name
,
girara_setting_type_t
UNUSED
(
type
),
void
*
value
,
void
*
UNUSED
(
data
))
girara_setting_type_t
UNUSED
(
type
),
const
void
*
value
,
void
*
UNUSED
(
data
))
{
g_return_if_fail
(
value
!=
NULL
);
g_return_if_fail
(
session
!=
NULL
);
...
...
zathura/main.c
View file @
6ccfd7f9
...
...
@@ -88,7 +88,7 @@ run_synctex_forward(const char* synctex_fwd, const char* filename,
static
zathura_t
*
init_zathura
(
const
char
*
config_dir
,
const
char
*
data_dir
,
const
char
*
cache_dir
,
const
char
*
plugin_path
,
char
**
argv
,
char
*
synctex_editor
,
Window
embed
)
c
onst
c
har
*
synctex_editor
,
Window
embed
)
{
/* create zathura session */
zathura_t
*
zathura
=
zathura_create
();
...
...
Write
Preview
Markdown
is supported
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