[evince/wip/gpoo/gtk4-rebase-port: 86/96] ev-view: fix various warnings




commit 7464e8a39c6dc627d9ba1e11686e276617e28e8f
Author: Qiu Wenbo <qiuwenbo kylinos com cn>
Date:   Mon Oct 11 15:47:46 2021 +0800

    ev-view: fix various warnings
    
    Signed-off-by: Qiu Wenbo <qiuwenbo kylinos com cn>

 libview/ev-view.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 73323312f..466384a25 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -1115,16 +1115,15 @@ ev_view_scroll (EvView        *view,
        gtk_adjustment_set_value (adjustment, value);
 }
 
-static gboolean
+static void
 ev_view_scroll_internal (EvView        *view,
                         GtkScrollType  scroll,
                         GtkOrientation orientation)
 {
        if (view->caret_enabled)
-               return FALSE;
+               return;
 
        ev_view_scroll (view, scroll, orientation == GTK_ORIENTATION_HORIZONTAL);
-       return TRUE;
 }
 
 #define MARGIN 5
@@ -4427,7 +4426,7 @@ ev_view_size_allocate (GtkWidget      *widget,
        for (GtkWidget *child = gtk_widget_get_first_child (widget);
                child != NULL;
                child = gtk_widget_get_next_sibling (child)) {
-               EvViewChild *data = g_object_get_data (child, "ev-child");
+               EvViewChild *data = g_object_get_data (G_OBJECT (child), "ev-child");
                GdkRectangle view_area;
 
                if (!data || !gtk_widget_get_visible (child))
@@ -4453,7 +4452,6 @@ ev_view_scroll_event (GtkEventControllerScroll *self, gdouble dx, gdouble dy, Gt
        EvView *view = EV_VIEW (widget);
        GdkEvent *event;
        guint state;
-       gboolean fit_width, fit_height;
        GdkScrollDirection direction;
        double x, y;
 
@@ -5872,7 +5870,6 @@ ev_view_motion_notify_event (GtkEventControllerMotion     *self,
 {
        EvView    *view = EV_VIEW (user_data);
        GtkWidget *widget = GTK_WIDGET (view);
-       GdkSurface *surface = gtk_native_get_surface (gtk_widget_get_native (widget));
        GdkModifierType state = gtk_event_controller_get_current_event_state (GTK_EVENT_CONTROLLER (self));
 
        if (!view->document)
@@ -7265,7 +7262,6 @@ draw_one_page (EvView       *view,
                GdkTexture      *page_texture = NULL, *selection_texture = NULL;
                graphene_point_t point;
                graphene_rect_t area;
-               gint offset_x, offset_y;
                cairo_region_t *region = NULL;
                gboolean inverted = ev_document_model_get_inverted_colors (view->model);
 
@@ -8261,7 +8257,6 @@ on_adjustment_value_changed (GtkAdjustment *adjustment,
        GtkWidget *widget = GTK_WIDGET (view);
        int dx = 0, dy = 0;
        gint value;
-       GdkEvent *event;
 
        if (!gtk_widget_get_realized (widget))
                return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]