summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garcia Campos <[email protected]>2013-06-26 18:26:51 +0200
committerraveit65 <[email protected]>2017-09-06 18:25:34 +0200
commit9d7a5b80e72bfca2dfb40f7c0bac56ad35fbe533 (patch)
treedce025c6b56422160f738d3601f1f835bc9fdfc6
parent0787e98dde0476c004758dad7a993bc8ff926cbe (diff)
downloadatril-9d7a5b80e72bfca2dfb40f7c0bac56ad35fbe533.tar.bz2
atril-9d7a5b80e72bfca2dfb40f7c0bac56ad35fbe533.tar.xz
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. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=5503827
-rw-r--r--libview/ev-view-private.h1
-rw-r--r--libview/ev-view.c8
2 files changed, 2 insertions, 7 deletions
diff --git a/libview/ev-view-private.h b/libview/ev-view-private.h
index 869958f9..dfe777ff 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 6a112253..0f102b42 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -4720,7 +4720,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;
@@ -5227,11 +5226,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,
@@ -6318,7 +6315,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;
@@ -7686,7 +7682,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);
}