summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/selection.c19
-rw-r--r--desktop/selection.h10
2 files changed, 5 insertions, 24 deletions
diff --git a/desktop/selection.c b/desktop/selection.c
index 4d3d335ef..417a504b3 100644
--- a/desktop/selection.c
+++ b/desktop/selection.c
@@ -255,7 +255,11 @@ struct selection *selection_create(struct content *c)
struct selection *sel;
sel = calloc(1, sizeof(struct selection));
if (sel) {
- selection_prepare(sel, c);
+ sel->c = c;
+ sel->root = NULL;
+ sel->drag_state = DRAG_NONE;
+ sel->max_idx = 0;
+ selection_clear(sel, false);
}
return sel;
@@ -263,19 +267,6 @@ struct selection *selection_create(struct content *c)
/* exported interface documented in desktop/selection.h */
-void selection_prepare(struct selection *s, struct content *c)
-{
- if (s) {
- s->c = c;
- s->root = NULL;
- s->drag_state = DRAG_NONE;
- s->max_idx = 0;
- selection_clear(s, false);
- }
-}
-
-
-/* exported interface documented in desktop/selection.h */
void selection_destroy(struct selection *s)
{
if (s == NULL) {
diff --git a/desktop/selection.h b/desktop/selection.h
index 1b8d91c08..8cd523fd8 100644
--- a/desktop/selection.h
+++ b/desktop/selection.h
@@ -57,16 +57,6 @@ void selection_drag_end(struct selection *s);
struct selection *selection_create(struct content *c);
/**
- * Prepare a newly created selection object for use.
- *
- * Used from text and html content handlers, riscos frontend
- *
- * \param s selection object
- * \param c content
- */
-void selection_prepare(struct selection *s, struct content *c);
-
-/**
* Destroys a selection object clearing it if nesessary
*
* Used from content textsearch