diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-07-06 00:09:35 +0800 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-08-20 02:15:21 +0800 |
commit | b992a04452d574d1afb5787499ee0498b74210d3 (patch) | |
tree | d99a2c6827654b0b6e0db10d019e73beb054abe9 | |
parent | 4c6aa4d6c9ffa412fa0cf1513dab34af6aedc7e9 (diff) | |
download | gsoc2013-empathy-b992a04452d574d1afb5787499ee0498b74210d3.tar gsoc2013-empathy-b992a04452d574d1afb5787499ee0498b74210d3.tar.gz gsoc2013-empathy-b992a04452d574d1afb5787499ee0498b74210d3.tar.bz2 gsoc2013-empathy-b992a04452d574d1afb5787499ee0498b74210d3.tar.lz gsoc2013-empathy-b992a04452d574d1afb5787499ee0498b74210d3.tar.xz gsoc2013-empathy-b992a04452d574d1afb5787499ee0498b74210d3.tar.zst gsoc2013-empathy-b992a04452d574d1afb5787499ee0498b74210d3.zip |
Use EmpathyIndividualWidget in EmpathyIndividualInformationDialog
-rw-r--r-- | libempathy-gtk/empathy-individual-information-dialog.c | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/libempathy-gtk/empathy-individual-information-dialog.c b/libempathy-gtk/empathy-individual-information-dialog.c index 492ae8fc5..6fce21b40 100644 --- a/libempathy-gtk/empathy-individual-information-dialog.c +++ b/libempathy-gtk/empathy-individual-information-dialog.c @@ -37,7 +37,7 @@ #include <libempathy/empathy-utils.h> #include "empathy-individual-information-dialog.h" -#include "empathy-contact-widget.h" +#include "empathy-individual-widget.h" #include "empathy-ui-utils.h" #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyIndividualInformationDialog) @@ -109,7 +109,7 @@ individual_information_dialog_set_individual ( FolksIndividual *individual) { EmpathyIndividualInformationDialogPriv *priv; - GList *personas, *l; + GtkWidget *individual_widget; g_return_if_fail (EMPATHY_INDIVIDUAL_INFORMATION_DIALOG (dialog)); g_return_if_fail (FOLKS_IS_INDIVIDUAL (individual)); @@ -119,32 +119,14 @@ individual_information_dialog_set_individual ( gtk_window_set_title (GTK_WINDOW (dialog), folks_individual_get_alias (individual)); - personas = folks_individual_get_personas (individual); - - for (l = personas; l != NULL; l = l->next) - { - GtkWidget *contact_widget; - TpContact *tp_contact; - EmpathyContact *contact; - TpfPersona *persona = l->data; - - if (!TPF_IS_PERSONA (persona)) - continue; - - tp_contact = tpf_persona_get_contact (persona); - contact = empathy_contact_dup_from_tp_contact (tp_contact); - - /* Contact info widget */ - contact_widget = empathy_contact_widget_new (contact, - EMPATHY_CONTACT_WIDGET_SHOW_LOCATION | - EMPATHY_CONTACT_WIDGET_SHOW_DETAILS); - gtk_container_set_border_width (GTK_CONTAINER (contact_widget), 8); - gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area ( - GTK_DIALOG (dialog))), contact_widget, TRUE, TRUE, 0); - gtk_widget_show (contact_widget); - - g_object_unref (contact); - } + individual_widget = empathy_individual_widget_new (individual, + EMPATHY_INDIVIDUAL_WIDGET_SHOW_LOCATION | + EMPATHY_INDIVIDUAL_WIDGET_SHOW_DETAILS | + EMPATHY_INDIVIDUAL_WIDGET_SHOW_PERSONAS); + gtk_container_set_border_width (GTK_CONTAINER (individual_widget), 8); + gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area ( + GTK_DIALOG (dialog))), individual_widget, TRUE, TRUE, 0); + gtk_widget_show (individual_widget); priv->individual = g_object_ref (individual); } |