[libchamplain] Rename select to highlight to make wording consistent
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Rename select to highlight to make wording consistent
- Date: Wed, 9 Feb 2011 08:40:25 +0000 (UTC)
commit 1816b1da138721a90adf2f9f11cd6de592fd1ef2
Author: JiÅ?Ã Techet <techet gmail com>
Date: Sun Feb 6 16:55:16 2011 +0100
Rename select to highlight to make wording consistent
champlain/champlain-label.c | 36 +++++++++++++-------------
champlain/champlain-label.h | 8 +++---
champlain/champlain-marker-layer.c | 38 +++++++++++++-------------
champlain/champlain-marker.c | 50 ++++++++++++++++++------------------
champlain/champlain-marker.h | 4 +-
champlain/champlain-point.c | 20 +++++++-------
champlain/champlain-point.h | 4 +-
7 files changed, 80 insertions(+), 80 deletions(-)
---
diff --git a/champlain/champlain-label.c b/champlain/champlain-label.c
index fef9f8e..d432a03 100644
--- a/champlain/champlain-label.c
+++ b/champlain/champlain-label.c
@@ -132,16 +132,16 @@ static void map (ClutterActor *self);
static void unmap (ClutterActor *self);
/**
- * champlain_label_set_highlight_color:
+ * champlain_label_set_selection_color:
* @color: a #ClutterColor
*
- * Changes the highlight color, this is to ensure a better integration with
+ * Changes the selection color, this is to ensure a better integration with
* the desktop, this is automatically done by GtkChamplainEmbed.
*
* Since: 0.4
*/
void
-champlain_label_set_highlight_color (ClutterColor *color)
+champlain_label_set_selection_color (ClutterColor *color)
{
SELECTED_COLOR.red = color->red;
SELECTED_COLOR.green = color->green;
@@ -151,32 +151,32 @@ champlain_label_set_highlight_color (ClutterColor *color)
/**
- * champlain_label_get_highlight_color:
+ * champlain_label_get_selection_color:
*
- * Gets the highlight color.
+ * Gets the selection color.
*
- * Returns: the highlight color. Should not be freed.
+ * Returns: the selection color. Should not be freed.
*
* Since: 0.4.1
*/
const ClutterColor *
-champlain_label_get_highlight_color ()
+champlain_label_get_selection_color ()
{
return &SELECTED_COLOR;
}
/**
- * champlain_label_set_highlight_text_color:
+ * champlain_label_set_selection_text_color:
* @color: a #ClutterColor
*
- * Changes the highlight text color, this is to ensure a better integration with
+ * Changes the selection text color, this is to ensure a better integration with
* the desktop, this is automatically done by GtkChamplainEmbed.
*
* Since: 0.4
*/
void
-champlain_label_set_highlight_text_color (ClutterColor *color)
+champlain_label_set_selection_text_color (ClutterColor *color)
{
SELECTED_TEXT_COLOR.red = color->red;
SELECTED_TEXT_COLOR.green = color->green;
@@ -186,16 +186,16 @@ champlain_label_set_highlight_text_color (ClutterColor *color)
/**
- * champlain_label_get_highlight_text_color:
+ * champlain_label_get_selection_text_color:
*
- * Gets the highlight text color.
+ * Gets the selection text color.
*
- * Returns: the highlight text color. Should not be freed.
+ * Returns: the selection text color. Should not be freed.
*
* Since: 0.4.1
*/
const ClutterColor *
-champlain_label_get_highlight_text_color ()
+champlain_label_get_selection_text_color ()
{
return &SELECTED_TEXT_COLOR;
}
@@ -677,7 +677,7 @@ draw_background (ChamplainLabel *label,
cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (bg));
/* If selected, add the selection color to the marker's color */
- if (champlain_marker_get_highlighted (marker))
+ if (champlain_marker_get_selected (marker))
color = &SELECTED_COLOR;
else
color = priv->color;
@@ -769,7 +769,7 @@ draw_label (ChamplainLabel *label)
total_height = height;
clutter_text_set_color (CLUTTER_TEXT (priv->text_actor),
- (champlain_marker_get_highlighted (marker) ? &SELECTED_TEXT_COLOR : priv->text_color));
+ (champlain_marker_get_selected (marker) ? &SELECTED_TEXT_COLOR : priv->text_color));
if (clutter_actor_get_parent (priv->text_actor) == NULL)
clutter_container_add_actor (CLUTTER_CONTAINER (priv->content_group), priv->text_actor);
}
@@ -866,7 +866,7 @@ champlain_label_queue_redraw (ChamplainLabel *label)
static void
-notify_highlighted (GObject *gobject,
+notify_selected (GObject *gobject,
G_GNUC_UNUSED GParamSpec *pspec,
G_GNUC_UNUSED gpointer user_data)
{
@@ -901,7 +901,7 @@ champlain_label_init (ChamplainLabel *label)
priv->content_group = CLUTTER_GROUP (clutter_group_new ());
clutter_actor_set_parent (CLUTTER_ACTOR (priv->content_group), CLUTTER_ACTOR (label));
- g_signal_connect (label, "notify::highlighted", G_CALLBACK (notify_highlighted), NULL);
+ g_signal_connect (label, "notify::selected", G_CALLBACK (notify_selected), NULL);
}
diff --git a/champlain/champlain-label.h b/champlain/champlain-label.h
index 0dd1ec4..c01e1d1 100644
--- a/champlain/champlain-label.h
+++ b/champlain/champlain-label.h
@@ -123,11 +123,11 @@ PangoEllipsizeMode champlain_label_get_ellipsize (ChamplainLabel *label);
gboolean champlain_label_get_single_line_mode (ChamplainLabel *label);
gboolean champlain_label_get_draw_background (ChamplainLabel *label);
-void champlain_label_set_highlight_color (ClutterColor *color);
-const ClutterColor *champlain_label_get_highlight_color (void);
+void champlain_label_set_selection_color (ClutterColor *color);
+const ClutterColor *champlain_label_get_selection_color (void);
-void champlain_label_set_highlight_text_color (ClutterColor *color);
-const ClutterColor *champlain_label_get_highlight_text_color (void);
+void champlain_label_set_selection_text_color (ClutterColor *color);
+const ClutterColor *champlain_label_get_selection_text_color (void);
void champlain_label_queue_redraw (ChamplainLabel *label);
diff --git a/champlain/champlain-marker-layer.c b/champlain/champlain-marker-layer.c
index 74aca1b..a5ff669 100644
--- a/champlain/champlain-marker-layer.c
+++ b/champlain/champlain-marker-layer.c
@@ -103,7 +103,7 @@ static void map (ClutterActor *self);
static void unmap (ClutterActor *self);
-static void marker_highlighted_cb (ChamplainMarker *marker,
+static void marker_selected_cb (ChamplainMarker *marker,
G_GNUC_UNUSED GParamSpec *arg1,
ChamplainMarkerLayer *layer);
@@ -540,9 +540,9 @@ unmap (ClutterActor *self)
static void
-set_highlighted_all_but_one (ChamplainMarkerLayer *layer,
- ChamplainMarker *not_highlighted,
- gboolean highlight)
+set_selected_all_but_one (ChamplainMarkerLayer *layer,
+ ChamplainMarker *not_selected,
+ gboolean select)
{
ChamplainMarkerLayerPrivate *priv = GET_PRIVATE (layer);
GSList *elem;
@@ -551,17 +551,17 @@ set_highlighted_all_but_one (ChamplainMarkerLayer *layer,
{
ChamplainMarker *marker = CHAMPLAIN_MARKER (elem->data);
- if (marker != not_highlighted)
+ if (marker != not_selected)
{
g_signal_handlers_block_by_func (marker,
- G_CALLBACK (marker_highlighted_cb),
+ G_CALLBACK (marker_selected_cb),
layer);
- champlain_marker_set_highlighted (marker, highlight);
+ champlain_marker_set_selected (marker, select);
champlain_marker_set_selectable (marker, layer->priv->mode != CHAMPLAIN_SELECTION_NONE);
g_signal_handlers_unblock_by_func (marker,
- G_CALLBACK (marker_highlighted_cb),
+ G_CALLBACK (marker_selected_cb),
layer);
}
}
@@ -569,13 +569,13 @@ set_highlighted_all_but_one (ChamplainMarkerLayer *layer,
static void
-marker_highlighted_cb (ChamplainMarker *marker,
+marker_selected_cb (ChamplainMarker *marker,
G_GNUC_UNUSED GParamSpec *arg1,
ChamplainMarkerLayer *layer)
{
if (layer->priv->mode == CHAMPLAIN_SELECTION_SINGLE)
{
- set_highlighted_all_but_one (layer, marker, FALSE);
+ set_selected_all_but_one (layer, marker, FALSE);
}
}
@@ -653,8 +653,8 @@ champlain_marker_layer_add_marker (ChamplainMarkerLayer *layer,
champlain_marker_set_selectable (marker, layer->priv->mode != CHAMPLAIN_SELECTION_NONE);
- g_signal_connect (G_OBJECT (marker), "notify::highlighted",
- G_CALLBACK (marker_highlighted_cb), layer);
+ g_signal_connect (G_OBJECT (marker), "notify::selected",
+ G_CALLBACK (marker_selected_cb), layer);
g_signal_connect (G_OBJECT (marker), "notify::latitude",
G_CALLBACK (marker_position_notify), layer);
@@ -688,7 +688,7 @@ champlain_marker_layer_remove_marker (ChamplainMarkerLayer *layer,
g_return_if_fail (CHAMPLAIN_IS_MARKER (marker));
g_signal_handlers_disconnect_by_func (G_OBJECT (marker),
- G_CALLBACK (marker_highlighted_cb), layer);
+ G_CALLBACK (marker_selected_cb), layer);
g_signal_handlers_disconnect_by_func (G_OBJECT (marker),
G_CALLBACK (marker_position_notify), layer);
@@ -851,7 +851,7 @@ champlain_marker_layer_unselect_all_markers (ChamplainMarkerLayer *layer)
{
g_return_if_fail (CHAMPLAIN_IS_MARKER_LAYER (layer));
- set_highlighted_all_but_one (layer, NULL, FALSE);
+ set_selected_all_but_one (layer, NULL, FALSE);
}
@@ -869,7 +869,7 @@ champlain_marker_layer_select_all_markers (ChamplainMarkerLayer *layer)
{
g_return_if_fail (CHAMPLAIN_IS_MARKER_LAYER (layer));
- set_highlighted_all_but_one (layer, NULL, TRUE);
+ set_selected_all_but_one (layer, NULL, TRUE);
}
@@ -891,16 +891,16 @@ champlain_marker_layer_set_selection_mode (ChamplainMarkerLayer *layer,
{
g_return_if_fail (CHAMPLAIN_IS_MARKER_LAYER (layer));
- gboolean highlight;
+ gboolean select;
if (layer->priv->mode == mode)
return;
layer->priv->mode = mode;
- highlight = mode != CHAMPLAIN_SELECTION_NONE &&
- mode != CHAMPLAIN_SELECTION_SINGLE;
+ select = mode != CHAMPLAIN_SELECTION_NONE &&
+ mode != CHAMPLAIN_SELECTION_SINGLE;
- set_highlighted_all_but_one (layer, NULL, highlight);
+ set_selected_all_but_one (layer, NULL, select);
g_object_notify (G_OBJECT (layer), "selection-mode");
}
diff --git a/champlain/champlain-marker.c b/champlain/champlain-marker.c
index 766a6d8..2860f0a 100644
--- a/champlain/champlain-marker.c
+++ b/champlain/champlain-marker.c
@@ -64,7 +64,7 @@ enum
PROP_0,
PROP_LONGITUDE,
PROP_LATITUDE,
- PROP_HIGHLIGHTED,
+ PROP_SELECTED,
PROP_SELECTABLE,
PROP_MOVABLE,
};
@@ -80,7 +80,7 @@ struct _ChamplainMarkerPrivate
{
gdouble lon;
gdouble lat;
- gboolean highlighted;
+ gboolean selected;
gboolean selectable;
gboolean movable;
@@ -107,8 +107,8 @@ champlain_marker_get_property (GObject *object,
g_value_set_double (value, priv->lat);
break;
- case PROP_HIGHLIGHTED:
- g_value_set_boolean (value, priv->highlighted);
+ case PROP_SELECTED:
+ g_value_set_boolean (value, priv->selected);
break;
case PROP_SELECTABLE:
@@ -150,10 +150,10 @@ champlain_marker_set_property (GObject *object,
break;
}
- case PROP_HIGHLIGHTED:
+ case PROP_SELECTED:
{
gboolean bvalue = g_value_get_boolean (value);
- champlain_marker_set_highlighted (marker, bvalue);
+ champlain_marker_set_selected (marker, bvalue);
break;
}
@@ -227,15 +227,15 @@ champlain_marker_class_init (ChamplainMarkerClass *marker_class)
-90.0f, 90.0f, 0.0f, CHAMPLAIN_PARAM_READWRITE));
/**
- * ChamplainMarker:highlighted:
+ * ChamplainMarker:selected:
*
- * The highlighted state of the marker
+ * The selected state of the marker
*
- * Since: 0.4
+ * Since: 0.10
*/
- g_object_class_install_property (object_class, PROP_HIGHLIGHTED,
- g_param_spec_boolean ("highlighted", "Highlighted",
- "The highlighted stated of the marker",
+ g_object_class_install_property (object_class, PROP_SELECTED,
+ g_param_spec_boolean ("selected", "Selected",
+ "The sighlighted stated of the marker",
FALSE, CHAMPLAIN_PARAM_READWRITE));
/**
@@ -333,7 +333,7 @@ button_press_event_cb (ClutterActor *actor,
if (priv->selectable)
{
- champlain_marker_set_highlighted (marker, TRUE);
+ champlain_marker_set_selected (marker, TRUE);
swallow_event = TRUE;
}
@@ -374,7 +374,7 @@ champlain_marker_init (ChamplainMarker *marker)
priv->lat = 0;
priv->lon = 0;
- priv->highlighted = FALSE;
+ priv->selected = FALSE;
priv->selectable = TRUE;
priv->movable = FALSE;
@@ -473,43 +473,43 @@ champlain_marker_get_longitude (ChamplainMarker *marker)
/**
- * champlain_marker_set_highlighted:
+ * champlain_marker_set_selected:
* @marker: a #ChamplainMarker
- * @value: the highlighted state
+ * @value: the selected state
*
- * Sets the marker as highlighted or not. This will affect the "Selected" look
+ * Sets the marker as selected or not. This will affect the "Selected" look
* of the marker.
*
* Since: 0.4
*/
void
-champlain_marker_set_highlighted (ChamplainMarker *marker,
+champlain_marker_set_selected (ChamplainMarker *marker,
gboolean value)
{
g_return_if_fail (CHAMPLAIN_IS_MARKER (marker));
- marker->priv->highlighted = value;
+ marker->priv->selected = value;
- g_object_notify (G_OBJECT (marker), "highlighted");
+ g_object_notify (G_OBJECT (marker), "selected");
}
/**
- * champlain_marker_get_highlighted:
+ * champlain_marker_get_selected:
* @marker: a #ChamplainMarker
*
- * Checks whether the marker is highlighted.
+ * Checks whether the marker is selected.
*
- * Returns: the highlighted or not state of the marker.
+ * Returns: the selected or not state of the marker.
*
* Since: 0.4
*/
gboolean
-champlain_marker_get_highlighted (ChamplainMarker *marker)
+champlain_marker_get_selected (ChamplainMarker *marker)
{
g_return_val_if_fail (CHAMPLAIN_IS_MARKER (marker), FALSE);
- return marker->priv->highlighted;
+ return marker->priv->selected;
}
diff --git a/champlain/champlain-marker.h b/champlain/champlain-marker.h
index 0d3a640..f63d4b4 100644
--- a/champlain/champlain-marker.h
+++ b/champlain/champlain-marker.h
@@ -84,9 +84,9 @@ void champlain_marker_set_movable (ChamplainMarker *marker,
gboolean value);
gboolean champlain_marker_get_movable (ChamplainMarker *marker);
-void champlain_marker_set_highlighted (ChamplainMarker *marker,
+void champlain_marker_set_selected (ChamplainMarker *marker,
gboolean value);
-gboolean champlain_marker_get_highlighted (ChamplainMarker *marker);
+gboolean champlain_marker_get_selected (ChamplainMarker *marker);
void champlain_marker_animate_in (ChamplainMarker *marker);
void champlain_marker_animate_in_with_delay (ChamplainMarker *marker,
diff --git a/champlain/champlain-point.c b/champlain/champlain-point.c
index 2e33560..e6c2889 100644
--- a/champlain/champlain-point.c
+++ b/champlain/champlain-point.c
@@ -87,16 +87,16 @@ static void unmap (ClutterActor *self);
static void draw_point (ChamplainPoint *point);
/**
- * champlain_point_set_highlight_color:
+ * champlain_point_set_selection_color:
* @color: a #ClutterColor
*
- * Changes the highlight color, this is to ensure a better integration with
+ * Changes the selection color, this is to ensure a better integration with
* the desktop, this is automatically done by GtkChamplainEmbed.
*
* Since: 0.4
*/
void
-champlain_point_set_highlight_color (ClutterColor *color)
+champlain_point_set_selection_color (ClutterColor *color)
{
SELECTED_COLOR.red = color->red;
SELECTED_COLOR.green = color->green;
@@ -106,16 +106,16 @@ champlain_point_set_highlight_color (ClutterColor *color)
/**
- * champlain_point_get_highlight_color:
+ * champlain_point_get_selection_color:
*
- * Gets the highlight color.
+ * Gets the selection color.
*
- * Returns: the highlight color. Should not be freed.
+ * Returns: the selection color. Should not be freed.
*
* Since: 0.4.1
*/
const ClutterColor *
-champlain_point_get_highlight_color ()
+champlain_point_get_selection_color ()
{
return &SELECTED_COLOR;
}
@@ -248,7 +248,7 @@ draw_point (ChamplainPoint *point)
cr = clutter_cairo_texture_create (CLUTTER_CAIRO_TEXTURE (cairo_texture));
- if (champlain_marker_get_highlighted (CHAMPLAIN_MARKER (point)))
+ if (champlain_marker_get_selected (CHAMPLAIN_MARKER (point)))
color = &SELECTED_COLOR;
else
color = priv->color;
@@ -272,7 +272,7 @@ draw_point (ChamplainPoint *point)
static void
-notify_highlighted (GObject *gobject,
+notify_selected (GObject *gobject,
G_GNUC_UNUSED GParamSpec *pspec,
G_GNUC_UNUSED gpointer user_data)
{
@@ -294,7 +294,7 @@ champlain_point_init (ChamplainPoint *point)
draw_point (point);
- g_signal_connect (point, "notify::highlighted", G_CALLBACK (notify_highlighted), NULL);
+ g_signal_connect (point, "notify::selected", G_CALLBACK (notify_selected), NULL);
}
diff --git a/champlain/champlain-point.h b/champlain/champlain-point.h
index cfa54b2..3828c1b 100644
--- a/champlain/champlain-point.h
+++ b/champlain/champlain-point.h
@@ -79,8 +79,8 @@ void champlain_point_set_size (ChamplainPoint *point,
gdouble size);
gdouble champlain_point_get_size (ChamplainPoint *point);
-void champlain_point_set_highlight_color (ClutterColor *color);
-const ClutterColor *champlain_point_get_highlight_color (void);
+void champlain_point_set_selection_color (ClutterColor *color);
+const ClutterColor *champlain_point_get_selection_color (void);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]