From 5dacede6929107fd9c6c82c320826518b87dddff Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sun, 12 Feb 2012 12:22:11 +0100 Subject: [PATCH] use getter functions to make it compatible with GTK+3 --- page_widget.c | 2 +- utils.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/page_widget.c b/page_widget.c index 5c0f368..af0f572 100644 --- a/page_widget.c +++ b/page_widget.c @@ -391,7 +391,7 @@ redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle) grect.y = rectangle->y1; grect.width = rectangle->x2 - rectangle->x1; grect.height = rectangle->y2 - rectangle->y1; - gdk_window_invalidate_rect(GTK_WIDGET(widget)->window, &grect, TRUE); + gdk_window_invalidate_rect(gtk_widget_get_parent_window(GTK_WIDGET(widget)), &grect, TRUE); } static void diff --git a/utils.c b/utils.c index eb96b40..afc88fa 100644 --- a/utils.c +++ b/utils.c @@ -263,7 +263,8 @@ recalc_rectangle(zathura_page_t* page, zathura_rectangle_t rectangle) void set_adjustment(GtkAdjustment* adjustment, gdouble value) { - gtk_adjustment_set_value(adjustment, MAX(adjustment->lower, MIN(adjustment->upper - adjustment->page_size, value))); + gtk_adjustment_set_value(adjustment, MAX(gtk_adjustment_get_lower(adjustment), + MIN(gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment), value))); } void