aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-roster-contact.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-04 22:13:37 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-14 15:21:49 +0800
commit4e7a495826259c861506acfe87a376b51d450643 (patch)
tree5e4dfee11e6a472d288276f1dd2d0a3ada43978a /libempathy-gtk/empathy-roster-contact.c
parent32e517b2bc225ad56de043e79278374994c099ad (diff)
downloadgsoc2013-empathy-4e7a495826259c861506acfe87a376b51d450643.tar
gsoc2013-empathy-4e7a495826259c861506acfe87a376b51d450643.tar.gz
gsoc2013-empathy-4e7a495826259c861506acfe87a376b51d450643.tar.bz2
gsoc2013-empathy-4e7a495826259c861506acfe87a376b51d450643.tar.lz
gsoc2013-empathy-4e7a495826259c861506acfe87a376b51d450643.tar.xz
gsoc2013-empathy-4e7a495826259c861506acfe87a376b51d450643.tar.zst
gsoc2013-empathy-4e7a495826259c861506acfe87a376b51d450643.zip
roster-contact: some sizing fixes
- Don't force a minimal size - Ellipsize the labels so they don't enlarge the window - Make sure the label is always aligned on the left (needed when it's wrapped)
Diffstat (limited to 'libempathy-gtk/empathy-roster-contact.c')
-rw-r--r--libempathy-gtk/empathy-roster-contact.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-roster-contact.c b/libempathy-gtk/empathy-roster-contact.c
index 3025adb4b..ef3d9ec79 100644
--- a/libempathy-gtk/empathy-roster-contact.c
+++ b/libempathy-gtk/empathy-roster-contact.c
@@ -385,8 +385,6 @@ empathy_roster_contact_init (EmpathyRosterContact *self)
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
EMPATHY_TYPE_ROSTER_CONTACT, EmpathyRosterContactPriv);
- gtk_widget_set_size_request (GTK_WIDGET (self), 300, -1);
-
main_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
/* Avatar */
@@ -402,8 +400,10 @@ empathy_roster_contact_init (EmpathyRosterContact *self)
first_line_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
self->priv->alias = gtk_label_new (NULL);
+ gtk_label_set_ellipsize (GTK_LABEL (self->priv->alias), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (first_line_box), self->priv->alias,
FALSE, FALSE, 0);
+ gtk_misc_set_alignment (GTK_MISC (self->priv->alias), 0, 0.5);
gtk_widget_show (self->priv->alias);
self->priv->phone_icon = gtk_image_new_from_icon_name ("phone-symbolic",
@@ -425,6 +425,8 @@ empathy_roster_contact_init (EmpathyRosterContact *self)
/* Presence */
self->priv->presence_msg = gtk_label_new (NULL);
+ gtk_label_set_ellipsize (GTK_LABEL (self->priv->presence_msg),
+ PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (box), self->priv->presence_msg, TRUE, TRUE, 0);
gtk_widget_show (self->priv->presence_msg);