From 1608249709eeadc041fabfc6bb2c4f10054e0c5b Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Thu, 4 Sep 2014 00:42:46 +0200 Subject: [PATCH] Update visible pages after opening the file --- callbacks.c | 2 +- callbacks.h | 3 +++ zathura.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/callbacks.c b/callbacks.c index e8c3713..f00667a 100644 --- a/callbacks.c +++ b/callbacks.c @@ -51,7 +51,7 @@ cb_buffer_changed(girara_session_t* session) } } -static void +void update_visible_pages(zathura_t* zathura) { const unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document); diff --git a/callbacks.h b/callbacks.h index 3a29140..04b1fa0 100644 --- a/callbacks.h +++ b/callbacks.h @@ -206,5 +206,8 @@ void cb_page_widget_scaled_button_release(ZathuraPage* page, void cb_page_widget_link(ZathuraPage* page, void* data); +void +update_visible_pages(zathura_t* zathura); + #endif // CALLBACKS_H diff --git a/zathura.c b/zathura.c index 3aeeed9..dae34c4 100644 --- a/zathura.c +++ b/zathura.c @@ -871,6 +871,8 @@ document_open(zathura_t* zathura, const char* path, const char* password, position_set(zathura, file_info.position_x, file_info.position_y); } + update_visible_pages(zathura); + return true; error_free: