[gnome-todo/wip/gbsneto/plugins: 10/18] list-selector-grid: only select item when in selection mode
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo/wip/gbsneto/plugins: 10/18] list-selector-grid: only select item when in selection mode
- Date: Mon, 18 Jan 2016 19:05:33 +0000 (UTC)
commit f8c91d17128f07cd7e256b2f52896e3ea5adeb16
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jan 16 13:08:27 2016 -0200
list-selector-grid: only select item when in selection mode
src/views/gtd-list-selector-grid.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/views/gtd-list-selector-grid.c b/src/views/gtd-list-selector-grid.c
index 0a0f816..740e37a 100644
--- a/src/views/gtd-list-selector-grid.c
+++ b/src/views/gtd-list-selector-grid.c
@@ -313,14 +313,19 @@ static void
gtd_list_selector_grid_child_activated (GtkFlowBox *flowbox,
GtkFlowBoxChild *child)
{
+ GtdListSelectorGrid *self;
GtdTaskListItem *item;
+ self = GTD_LIST_SELECTOR_GRID (flowbox);
+
if (!GTD_IS_TASK_LIST_ITEM (child))
return;
item = GTD_TASK_LIST_ITEM (child);
- gtd_task_list_item_set_selected (item, !gtd_task_list_item_get_selected (item));
+ /* We only mark the item as selected when we're in selection mode */
+ if (self->mode == GTD_WINDOW_MODE_SELECTION)
+ gtd_task_list_item_set_selected (item, !gtd_task_list_item_get_selected (item));
g_signal_emit_by_name (flowbox, "list-selected", gtd_task_list_item_get_list (item));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]