aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-09-04 21:55:33 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-09-04 22:31:13 +0800
commit0e9e3cf651969dc4b4e82ddade02a02ca0ba1e5d (patch)
tree51e7c6551bb502e5b0af191653540acadc2bcf83
parent1c2c4983ab5a54b87c8e028202318505c8d0eed1 (diff)
downloadgsoc2013-empathy-0e9e3cf651969dc4b4e82ddade02a02ca0ba1e5d.tar
gsoc2013-empathy-0e9e3cf651969dc4b4e82ddade02a02ca0ba1e5d.tar.gz
gsoc2013-empathy-0e9e3cf651969dc4b4e82ddade02a02ca0ba1e5d.tar.bz2
gsoc2013-empathy-0e9e3cf651969dc4b4e82ddade02a02ca0ba1e5d.tar.lz
gsoc2013-empathy-0e9e3cf651969dc4b4e82ddade02a02ca0ba1e5d.tar.xz
gsoc2013-empathy-0e9e3cf651969dc4b4e82ddade02a02ca0ba1e5d.tar.zst
gsoc2013-empathy-0e9e3cf651969dc4b4e82ddade02a02ca0ba1e5d.zip
roster-contact: inherit from GtkListBoxRow
Need to be pack in a GtkListBox. https://bugzilla.gnome.org/show_bug.cgi?id=706988
-rw-r--r--libempathy-gtk/empathy-roster-contact.c15
-rw-r--r--libempathy-gtk/empathy-roster-contact.h4
2 files changed, 10 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-roster-contact.c b/libempathy-gtk/empathy-roster-contact.c
index 328b51240..df57a87fb 100644
--- a/libempathy-gtk/empathy-roster-contact.c
+++ b/libempathy-gtk/empathy-roster-contact.c
@@ -8,7 +8,7 @@
#include "empathy-ui-utils.h"
#include "empathy-utils.h"
-G_DEFINE_TYPE (EmpathyRosterContact, empathy_roster_contact, GTK_TYPE_ALIGNMENT)
+G_DEFINE_TYPE (EmpathyRosterContact, empathy_roster_contact, GTK_TYPE_LIST_BOX_ROW)
#define AVATAR_SIZE 48
@@ -391,12 +391,16 @@ empathy_roster_contact_class_init (
static void
empathy_roster_contact_init (EmpathyRosterContact *self)
{
- GtkWidget *main_box, *box, *first_line_box;
+ GtkWidget *alig, *main_box, *box, *first_line_box;
GtkStyleContext *context;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
EMPATHY_TYPE_ROSTER_CONTACT, EmpathyRosterContactPriv);
+ alig = gtk_alignment_new (0.5, 0.5, 1, 1);
+ gtk_widget_show (alig);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (alig), 4, 4, 4, 12);
+
main_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
/* Avatar */
@@ -454,7 +458,8 @@ empathy_roster_contact_init (EmpathyRosterContact *self)
FALSE, FALSE, 0);
gtk_widget_show (self->priv->presence_icon);
- gtk_container_add (GTK_CONTAINER (self), main_box);
+ gtk_container_add (GTK_CONTAINER (self), alig);
+ gtk_container_add (GTK_CONTAINER (alig), main_box);
gtk_widget_show (main_box);
}
@@ -467,10 +472,6 @@ empathy_roster_contact_new (FolksIndividual *individual,
return g_object_new (EMPATHY_TYPE_ROSTER_CONTACT,
"individual", individual,
"group", group,
- "bottom-padding", 4,
- "top-padding", 4,
- "left-padding", 4,
- "right-padding", 12,
NULL);
}
diff --git a/libempathy-gtk/empathy-roster-contact.h b/libempathy-gtk/empathy-roster-contact.h
index 7b87e76d4..6e05959f7 100644
--- a/libempathy-gtk/empathy-roster-contact.h
+++ b/libempathy-gtk/empathy-roster-contact.h
@@ -13,13 +13,13 @@ typedef struct _EmpathyRosterContactPriv EmpathyRosterContactPriv;
struct _EmpathyRosterContactClass
{
/*<private>*/
- GtkAlignmentClass parent_class;
+ GtkListBoxRowClass parent_class;
};
struct _EmpathyRosterContact
{
/*<private>*/
- GtkAlignment parent;
+ GtkListBoxRow parent;
EmpathyRosterContactPriv *priv;
};