[gtk/wip/otte/for-master] multiselection: Remove unused code
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master] multiselection: Remove unused code
- Date: Sat, 6 Jun 2020 03:21:54 +0000 (UTC)
commit b1c00ecee67b3a261744dc4171f26d33bb2c502b
Author: Benjamin Otte <otte redhat com>
Date: Sat Jun 6 05:02:37 2020 +0200
multiselection: Remove unused code
This is leftover code from an earlier SelectionModel API.
gtk/gtkmultiselection.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/gtk/gtkmultiselection.c b/gtk/gtkmultiselection.c
index 31572072a7..26b4b1d65f 100644
--- a/gtk/gtkmultiselection.c
+++ b/gtk/gtkmultiselection.c
@@ -43,7 +43,6 @@ struct _GtkMultiSelection
GListModel *model;
GtkSet *selected;
- guint last_selected;
};
struct _GtkMultiSelectionClass
@@ -147,14 +146,7 @@ gtk_multi_selection_select_item (GtkSelectionModel *model,
guint position,
gboolean exclusive)
{
- GtkMultiSelection *self = GTK_MULTI_SELECTION (model);
- guint pos, n_items;
-
- pos = position;
- n_items = 1;
-
- self->last_selected = position;
- return gtk_multi_selection_select_range (model, pos, n_items, exclusive);
+ return gtk_multi_selection_select_range (model, position, 1, exclusive);
}
static gboolean
@@ -173,8 +165,6 @@ gtk_multi_selection_select_all (GtkSelectionModel *model)
static gboolean
gtk_multi_selection_unselect_all (GtkSelectionModel *model)
{
- GtkMultiSelection *self = GTK_MULTI_SELECTION (model);
- self->last_selected = GTK_INVALID_LIST_POSITION;
return gtk_multi_selection_unselect_range (model, 0, g_list_model_get_n_items (G_LIST_MODEL (model)));
}
@@ -345,7 +335,6 @@ gtk_multi_selection_dispose (GObject *object)
gtk_multi_selection_clear_model (self);
g_clear_pointer (&self->selected, gtk_set_free);
- self->last_selected = GTK_INVALID_LIST_POSITION;
G_OBJECT_CLASS (gtk_multi_selection_parent_class)->dispose (object);
}
@@ -378,7 +367,6 @@ static void
gtk_multi_selection_init (GtkMultiSelection *self)
{
self->selected = gtk_set_new ();
- self->last_selected = GTK_INVALID_LIST_POSITION;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]