[evince] libview: Remove unused in_selection member from SelectionInfo struct



commit 5503827d54ed47b5d4f26e8dadae0c96c3ebb921
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Wed Jun 26 18:26:51 2013 +0200

    libview: Remove unused in_selection member from SelectionInfo struct
    
    This is currently unused and redundant, to know whether there are
    selections we use selection_info.selections.

 libview/ev-view-private.h |    1 -
 libview/ev-view.c         |    8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/libview/ev-view-private.h b/libview/ev-view-private.h
index ae1dc01..fb492e8 100644
--- a/libview/ev-view-private.h
+++ b/libview/ev-view-private.h
@@ -61,7 +61,6 @@ typedef struct {
 typedef struct {
        gboolean in_drag;
        GdkPoint start;
-       gboolean in_selection;
        GList *selections;
        EvSelectionStyle style;
 } SelectionInfo;
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 88a419e..270a4e3 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -4491,7 +4491,6 @@ ev_view_motion_notify_event (GtkWidget      *widget,
                else 
                    selection_scroll_timeout_cb (view);
 
-               view->selection_info.in_selection = TRUE;
                view->motion.x = x + view->scroll_x;
                view->motion.y = y + view->scroll_y;
 
@@ -4995,11 +4994,9 @@ extend_selection_from_cursor (EvView *view,
                              GdkPoint *start_point,
                              GdkPoint *end_point)
 {
-       if (!(view->selection_info.in_selection && view->selection_info.selections)) {
-               clear_selection (view);
+       if (!view->selection_info.selections) {
                view->selection_info.start.x = start_point->x;
                view->selection_info.start.y = start_point->y;
-               view->selection_info.in_selection = TRUE;
        }
 
        compute_selections (view,
@@ -5982,7 +5979,6 @@ ev_view_init (EvView *view)
        view->drag_info.in_drag = FALSE;
        view->scroll_info.autoscrolling = FALSE;
        view->selection_info.selections = NULL;
-       view->selection_info.in_selection = FALSE;
        view->selection_info.in_drag = FALSE;
        view->selection_mode = EV_VIEW_SELECTION_TEXT;
        view->continuous = TRUE;
@@ -7384,7 +7380,7 @@ clear_selection (EvView *view)
 
                g_signal_emit (view, signals[SIGNAL_SELECTION_CHANGED], 0, NULL);
        }
-       view->selection_info.in_selection = FALSE;
+
        if (view->pixbuf_cache)
                ev_pixbuf_cache_set_selection_list (view->pixbuf_cache, NULL);
 }


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