From e8c517ab51aa9f61cb68cb26acd9748d0e6c6059 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 11 Nov 2008 15:27:34 +0000 Subject: ContactWidget: set up account widget before avatar widget svn path=/trunk/; revision=1700 --- libempathy-gtk/empathy-contact-widget.c | 47 +++++++++++++++++---------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c index 9f1eb964f..25fc275f4 100644 --- a/libempathy-gtk/empathy-contact-widget.c +++ b/libempathy-gtk/empathy-contact-widget.c @@ -497,29 +497,6 @@ widget_avatar_button_press_event_cb (GtkWidget *widget, static void contact_widget_contact_setup (EmpathyContactWidget *information) { - if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_AVATAR) - { - information->widget_avatar = empathy_avatar_chooser_new (); - g_signal_connect (information->widget_avatar, "changed", - G_CALLBACK (contact_widget_avatar_changed_cb), - information); - } - else - { - information->widget_avatar = empathy_avatar_image_new (); - - g_signal_connect (information->widget_avatar, "popup-menu", - G_CALLBACK (widget_avatar_popup_menu_cb), information); - g_signal_connect (information->widget_avatar, "button-press-event", - G_CALLBACK (widget_avatar_button_press_event_cb), information); - } - - gtk_box_pack_start (GTK_BOX (information->vbox_avatar), - information->widget_avatar, - FALSE, FALSE, - 6); - gtk_widget_show (information->widget_avatar); - /* Setup account label/chooser */ if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_ACCOUNT) { @@ -543,6 +520,30 @@ contact_widget_contact_setup (EmpathyContactWidget *information) 1, 2, 0, 1); gtk_widget_show (information->widget_account); + /* Set up avatar chooser/display */ + if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_AVATAR) + { + information->widget_avatar = empathy_avatar_chooser_new (); + g_signal_connect (information->widget_avatar, "changed", + G_CALLBACK (contact_widget_avatar_changed_cb), + information); + } + else + { + information->widget_avatar = empathy_avatar_image_new (); + + g_signal_connect (information->widget_avatar, "popup-menu", + G_CALLBACK (widget_avatar_popup_menu_cb), information); + g_signal_connect (information->widget_avatar, "button-press-event", + G_CALLBACK (widget_avatar_button_press_event_cb), information); + } + + gtk_box_pack_start (GTK_BOX (information->vbox_avatar), + information->widget_avatar, + FALSE, FALSE, + 6); + gtk_widget_show (information->widget_avatar); + /* Setup id label/entry */ if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_ID) { -- cgit v1.2.3