Re-render all pages when calling cb_color_change

This commit is contained in:
Moritz Lipp 2012-03-14 18:09:00 +01:00
parent 0474235483
commit 1028d90e6c
2 changed files with 6 additions and 4 deletions

View file

@ -6,6 +6,7 @@
#include "callbacks.h"
#include "shortcuts.h"
#include "zathura.h"
#include "render.h"
#include <girara/settings.h>
#include <girara/session.h>
@ -16,7 +17,8 @@
#include <glib/gi18n.h>
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

View file

@ -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);