[gnome-notes] controller: Remove unused code
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-notes] controller: Remove unused code
- Date: Tue, 1 Feb 2022 13:15:13 +0000 (UTC)
commit 149a5fc6073b56715356c8d49c064e559503e2cc
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Tue Jan 11 18:00:16 2022 +0530
controller: Remove unused code
We don't currently have a way to select the rows so remove those
code handling them, as we shall better move to GListModel which
has better support in GTK4 and we can re-introduce selection mode
after we port to GListModel
src/bjb-controller.c | 38 --------------------------------------
src/bjb-controller.h | 8 --------
2 files changed, 46 deletions(-)
---
diff --git a/src/bjb-controller.c b/src/bjb-controller.c
index dd06d22e..8ae073f7 100644
--- a/src/bjb-controller.c
+++ b/src/bjb-controller.c
@@ -55,8 +55,6 @@ struct _BjbController
gboolean remaining_items;
GMutex mutex;
- gboolean selection_mode;
-
gboolean connected;
gulong manager_change;
};
@@ -915,39 +913,3 @@ bjb_controller_set_group (BjbController *self,
bjb_controller_apply_needle (self);
}
}
-
-static void
-bjb_controller_set_selection (GtkListStore *store,
- GtkTreeIter *iter,
- gboolean selection)
-{
- gtk_list_store_set (store, iter,
- BJB_MODEL_COLUMN_SELECTED, selection,
- -1);
-}
-
-void
-bjb_controller_select_item (BjbController *self,
- const char *iter_string)
-{
- GtkTreeIter iter;
- if (!gtk_tree_model_get_iter_from_string (self->model, &iter, iter_string))
- return;
- bjb_controller_set_selection (GTK_LIST_STORE (self->model), &iter, TRUE);
-}
-
-void
-bjb_controller_unselect_item (BjbController *self,
- const char *iter_string)
-{
- GtkTreeIter iter;
- if (!gtk_tree_model_get_iter_from_string (self->model, &iter, iter_string))
- return;
- bjb_controller_set_selection (GTK_LIST_STORE (self->model), &iter, FALSE);
-}
-
-gboolean
-bjb_controller_get_selection_mode (BjbController *self)
-{
- return self->selection_mode;
-}
diff --git a/src/bjb-controller.h b/src/bjb-controller.h
index 009de875..db7cd263 100644
--- a/src/bjb-controller.h
+++ b/src/bjb-controller.h
@@ -67,12 +67,4 @@ BijiItemsGroup bjb_controller_get_group (BjbController *controller);
void bjb_controller_set_group (BjbController *self,
BijiItemsGroup group);
-gboolean bjb_controller_get_selection_mode (BjbController *self);
-
-void bjb_controller_select_item (BjbController *self,
- const char *iter_string);
-
-void bjb_controller_unselect_item (BjbController *self,
- const char *iter_string);
-
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]