[libchamplain] Simply prepend the markers when selected
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [libchamplain] Simply prepend the markers when selected
- Date: Tue, 28 Jul 2009 21:41:14 +0000 (UTC)
commit 6f7f60f15fbe37c946bbb9a219ac7906f83984f6
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date: Tue Jul 28 22:57:57 2009 +0200
Simply prepend the markers when selected
champlain/champlain-selection-layer.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/champlain/champlain-selection-layer.c b/champlain/champlain-selection-layer.c
index c444e39..2f6ecef 100644
--- a/champlain/champlain-selection-layer.c
+++ b/champlain/champlain-selection-layer.c
@@ -123,17 +123,12 @@ champlain_selection_layer_class_init (ChamplainSelectionLayerClass *klass)
static void
marker_select (ChamplainSelectionLayer *layer,
- ChamplainBaseMarker *marker,
- gboolean prepend)
+ ChamplainBaseMarker *marker)
{
-
/* Add selection */
g_object_ref (marker);
g_object_set (marker, "highlighted", TRUE, NULL);
- if (prepend)
- layer->priv->selection = g_list_prepend (layer->priv->selection, marker);
- else
- layer->priv->selection = g_list_append (layer->priv->selection, marker);
+ layer->priv->selection = g_list_prepend (layer->priv->selection, marker);
}
static void
@@ -149,10 +144,10 @@ api_select (ChamplainSelectionLayer *layer,
{
/* Clear previous selection */
champlain_selection_layer_unselect_all (layer);
- marker_select (layer, marker, TRUE);
+ marker_select (layer, marker);
}
else if (layer->priv->mode == CHAMPLAIN_SELECTION_MULTIPLE)
- marker_select (layer, marker, FALSE);
+ marker_select (layer, marker);
}
static void
@@ -166,7 +161,7 @@ mouse_select (ChamplainSelectionLayer *layer,
{
/* Clear previous selection */
champlain_selection_layer_unselect_all (layer);
- marker_select (layer, marker, TRUE);
+ marker_select (layer, marker);
}
else if (layer->priv->mode == CHAMPLAIN_SELECTION_MULTIPLE)
{
@@ -179,7 +174,7 @@ mouse_select (ChamplainSelectionLayer *layer,
return;
}
- marker_select (layer, marker, FALSE);
+ marker_select (layer, marker);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]