mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-14 06:33:47 +01:00
Refactor
This commit is contained in:
parent
fb2b5da84b
commit
55f7088309
@ -21,22 +21,15 @@
|
|||||||
#define GLOBAL_RC "/etc/zathurarc"
|
#define GLOBAL_RC "/etc/zathurarc"
|
||||||
#define ZATHURA_RC "zathurarc"
|
#define ZATHURA_RC "zathurarc"
|
||||||
|
|
||||||
static void
|
static void cb_jumplist_change(girara_session_t* session, const char* UNUSED(name), girara_setting_type_t UNUSED(type),
|
||||||
cb_jumplist_change(girara_session_t* session, const char* UNUSED(name),
|
const 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(value != NULL);
|
||||||
g_return_if_fail(session != NULL);
|
g_return_if_fail(session != NULL);
|
||||||
g_return_if_fail(session->global.data != NULL);
|
g_return_if_fail(session->global.data != NULL);
|
||||||
zathura_t* zathura = session->global.data;
|
zathura_t* zathura = session->global.data;
|
||||||
|
|
||||||
const int* ivalue = value;
|
const int* ivalue = value;
|
||||||
|
zathura->jumplist.max_size = MAX(0, *ivalue);
|
||||||
if (*ivalue < 0) {
|
|
||||||
zathura->jumplist.max_size = 0;
|
|
||||||
} else {
|
|
||||||
zathura->jumplist.max_size = *ivalue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zathura->jumplist.list != NULL && zathura->jumplist.size != 0) {
|
if (zathura->jumplist.list != NULL && zathura->jumplist.size != 0) {
|
||||||
zathura_jumplist_trim(zathura);
|
zathura_jumplist_trim(zathura);
|
||||||
|
Loading…
Reference in New Issue
Block a user