aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-chat.c18
-rw-r--r--libempathy-gtk/empathy-contact-dialogs.c2
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c26
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c4
-rw-r--r--libempathy-gtk/empathy-contact-selector-dialog.c6
-rw-r--r--libempathy-gtk/empathy-contact-widget.c6
-rw-r--r--libempathy-gtk/empathy-theme-adium.c2
-rw-r--r--libempathy-gtk/empathy-theme-boxes.c4
-rw-r--r--libempathy-gtk/empathy-theme-irc.c4
-rw-r--r--libempathy-gtk/empathy-ui-utils.c2
-rw-r--r--libempathy/empathy-contact.c71
-rw-r--r--libempathy/empathy-contact.h5
-rw-r--r--libempathy/empathy-individual-manager.c2
-rw-r--r--libempathy/empathy-message.c2
-rw-r--r--libempathy/empathy-tp-chat.c2
-rw-r--r--src/empathy-call-window.c8
-rw-r--r--src/empathy-chat-window.c2
-rw-r--r--src/empathy-event-manager.c20
-rw-r--r--src/empathy-ft-manager.c10
-rw-r--r--src/empathy-map-view.c2
20 files changed, 91 insertions, 107 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index edb132936..5d8fe71d3 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1119,7 +1119,7 @@ chat_message_received (EmpathyChat *chat, EmpathyMessage *message)
sender = empathy_message_get_sender (message);
DEBUG ("Appending new message from %s (%d)",
- empathy_contact_get_name (sender),
+ empathy_contact_get_alias (sender),
empathy_contact_get_handle (sender));
empathy_chat_view_append_message (chat->view, message);
@@ -1600,7 +1600,7 @@ chat_input_key_press_event_cb (GtkWidget *widget,
* which might be cased all wrong.
* Fixes #120876
* */
- text = empathy_contact_get_name (completed_list->data);
+ text = empathy_contact_get_alias (completed_list->data);
} else {
text = completed;
@@ -1610,7 +1610,7 @@ chat_input_key_press_event_cb (GtkWidget *widget,
* */
message = g_string_new ("");
for (l = completed_list; l != NULL; l = l->next) {
- g_string_append (message, empathy_contact_get_name (l->data));
+ g_string_append (message, empathy_contact_get_alias (l->data));
g_string_append (message, " - ");
}
empathy_chat_view_append_event (chat->view, message->str);
@@ -2057,7 +2057,7 @@ build_part_message (guint reason,
const gchar *actor_name = NULL;
if (actor != NULL) {
- actor_name = empathy_contact_get_name (actor);
+ actor_name = empathy_contact_get_alias (actor);
}
/* Having an actor only really makes sense for a few actions... */
@@ -2113,7 +2113,7 @@ chat_members_changed_cb (EmpathyTpChat *tp_chat,
EmpathyChat *chat)
{
EmpathyChatPriv *priv = GET_PRIV (chat);
- const gchar *name = empathy_contact_get_name (contact);
+ const gchar *name = empathy_contact_get_alias (contact);
gchar *str;
g_return_if_fail (TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED != reason);
@@ -2148,8 +2148,8 @@ chat_member_renamed_cb (EmpathyTpChat *tp_chat,
gchar *str;
str = g_strdup_printf (_("%s is now known as %s"),
- empathy_contact_get_name (old_contact),
- empathy_contact_get_name (new_contact));
+ empathy_contact_get_alias (old_contact),
+ empathy_contact_get_alias (new_contact));
empathy_chat_view_append_event (chat->view, str);
g_free (str);
}
@@ -2817,7 +2817,7 @@ empathy_chat_init (EmpathyChat *chat)
g_timeout_add_seconds (1, chat_block_events_timeout_cb, chat);
/* Add nick name completion */
- priv->completion = g_completion_new ((GCompletionFunc) empathy_contact_get_name);
+ priv->completion = g_completion_new ((GCompletionFunc) empathy_contact_get_alias);
g_completion_set_compare (priv->completion, chat_contacts_completion_func);
chat_create_ui (chat);
@@ -3118,7 +3118,7 @@ empathy_chat_get_name (EmpathyChat *chat)
ret = priv->name;
if (!ret && priv->remote_contact) {
- ret = empathy_contact_get_name (priv->remote_contact);
+ ret = empathy_contact_get_alias (priv->remote_contact);
}
if (!ret)
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index b359b86cd..003710b03 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -181,7 +181,7 @@ empathy_contact_information_dialog_show (EmpathyContact *contact,
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_window_set_title (GTK_WINDOW (dialog),
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
/* Close button */
button = gtk_button_new_with_label (GTK_STOCK_CLOSE);
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index de838441f..a7a5beca9 100644
--- a/libempathy-gtk/empathy-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -982,7 +982,7 @@ add_contact_to_store (GtkTreeStore *store,
EmpathyContactListFlags flags)
{
gtk_tree_store_insert_with_values (store, iter, parent, 0,
- EMPATHY_CONTACT_LIST_STORE_COL_NAME, empathy_contact_get_name (contact),
+ EMPATHY_CONTACT_LIST_STORE_COL_NAME, empathy_contact_get_alias (contact),
EMPATHY_CONTACT_LIST_STORE_COL_CONTACT, contact,
EMPATHY_CONTACT_LIST_STORE_COL_IS_GROUP, FALSE,
EMPATHY_CONTACT_LIST_STORE_COL_IS_SEPARATOR, FALSE,
@@ -1009,7 +1009,7 @@ contact_list_store_add_contact (EmpathyContactListStore *store,
priv = GET_PRIV (store);
- if (EMP_STR_EMPTY (empathy_contact_get_name (contact)) ||
+ if (EMP_STR_EMPTY (empathy_contact_get_alias (contact)) ||
(!priv->show_offline && !empathy_contact_is_online (contact))) {
return;
}
@@ -1155,7 +1155,7 @@ contact_list_store_contact_update (EmpathyContactListStore *store,
if (!in_list && !should_be_in_list) {
/* Nothing to do. */
DEBUG ("Contact:'%s' in list:NO, should be:NO",
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL);
g_list_free (iters);
@@ -1163,7 +1163,7 @@ contact_list_store_contact_update (EmpathyContactListStore *store,
}
else if (in_list && !should_be_in_list) {
DEBUG ("Contact:'%s' in list:YES, should be:NO",
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
if (priv->show_active) {
do_remove = TRUE;
@@ -1179,7 +1179,7 @@ contact_list_store_contact_update (EmpathyContactListStore *store,
}
else if (!in_list && should_be_in_list) {
DEBUG ("Contact:'%s' in list:NO, should be:YES",
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
contact_list_store_add_contact (store, contact);
@@ -1190,7 +1190,7 @@ contact_list_store_contact_update (EmpathyContactListStore *store,
}
} else {
DEBUG ("Contact:'%s' in list:YES, should be:YES",
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
/* Get online state before. */
if (iters && g_list_length (iters) > 0) {
@@ -1230,7 +1230,7 @@ contact_list_store_contact_update (EmpathyContactListStore *store,
EMPATHY_CONTACT_LIST_STORE_COL_ICON_STATUS, pixbuf_status,
EMPATHY_CONTACT_LIST_STORE_COL_PIXBUF_AVATAR, pixbuf_avatar,
EMPATHY_CONTACT_LIST_STORE_COL_PIXBUF_AVATAR_VISIBLE, show_avatar,
- EMPATHY_CONTACT_LIST_STORE_COL_NAME, empathy_contact_get_name (contact),
+ EMPATHY_CONTACT_LIST_STORE_COL_NAME, empathy_contact_get_alias (contact),
EMPATHY_CONTACT_LIST_STORE_COL_PRESENCE_TYPE,
empathy_contact_get_presence (contact),
EMPATHY_CONTACT_LIST_STORE_COL_STATUS,
@@ -1278,7 +1278,7 @@ contact_list_store_contact_updated_cb (EmpathyContact *contact,
EmpathyContactListStore *store)
{
DEBUG ("Contact:'%s' updated, checking roster is in sync...",
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
contact_list_store_contact_update (store, contact);
}
@@ -1326,7 +1326,7 @@ contact_list_store_contact_active_new (EmpathyContactListStore *store,
ShowActiveData *data;
DEBUG ("Contact:'%s' now active, and %s be removed",
- empathy_contact_get_name (contact),
+ empathy_contact_get_alias (contact),
remove_ ? "WILL" : "WILL NOT");
data = g_slice_new0 (ShowActiveData);
@@ -1358,12 +1358,12 @@ contact_list_store_contact_active_cb (ShowActiveData *data)
!priv->show_offline &&
!empathy_contact_is_online (data->contact)) {
DEBUG ("Contact:'%s' active timeout, removing item",
- empathy_contact_get_name (data->contact));
+ empathy_contact_get_alias (data->contact));
contact_list_store_remove_contact (data->store, data->contact);
}
DEBUG ("Contact:'%s' no longer active",
- empathy_contact_get_name (data->contact));
+ empathy_contact_get_alias (data->contact));
contact_list_store_contact_set_active (data->store,
data->contact,
@@ -1574,8 +1574,8 @@ contact_list_store_contact_sort (EmpathyContact *contact_a,
g_return_val_if_fail (contact_a != NULL || contact_b != NULL, 0);
/* alias */
- ret_val = g_utf8_collate (empathy_contact_get_name (contact_a),
- empathy_contact_get_name (contact_b));
+ ret_val = g_utf8_collate (empathy_contact_get_alias (contact_a),
+ empathy_contact_get_alias (contact_b));
if (ret_val != 0)
goto out;
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index 0e7c227d9..5860adef8 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -152,7 +152,7 @@ contact_list_view_is_visible_contact (EmpathyContactListView *self,
g_assert (live != NULL);
/* check alias name */
- str = empathy_contact_get_name (contact);
+ str = empathy_contact_get_alias (contact);
if (empathy_live_search_match (live, str))
return TRUE;
@@ -2063,7 +2063,7 @@ contact_list_view_remove_activate_cb (GtkMenuItem *menuitem,
parent = empathy_get_toplevel_window (GTK_WIDGET (view));
text = g_strdup_printf (_("Do you really want to remove the contact '%s'?"),
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
if (contact_list_view_remove_dialog_show (parent, _("Removing contact"), text)) {
EmpathyContactList *list;
diff --git a/libempathy-gtk/empathy-contact-selector-dialog.c b/libempathy-gtk/empathy-contact-selector-dialog.c
index c09b25cef..b04e56daa 100644
--- a/libempathy-gtk/empathy-contact-selector-dialog.c
+++ b/libempathy-gtk/empathy-contact-selector-dialog.c
@@ -135,16 +135,16 @@ contact_selector_dialog_account_changed_cb (GtkWidget *widget,
DEBUG ("Adding contact ID %s, Name %s",
empathy_contact_get_id (contact),
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
tmpstr = g_strdup_printf ("%s (%s)",
- empathy_contact_get_name (contact),
+ empathy_contact_get_alias (contact),
empathy_contact_get_id (contact));
gtk_list_store_insert_with_values (priv->store, &iter, -1,
COMPLETION_COL_TEXT, tmpstr,
COMPLETION_COL_ID, empathy_contact_get_id (contact),
- COMPLETION_COL_NAME, empathy_contact_get_name (contact),
+ COMPLETION_COL_NAME, empathy_contact_get_alias (contact),
-1);
g_free (tmpstr);
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 0da9e0091..77d22c915 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -1086,7 +1086,7 @@ contact_widget_location_update (EmpathyContactWidget *information)
champlain_view_add_layer (information->map_view, layer);
marker = champlain_marker_new_with_text (
- empathy_contact_get_name (information->contact), NULL, NULL, NULL);
+ empathy_contact_get_alias (information->contact), NULL, NULL, NULL);
champlain_base_marker_set_position (CHAMPLAIN_BASE_MARKER (marker), lat, lon);
clutter_container_add (CLUTTER_CONTAINER (layer), marker, NULL);
@@ -1378,10 +1378,10 @@ contact_widget_name_notify_cb (EmpathyContactWidget *information)
{
if (GTK_IS_ENTRY (information->widget_alias))
gtk_entry_set_text (GTK_ENTRY (information->widget_alias),
- empathy_contact_get_name (information->contact));
+ empathy_contact_get_alias (information->contact));
else
gtk_label_set_label (GTK_LABEL (information->widget_alias),
- empathy_contact_get_name (information->contact));
+ empathy_contact_get_alias (information->contact));
}
static void
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index c2267f767..53c78c18a 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -461,7 +461,7 @@ theme_adium_append_message (EmpathyChatView *view,
timestamp = empathy_message_get_timestamp (msg);
body = empathy_message_get_body (msg);
body_escaped = theme_adium_parse_body (body);
- name = empathy_contact_get_name (sender);
+ name = empathy_contact_get_alias (sender);
contact_id = empathy_contact_get_id (sender);
/* If this is a /me, append an event */
diff --git a/libempathy-gtk/empathy-theme-boxes.c b/libempathy-gtk/empathy-theme-boxes.c
index 531f2baa6..24b7fc5b4 100644
--- a/libempathy-gtk/empathy-theme-boxes.c
+++ b/libempathy-gtk/empathy-theme-boxes.c
@@ -204,7 +204,7 @@ theme_boxes_maybe_append_header (EmpathyThemeBoxes *theme,
gboolean consecutive;
contact = empathy_message_get_sender (msg);
- name = empathy_contact_get_name (contact);
+ name = empathy_contact_get_alias (contact);
last_contact = empathy_chat_text_view_get_last_contact (view);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (theme));
time_ = empathy_message_get_timestamp (msg);
@@ -347,7 +347,7 @@ theme_boxes_append_message (EmpathyChatTextView *view,
gchar *body;
body = g_strdup_printf (" * %s %s",
- empathy_contact_get_name (sender),
+ empathy_contact_get_alias (sender),
empathy_message_get_body (message));
empathy_chat_text_view_append_body (EMPATHY_CHAT_TEXT_VIEW (view),
body,
diff --git a/libempathy-gtk/empathy-theme-irc.c b/libempathy-gtk/empathy-theme-irc.c
index 5d298564e..afd59523e 100644
--- a/libempathy-gtk/empathy-theme-irc.c
+++ b/libempathy-gtk/empathy-theme-irc.c
@@ -62,11 +62,11 @@ theme_irc_append_message (EmpathyChatTextView *view,
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
contact = empathy_message_get_sender (message);
- name = empathy_contact_get_name (contact);
+ name = empathy_contact_get_alias (contact);
if (empathy_message_get_tptype (message) == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION) {
tmp = g_strdup_printf (" * %s %s",
- empathy_contact_get_name (contact),
+ empathy_contact_get_alias (contact),
empathy_message_get_body (message));
empathy_chat_text_view_append_body (view, tmp,
EMPATHY_CHAT_TEXT_VIEW_TAG_ACTION);
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index b10b42a44..9fcdc985e 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1858,7 +1858,7 @@ empathy_receive_file_with_file_chooser (EmpathyFTHandler *handler)
g_assert (contact != NULL);
title = g_strdup_printf (_("Incoming file from %s"),
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
widget = gtk_file_chooser_dialog_new (title,
NULL,
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index 3a16c3e37..57a4449c3 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -51,7 +51,7 @@ typedef struct {
TpAccount *account;
FolksPersona *persona;
gchar *id;
- gchar *name;
+ gchar *alias;
EmpathyAvatar *avatar;
TpConnectionPresenceType presence;
gchar *presence_message;
@@ -96,7 +96,7 @@ enum
PROP_ACCOUNT,
PROP_PERSONA,
PROP_ID,
- PROP_NAME,
+ PROP_ALIAS,
PROP_AVATAR,
PROP_PRESENCE,
PROP_PRESENCE_MESSAGE,
@@ -125,7 +125,7 @@ tp_contact_notify_cb (TpContact *tp_contact,
/* Forward property notifications */
if (!tp_strdiff (param->name, "alias"))
- g_object_notify (contact, "name");
+ g_object_notify (contact, "alias");
else if (!tp_strdiff (param->name, "presence-type")) {
TpConnectionPresenceType presence;
@@ -242,10 +242,10 @@ empathy_contact_class_init (EmpathyContactClass *class)
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
- PROP_NAME,
- g_param_spec_string ("name",
- "Contact Name",
- "The name of the contact",
+ PROP_ALIAS,
+ g_param_spec_string ("alias",
+ "Contact alias",
+ "An alias for the contact",
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
@@ -345,7 +345,7 @@ contact_finalize (GObject *object)
DEBUG ("finalize: %p", object);
- g_free (priv->name);
+ g_free (priv->alias);
g_free (priv->id);
g_free (priv->presence_message);
@@ -411,8 +411,8 @@ contact_get_property (GObject *object,
case PROP_ID:
g_value_set_string (value, empathy_contact_get_id (contact));
break;
- case PROP_NAME:
- g_value_set_string (value, empathy_contact_get_name (contact));
+ case PROP_ALIAS:
+ g_value_set_string (value, empathy_contact_get_alias (contact));
break;
case PROP_AVATAR:
g_value_set_boxed (value, empathy_contact_get_avatar (contact));
@@ -462,8 +462,8 @@ contact_set_property (GObject *object,
case PROP_ID:
empathy_contact_set_id (contact, g_value_get_string (value));
break;
- case PROP_NAME:
- empathy_contact_set_name (contact, g_value_get_string (value));
+ case PROP_ALIAS:
+ empathy_contact_set_alias (contact, g_value_get_string (value));
break;
case PROP_AVATAR:
empathy_contact_set_avatar (contact, g_value_get_boxed (value));
@@ -512,7 +512,7 @@ empathy_contact_from_tpl_contact (TpAccount *account,
retval = g_object_new (EMPATHY_TYPE_CONTACT,
"id", tpl_entity_get_alias (tpl_entity),
- "name", tpl_entity_get_identifier (tpl_entity),
+ "alias", tpl_entity_get_identifier (tpl_entity),
"account", account,
"is-user", is_user,
NULL);
@@ -527,7 +527,7 @@ empathy_contact_from_tpl_contact (TpAccount *account,
EmpathyContact *
empathy_contact_new_for_log (TpAccount *account,
const gchar *id,
- const gchar *name,
+ const gchar *alias,
gboolean is_user)
{
g_return_val_if_fail (id != NULL, NULL);
@@ -536,7 +536,7 @@ empathy_contact_new_for_log (TpAccount *account,
return g_object_new (EMPATHY_TYPE_CONTACT,
"account", account,
"id", id,
- "name", name,
+ "alias", alias,
"is-user", is_user,
NULL);
}
@@ -588,15 +588,15 @@ empathy_contact_set_id (EmpathyContact *contact,
priv->id = g_strdup (id);
g_object_notify (G_OBJECT (contact), "id");
- if (EMP_STR_EMPTY (priv->name))
- g_object_notify (G_OBJECT (contact), "name");
+ if (EMP_STR_EMPTY (priv->alias))
+ g_object_notify (G_OBJECT (contact), "alias");
}
g_object_unref (contact);
}
const gchar *
-empathy_contact_get_name (EmpathyContact *contact)
+empathy_contact_get_alias (EmpathyContact *contact)
{
EmpathyContactPriv *priv;
const gchar *alias;
@@ -608,7 +608,7 @@ empathy_contact_get_name (EmpathyContact *contact)
if (priv->tp_contact != NULL)
alias = tp_contact_get_alias (priv->tp_contact);
else
- alias = priv->name;
+ alias = priv->alias;
if (!EMP_STR_EMPTY (alias))
return alias;
@@ -617,41 +617,26 @@ empathy_contact_get_name (EmpathyContact *contact)
}
void
-empathy_contact_set_name (EmpathyContact *contact,
- const gchar *name)
+empathy_contact_set_alias (EmpathyContact *contact,
+ const gchar *alias)
{
EmpathyContactPriv *priv;
+ FolksPersona *persona;
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
priv = GET_PRIV (contact);
g_object_ref (contact);
- if (tp_strdiff (name, priv->name))
+
+ if (tp_strdiff (alias, priv->alias))
{
- g_free (priv->name);
- priv->name = g_strdup (name);
- g_object_notify (G_OBJECT (contact), "name");
+ g_free (priv->alias);
+ priv->alias = g_strdup (alias);
+ g_object_notify (G_OBJECT (contact), "alias");
}
- g_object_unref (contact);
-}
-
-void
-empathy_contact_set_alias (EmpathyContact *contact,
- const gchar *alias)
-{
- FolksPersona *persona;
-
- g_return_if_fail (EMPATHY_IS_CONTACT (contact));
- persona = empathy_contact_get_persona (contact);
- if (persona == NULL || !FOLKS_IS_ALIAS (persona))
- return;
-
- DEBUG ("Setting alias for contact %s to %s", empathy_contact_get_id (contact),
- alias);
-
- folks_alias_set_alias (FOLKS_ALIAS (persona), alias);
+ g_object_unref (contact);
}
EmpathyAvatar *
diff --git a/libempathy/empathy-contact.h b/libempathy/empathy-contact.h
index a5b58ce64..7980ab252 100644
--- a/libempathy/empathy-contact.h
+++ b/libempathy/empathy-contact.h
@@ -75,12 +75,11 @@ EmpathyContact * empathy_contact_new (TpContact *tp_contact);
EmpathyContact * empathy_contact_from_tpl_contact (TpAccount *account,
TplEntity *tpl_contact);
EmpathyContact * empathy_contact_new_for_log (TpAccount *account,
- const gchar *id, const gchar *name, gboolean is_user);
+ const gchar *id, const gchar *alias, gboolean is_user);
TpContact * empathy_contact_get_tp_contact (EmpathyContact *contact);
const gchar * empathy_contact_get_id (EmpathyContact *contact);
void empathy_contact_set_id (EmpathyContact *contact, const gchar *id);
-const gchar * empathy_contact_get_name (EmpathyContact *contact);
-void empathy_contact_set_name (EmpathyContact *contact, const gchar *name);
+const gchar * empathy_contact_get_alias (EmpathyContact *contact);
void empathy_contact_set_alias (EmpathyContact *contact, const gchar *alias);
EmpathyAvatar * empathy_contact_get_avatar (EmpathyContact *contact);
void empathy_contact_set_avatar (EmpathyContact *contact,
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c
index 9eeb5d3c8..cb3a3975e 100644
--- a/libempathy/empathy-individual-manager.c
+++ b/libempathy/empathy-individual-manager.c
@@ -309,7 +309,7 @@ empathy_individual_manager_add_from_contact (EmpathyIndividualManager *self,
g_object_ref (contact);
DEBUG ("adding individual from contact %s (%s)",
- empathy_contact_get_id (contact), empathy_contact_get_name (contact));
+ empathy_contact_get_id (contact), empathy_contact_get_alias (contact));
account = empathy_contact_get_account (contact);
store_id = tp_proxy_get_object_path (TP_PROXY (account));
diff --git a/libempathy/empathy-message.c b/libempathy/empathy-message.c
index a8d6af575..07827f8e0 100644
--- a/libempathy/empathy-message.c
+++ b/libempathy/empathy-message.c
@@ -530,7 +530,7 @@ empathy_message_should_highlight (EmpathyMessage *message)
return FALSE;
}
- to = empathy_contact_get_name (contact);
+ to = empathy_contact_get_alias (contact);
if (!to) {
return FALSE;
}
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 90c31e4cc..0ec866617 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -429,7 +429,7 @@ tp_chat_state_changed_got_contact_cb (TpConnection *connection,
state = GPOINTER_TO_UINT (user_data);
DEBUG ("Chat state changed for %s (%d): %d",
- empathy_contact_get_name (contact),
+ empathy_contact_get_alias (contact),
empathy_contact_get_handle (contact), state);
g_signal_emit (chat, signals[CHAT_STATE_CHANGED], 0, contact, state);
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index e607b2ef7..ffdcb5c71 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1244,7 +1244,7 @@ set_window_title (EmpathyCallWindow *self)
/* translators: Call is a noun and %s is the contact name. This string
* is used in the window title */
tmp = g_strdup_printf (_("Call with %s"),
- empathy_contact_get_name (priv->contact));
+ empathy_contact_get_alias (priv->contact));
gtk_window_set_title (GTK_WINDOW (self), tmp);
g_free (tmp);
}
@@ -2215,19 +2215,19 @@ media_stream_error_to_txt (EmpathyCallWindow *self,
return g_strdup_printf (
_("%s's software does not understand any of the audio formats "
"supported by your computer"),
- empathy_contact_get_name (priv->contact));
+ empathy_contact_get_alias (priv->contact));
else
return g_strdup_printf (
_("%s's software does not understand any of the video formats "
"supported by your computer"),
- empathy_contact_get_name (priv->contact));
+ empathy_contact_get_alias (priv->contact));
case TP_MEDIA_STREAM_ERROR_CONNECTION_FAILED:
return g_strdup_printf (
_("Can't establish a connection to %s. "
"One of you might be on a network that does not allow "
"direct connections."),
- empathy_contact_get_name (priv->contact));
+ empathy_contact_get_alias (priv->contact));
case TP_MEDIA_STREAM_ERROR_NETWORK_ERROR:
return g_strdup (_("There was a failure on the network"));
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index c4ce8b26e..8c2eed6b1 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1281,7 +1281,7 @@ chat_window_show_or_update_notification (EmpathyChatWindow *window,
}
sender = empathy_message_get_sender (message);
- header = empathy_contact_get_name (sender);
+ header = empathy_contact_get_alias (sender);
body = empathy_message_get_body (message);
escaped = g_markup_escape_text (body, -1);
has_x_canonical_append = empathy_notify_manager_has_capability (
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index bf3a48a8a..3f4281fbf 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -476,10 +476,10 @@ event_channel_process_voip_func (EventPriv *event)
GTK_MESSAGE_DIALOG (dialog), video ?
_("%s is video calling you. Do you want to answer?"):
_("%s is calling you. Do you want to answer?"),
- empathy_contact_get_name (event->approval->contact));
+ empathy_contact_get_alias (event->approval->contact));
title = g_strdup_printf (_("Incoming call from %s"),
- empathy_contact_get_name (event->approval->contact));
+ empathy_contact_get_alias (event->approval->contact));
gtk_window_set_title (GTK_WINDOW (dialog), title);
g_free (title);
@@ -540,7 +540,7 @@ event_manager_chat_message_received_cb (EmpathyTpChat *tp_chat,
event = event_lookup_by_approval (approval->manager, approval);
sender = empathy_message_get_sender (message);
- header = empathy_contact_get_name (sender);
+ header = empathy_contact_get_alias (sender);
msg = empathy_message_get_body (message);
channel = empathy_tp_chat_get_channel (tp_chat);
@@ -621,7 +621,7 @@ event_manager_media_channel_got_contact (EventManagerApproval *approval)
header = g_strdup_printf (
video ? _("Incoming video call from %s") :_("Incoming call from %s"),
- empathy_contact_get_name (approval->contact));
+ empathy_contact_get_alias (approval->contact));
event_manager_add (approval->manager, approval->contact,
EMPATHY_EVENT_TYPE_VOIP,
@@ -707,7 +707,7 @@ event_room_channel_process_func (EventPriv *event)
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
_("%s is inviting you to join %s"),
- empathy_contact_get_name (event->approval->contact),
+ empathy_contact_get_alias (event->approval->contact),
tp_channel_get_identifier (channel));
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
@@ -758,7 +758,7 @@ event_manager_muc_invite_got_contact_cb (TpConnection *connection,
NULL, NULL, &invite_msg);
msg = g_strdup_printf (_("%s invited you to join %s"),
- empathy_contact_get_name (approval->contact),
+ empathy_contact_get_alias (approval->contact),
tp_channel_get_identifier (approval->main_channel));
event_manager_add (approval->manager, approval->contact,
@@ -785,7 +785,7 @@ event_manager_ft_got_contact_cb (TpConnection *connection,
approval->contact = g_object_ref (contact);
header = g_strdup_printf (_("Incoming file transfer from %s"),
- empathy_contact_get_name (approval->contact));
+ empathy_contact_get_alias (approval->contact));
event_manager_add (approval->manager, approval->contact,
EMPATHY_EVENT_TYPE_TRANSFER, EMPATHY_IMAGE_DOCUMENT_SEND, header, NULL,
@@ -986,7 +986,7 @@ event_manager_pendings_changed_cb (EmpathyContactList *list,
}
header = g_strdup_printf (_("Subscription requested by %s"),
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
if (!EMP_STR_EMPTY (message))
event_msg = g_strdup_printf (_("\nMessage: %s"), message);
@@ -1033,7 +1033,7 @@ event_manager_presence_changed_cb (EmpathyContact *contact,
EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNOUT))
{
header = g_strdup_printf (_("%s is now offline."),
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
event_manager_add (manager, contact, EMPATHY_EVENT_TYPE_PRESENCE,
EMPATHY_IMAGE_AVATAR_DEFAULT, header, NULL, NULL, NULL, NULL);
@@ -1053,7 +1053,7 @@ event_manager_presence_changed_cb (EmpathyContact *contact,
EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNIN))
{
header = g_strdup_printf (_("%s is now online."),
- empathy_contact_get_name (contact));
+ empathy_contact_get_alias (contact));
event_manager_add (manager, contact, EMPATHY_EVENT_TYPE_PRESENCE,
EMPATHY_IMAGE_AVATAR_DEFAULT, header, NULL, NULL, NULL, NULL);
diff --git a/src/empathy-ft-manager.c b/src/empathy-ft-manager.c
index 34ac1adac..58edc584e 100644
--- a/src/empathy-ft-manager.c
+++ b/src/empathy-ft-manager.c
@@ -205,7 +205,7 @@ ft_manager_remove_file_from_model (EmpathyFTManager *manager,
g_return_if_fail (row_ref);
DEBUG ("Removing file transfer from window: contact=%s, filename=%s",
- empathy_contact_get_name (empathy_ft_handler_get_contact (handler)),
+ empathy_contact_get_alias (empathy_ft_handler_get_contact (handler)),
empathy_ft_handler_get_filename (handler));
/* Get the iter from the row_ref */
@@ -296,7 +296,7 @@ ft_manager_format_contact_info (EmpathyFTHandler *handler)
char *retval;
incoming = empathy_ft_handler_is_incoming (handler);
- contact_name = empathy_contact_get_name
+ contact_name = empathy_contact_get_alias
(empathy_ft_handler_get_contact (handler));
filename = empathy_ft_handler_get_filename (handler);
@@ -326,7 +326,7 @@ ft_manager_format_error_message (EmpathyFTHandler *handler,
contact = empathy_ft_handler_get_contact (handler);
if (contact)
- contact_name = empathy_contact_get_name (contact);
+ contact_name = empathy_contact_get_alias (contact);
filename = empathy_ft_handler_get_filename (handler);
@@ -478,7 +478,7 @@ do_real_transfer_done (EmpathyFTManager *manager,
g_return_if_fail (row_ref != NULL);
incoming = empathy_ft_handler_is_incoming (handler);
- contact_name = empathy_contact_get_name
+ contact_name = empathy_contact_get_alias
(empathy_ft_handler_get_contact (handler));
filename = empathy_ft_handler_get_filename (handler);
@@ -857,7 +857,7 @@ ft_manager_stop (EmpathyFTManager *manager)
g_return_if_fail (handler != NULL);
DEBUG ("Stopping file transfer: contact=%s, filename=%s",
- empathy_contact_get_name (empathy_ft_handler_get_contact (handler)),
+ empathy_contact_get_alias (empathy_ft_handler_get_contact (handler)),
empathy_ft_handler_get_filename (handler));
empathy_ft_handler_cancel_transfer (handler);
diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index 2b0b93f7f..2143f19ef 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -227,7 +227,7 @@ map_view_contacts_update_label (ChamplainMarker *marker)
contact = g_object_get_data (G_OBJECT (marker), "contact");
location = empathy_contact_get_location (contact);
- name = empathy_contact_get_name (contact);
+ name = empathy_contact_get_alias (contact);
gtime = g_hash_table_lookup (location, EMPATHY_LOCATION_TIMESTAMP);
if (gtime != NULL)