GtkWidget *vbox_avatar;
GtkWidget *favourite_checkbox;
GtkWidget *label_details;
+ GtkWidget *label_left_account;
/* Location */
GtkWidget *vbox_location;
contact_widget_change_contact, information);
}
}
- else
+ else if ((information->flags & EMPATHY_CONTACT_WIDGET_NO_ACCOUNT) == 0)
{
if (account)
{
G_CALLBACK (contact_widget_change_contact),
information);
}
+ else if (information->flags & EMPATHY_CONTACT_WIDGET_NO_ACCOUNT)
+ {
+ /* Don't display the account */
+ gtk_widget_hide (information->label_left_account);
+ }
else
{
/* Pack the protocol icon with the account name in an hbox */
information->label_account, FALSE, TRUE, 0);
}
- gtk_grid_attach (GTK_GRID (information->grid_contact),
- information->widget_account,
- 1, 0, 1, 1);
+ if (information->widget_account != NULL)
+ {
+ gtk_grid_attach (GTK_GRID (information->grid_contact),
+ information->widget_account,
+ 1, 0, 1, 1);
- gtk_widget_show (information->widget_account);
+ gtk_widget_show (information->widget_account);
+ }
/* Set up avatar chooser/display */
if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_AVATAR)
"grid_client", &information->grid_client,
"hbox_client_requested", &information->hbox_client_requested,
"label_details", &information->label_details,
+ "label_left_account", &information->label_left_account,
NULL);
g_free (filename);
EMPATHY_CONTACT_WIDGET_SHOW_DETAILS = 1 << 8,
EMPATHY_CONTACT_WIDGET_EDIT_DETAILS = 1 << 9,
EMPATHY_CONTACT_WIDGET_NO_STATUS = 1 << 10,
+ EMPATHY_CONTACT_WIDGET_NO_ACCOUNT = 1 << 11,
} EmpathyContactWidgetFlags;
GtkWidget * empathy_contact_widget_new (EmpathyContact *contact,
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
- <object class="GtkLabel" id="label680">
+ <object class="GtkLabel" id="label_left_account">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Account:</property>
EMPATHY_CONTACT_WIDGET_EDIT_ALIAS |
EMPATHY_CONTACT_WIDGET_EDIT_AVATAR |
EMPATHY_CONTACT_WIDGET_NO_STATUS |
- EMPATHY_CONTACT_WIDGET_EDIT_DETAILS);
+ EMPATHY_CONTACT_WIDGET_EDIT_DETAILS |
+ EMPATHY_CONTACT_WIDGET_NO_ACCOUNT);
gtk_box_pack_start (GTK_BOX (priv->dialog_content), alig, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (alig), editor);