#include "empathy-linking-dialog.h"
#include "empathy-individual-linker.h"
+#include "empathy-ui-utils.h"
/**
* SECTION:empathy-individual-widget
dialog = GTK_DIALOG (self);
/* Set up dialog */
- gtk_dialog_set_has_separator (dialog, FALSE);
gtk_window_set_resizable (GTK_WINDOW (self), TRUE);
/* Translators: this is the title of the linking dialogue (reached by
* right-clicking on a contact and selecting "Link…"). "Link" in this title
button = gtk_button_new_with_mnemonic (
C_("Unlink individual (button)", "_Unlink…"));
gtk_widget_set_tooltip_text (button, _("Completely split the displayed "
- "meta-contact into the contacts it contains."));
+ "linked contacts into the separate contacts."));
gtk_dialog_add_action_widget (dialog, button, RESPONSE_UNLINK);
gtk_widget_show (button);
if (response == GTK_RESPONSE_OK)
{
EmpathyIndividualManager *manager;
- GList *personas;
+ GeeSet *personas;
manager = empathy_individual_manager_dup_singleton ();
/* Show a confirmation dialogue first */
dialog = gtk_message_dialog_new (GTK_WINDOW (self), GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, _("Unlink meta-contact '%s'?"),
- folks_individual_get_alias (individual));
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
+ _("Unlink linked contacts '%s'?"),
+ folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual)));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("Are you sure you want to unlink this meta-contact? This will "
- "completely split the meta-contact into the contacts it "
- "contains."));
+ _("Are you sure you want to unlink these linked contacts? This will "
+ "completely split the linked contacts into separate contacts."));
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
C_("Unlink individual (button)", "_Unlink"), GTK_RESPONSE_OK,
GtkWindow *parent)
{
EmpathyLinkingDialogPriv *priv;
- GList *personas, *l;
+ GeeSet *personas;
+ GeeIterator *iter;
guint num_personas = 0;
/* Create the dialogue if it doesn't exist */
/* Count how many Telepathy personas we have, to see whether we can
* unlink */
personas = folks_individual_get_personas (individual);
- for (l = personas; l != NULL; l = l->next)
+ iter = gee_iterable_iterator (GEE_ITERABLE (personas));
+ while (gee_iterator_next (iter))
{
- if (TPF_IS_PERSONA (l->data))
+ FolksPersona *persona = gee_iterator_get (iter);
+ if (empathy_folks_persona_is_interesting (persona))
num_personas++;
+
+ g_clear_object (&persona);
}
+ g_clear_object (&iter);
/* Only make the "Unlink" button sensitive if we have enough personas */
gtk_dialog_set_response_sensitive (GTK_DIALOG (linking_dialog),