#include "empathy-contact-dialogs.h"
#include "empathy-contact-widget.h"
-#include "gossip-ui-utils.h"
+#include "empathy-ui-utils.h"
static GList *subscription_dialogs = NULL;
static GList *information_dialogs = NULL;
static gint
contact_dialogs_find (GtkDialog *dialog,
- GossipContact *contact)
+ EmpathyContact *contact)
{
GtkWidget *contact_widget;
- GossipContact *this_contact;
+ EmpathyContact *this_contact;
contact_widget = g_object_get_data (G_OBJECT (dialog), "contact_widget");
this_contact = empathy_contact_widget_get_contact (contact_widget);
- return !gossip_contact_equal (contact, this_contact);
+ return !empathy_contact_equal (contact, this_contact);
}
/*
GtkWidget *contact_widget)
{
EmpathyContactManager *manager;
- GossipContact *contact;
+ EmpathyContact *contact;
manager = empathy_contact_manager_new ();
contact = empathy_contact_widget_get_contact (contact_widget);
}
void
-empathy_subscription_dialog_show (GossipContact *contact,
+empathy_subscription_dialog_show (EmpathyContact *contact,
GtkWindow *parent)
{
GtkWidget *dialog;
GtkWidget *contact_widget;
GList *l;
- g_return_if_fail (GOSSIP_IS_CONTACT (contact));
+ g_return_if_fail (EMPATHY_IS_CONTACT (contact));
l = g_list_find_custom (subscription_dialogs,
contact,
return;
}
- gossip_glade_get_file_simple ("empathy-contact-dialogs.glade",
+ empathy_glade_get_file_simple ("empathy-contact-dialogs.glade",
"subscription_request_dialog",
NULL,
"subscription_request_dialog", &dialog,
"hbox_subscription", &hbox_subscription,
NULL);
- contact_widget = empathy_contact_widget_new (contact, TRUE);
+ contact_widget = empathy_contact_widget_new (contact,
+ CONTACT_WIDGET_TYPE_SUBSCRIPTION);
gtk_box_pack_end (GTK_BOX (hbox_subscription),
contact_widget,
TRUE, TRUE,
}
void
-empathy_contact_information_dialog_show (GossipContact *contact,
- GtkWindow *parent,
- gboolean edit)
+empathy_contact_information_dialog_show (EmpathyContact *contact,
+ GtkWindow *parent,
+ gboolean edit)
{
- GtkWidget *dialog;
- GtkWidget *button;
- GtkWidget *contact_widget;
- GList *l;
+ GtkWidget *dialog;
+ GtkWidget *button;
+ GtkWidget *contact_widget;
+ GList *l;
+ EmpathyContactWidgetType type;
- g_return_if_fail (GOSSIP_IS_CONTACT (contact));
+ g_return_if_fail (EMPATHY_IS_CONTACT (contact));
l = g_list_find_custom (information_dialogs,
contact,
return;
}
+ type = edit ? CONTACT_WIDGET_TYPE_EDIT : CONTACT_WIDGET_TYPE_SHOW;
+
/* Create dialog */
dialog = gtk_dialog_new ();
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Contact information"));
/* Close button */
button = gtk_button_new_with_label (GTK_STOCK_CLOSE);
GTK_RESPONSE_CLOSE);
gtk_widget_show (button);
- /* Contact infor widget */
- contact_widget = empathy_contact_widget_new (contact, edit);
+ /* Contact info widget */
+ contact_widget = empathy_contact_widget_new (contact, type);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
contact_widget,
TRUE, TRUE, 0);
GtkWidget *contact_widget)
{
EmpathyContactManager *manager;
- GossipContact *contact;
+ EmpathyContact *contact;
manager = empathy_contact_manager_new ();
contact = empathy_contact_widget_get_contact (contact_widget);
dialog = gtk_dialog_new ();
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+ gtk_window_set_title (GTK_WINDOW (dialog), _("New contact"));
/* Cancel button */
button = gtk_button_new_with_label (GTK_STOCK_CANCEL);
GTK_RESPONSE_OK);
gtk_widget_show (button);
- /* Contact infor widget */
- contact_widget = empathy_contact_widget_new (NULL, TRUE);
+ /* Contact info widget */
+ contact_widget = empathy_contact_widget_new (NULL, CONTACT_WIDGET_TYPE_ADD);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
contact_widget,
TRUE, TRUE, 0);