From 1028d90e6cbc777b583de55d252e3afb16b009d8 Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Wed, 14 Mar 2012 18:09:00 +0100 Subject: [PATCH] Re-render all pages when calling cb_color_change --- config.c | 6 ++++-- shortcuts.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config.c b/config.c index 13e421b..1062e88 100644 --- a/config.c +++ b/config.c @@ -6,6 +6,7 @@ #include "callbacks.h" #include "shortcuts.h" #include "zathura.h" +#include "render.h" #include #include @@ -16,7 +17,8 @@ #include static void -cb_color_change(girara_session_t* session, const char* name, girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data)) +cb_color_change(girara_session_t* session, const char* name, + girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data)) { g_return_if_fail(value != NULL); g_return_if_fail(session != NULL); @@ -35,7 +37,7 @@ cb_color_change(girara_session_t* session, const char* name, girara_setting_type gdk_color_parse(string_value, &(zathura->ui.colors.recolor_light_color)); } - /* TODO: cause a redraw here? */ + render_all(zathura); } void diff --git a/shortcuts.c b/shortcuts.c index 85a5eab..47721ac 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -339,8 +339,8 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument, g_return_val_if_fail(argument != NULL, false); g_return_val_if_fail(zathura->document != NULL, false); - unsigned int number_of_pages = zathura->document->number_of_pages; - unsigned int new_page = zathura->document->current_page_number; + int number_of_pages = zathura->document->number_of_pages; + int new_page = zathura->document->current_page_number; bool scroll_wrap = false; girara_setting_get(session, "scroll-wrap", &scroll_wrap);