aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-dialogs.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-28 17:20:27 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-28 17:20:27 +0800
commit1d153c1cf91edce537bc64efb01b5a496b35518e (patch)
treede8ba4359a0341bd0c8c6e1a7495f4f39fb565f1 /libempathy-gtk/empathy-contact-dialogs.c
parentb50b7039d3b52f33df94e5a3526d9f43a51401ad (diff)
parent6df1c4bdd81fbbb288b8e49c3bea9a1dd2e005a6 (diff)
downloadgsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar.gz
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar.bz2
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar.lz
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar.xz
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar.zst
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.zip
Merge commit 'upstream/master' into mc5
Conflicts: libempathy-gtk/empathy-account-widget.c src/empathy.c
Diffstat (limited to 'libempathy-gtk/empathy-contact-dialogs.c')
-rw-r--r--libempathy-gtk/empathy-contact-dialogs.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index 5b11ddc2e..fc1cbbc8e 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -191,7 +191,7 @@ empathy_contact_information_dialog_show (EmpathyContact *contact,
EMPATHY_CONTACT_WIDGET_SHOW_LOCATION |
EMPATHY_CONTACT_WIDGET_EDIT_NONE);
gtk_container_set_border_width (GTK_CONTAINER (contact_widget), 8);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
contact_widget,
TRUE, TRUE, 0);
gtk_widget_show (contact_widget);
@@ -250,7 +250,7 @@ empathy_contact_edit_dialog_show (EmpathyContact *contact,
EMPATHY_CONTACT_WIDGET_EDIT_ALIAS |
EMPATHY_CONTACT_WIDGET_EDIT_GROUPS);
gtk_container_set_border_width (GTK_CONTAINER (contact_widget), 8);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
contact_widget,
TRUE, TRUE, 0);
gtk_widget_show (contact_widget);
@@ -302,7 +302,7 @@ empathy_contact_personal_dialog_show (GtkWindow *parent)
EMPATHY_CONTACT_WIDGET_EDIT_ALIAS |
EMPATHY_CONTACT_WIDGET_EDIT_AVATAR);
gtk_container_set_border_width (GTK_CONTAINER (contact_widget), 8);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (personal_dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (personal_dialog))),
contact_widget,
TRUE, TRUE, 0);
empathy_contact_widget_set_account_filter (contact_widget,
@@ -334,9 +334,11 @@ can_add_contact_to_account (EmpathyAccount *account,
gboolean result;
connection = empathy_account_get_connection (account);
+ if (connection == NULL)
+ return FALSE;
contact_manager = empathy_contact_manager_dup_singleton ();
- result = empathy_contact_manager_can_add (contact_manager, connection);
+ result = empathy_contact_manager_get_flags_for_connection (contact_manager, connection) & EMPATHY_CONTACT_LIST_CAN_ADD;
g_object_unref (contact_manager);
return result;
@@ -366,6 +368,13 @@ new_contact_response_cb (GtkDialog *dialog,
void
empathy_new_contact_dialog_show (GtkWindow *parent)
{
+ empathy_new_contact_dialog_show_with_contact (parent, NULL);
+}
+
+void
+empathy_new_contact_dialog_show_with_contact (GtkWindow *parent,
+ EmpathyContact *contact)
+{
GtkWidget *dialog;
GtkWidget *button;
GtkWidget *contact_widget;
@@ -398,12 +407,12 @@ empathy_new_contact_dialog_show (GtkWindow *parent)
gtk_widget_show (button);
/* Contact info widget */
- contact_widget = empathy_contact_widget_new (NULL,
+ contact_widget = empathy_contact_widget_new (contact,
EMPATHY_CONTACT_WIDGET_EDIT_ALIAS |
EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT |
EMPATHY_CONTACT_WIDGET_EDIT_ID |
EMPATHY_CONTACT_WIDGET_EDIT_GROUPS);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
contact_widget,
TRUE, TRUE, 0);
empathy_contact_widget_set_account_filter (contact_widget,