diff options
Diffstat (limited to 'libempathy-gtk/empathy-individual-view.c')
-rw-r--r-- | libempathy-gtk/empathy-individual-view.c | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index 39dc3b34b..30098e534 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -377,14 +377,14 @@ real_drag_individual_received_cb (EmpathyIndividualView *self, if (!tp_strdiff (new_group, EMPATHY_INDIVIDUAL_STORE_FAVORITE)) { /* Mark contact as favourite */ - folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual), TRUE); + folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual), TRUE); return; } if (!tp_strdiff (old_group, EMPATHY_INDIVIDUAL_STORE_FAVORITE)) { /* Remove contact as favourite */ - folks_favourite_set_is_favourite (FOLKS_FAVOURITE (individual), FALSE); + folks_favouritable_set_is_favourite (FOLKS_FAVOURITABLE (individual), FALSE); /* Don't try to remove it */ old_group = NULL; @@ -681,7 +681,7 @@ individual_view_drag_motion (GtkWidget *widget, } if (individual != NULL && - folks_presence_is_online (FOLKS_PRESENCE (individual)) && + folks_has_presence_is_online (FOLKS_HAS_PRESENCE (individual)) && (caps & EMPATHY_CAPABILITIES_FT)) { gdk_drag_status (context, GDK_ACTION_COPY, time_); @@ -2345,12 +2345,45 @@ individual_view_remove_activate_cb (GtkMenuItem *menuitem, { gchar *text; GtkWindow *parent; + GList *l, *personas; + guint persona_count = 0; + + personas = folks_individual_get_personas (individual); + + /* If we have more than one TpfPersona, display a different message + * ensuring the user knows that *all* of the meta-contacts' personas will + * be removed. */ + for (l = personas; l != NULL; l = l->next) + { + if (!TPF_IS_PERSONA (l->data)) + continue; + + persona_count++; + if (persona_count >= 2) + break; + } + + if (persona_count < 2) + { + /* Not a meta-contact */ + text = + g_strdup_printf ( + _("Do you really want to remove the contact '%s'?"), + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + } + else + { + /* Meta-contact */ + text = + g_strdup_printf ( + _("Do you really want to remove the linked contact '%s'? " + "Note that this will remove all the contacts which make up " + "this linked contact."), + folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + } parent = empathy_get_toplevel_window (GTK_WIDGET (view)); - text = - g_strdup_printf (_ - ("Do you really want to remove the contact '%s'?"), - folks_aliasable_get_alias (FOLKS_ALIASABLE (individual))); + if (individual_view_remove_dialog_show (parent, _("Removing contact"), text)) { |