From a2b853f3f87579d32a835c22bfcdedeab965df8c Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 29 Aug 2013 11:49:48 +0200 Subject: roster-group: inherit from GtkListBoxRow Need to be pack in a GtkListBox. https://bugzilla.gnome.org/show_bug.cgi?id=706988 --- libempathy-gtk/empathy-roster-group.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libempathy-gtk/empathy-roster-group.c') diff --git a/libempathy-gtk/empathy-roster-group.c b/libempathy-gtk/empathy-roster-group.c index 9ca53a8e9..753655ab5 100644 --- a/libempathy-gtk/empathy-roster-group.c +++ b/libempathy-gtk/empathy-roster-group.c @@ -3,7 +3,7 @@ #include -G_DEFINE_TYPE (EmpathyRosterGroup, empathy_roster_group, GTK_TYPE_EXPANDER) +G_DEFINE_TYPE (EmpathyRosterGroup, empathy_roster_group, GTK_TYPE_LIST_BOX_ROW) enum { @@ -116,7 +116,7 @@ empathy_roster_group_constructed (GObject *object) gtk_widget_show_all (box); - gtk_expander_set_label_widget (GTK_EXPANDER (self), box); + gtk_expander_set_label_widget (self->expander, box); } static void @@ -181,6 +181,13 @@ empathy_roster_group_init (EmpathyRosterGroup *self) EMPATHY_TYPE_ROSTER_GROUP, EmpathyRosterGroupPriv); self->priv->widgets = g_hash_table_new (NULL, NULL); + + self->expander = GTK_EXPANDER (gtk_expander_new (NULL)); + gtk_expander_set_use_markup (self->expander, TRUE); + gtk_expander_set_expanded (self->expander, TRUE); + gtk_widget_show (GTK_WIDGET (self->expander)); + + gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->expander)); } GtkWidget * @@ -190,8 +197,6 @@ empathy_roster_group_new (const gchar *name, return g_object_new (EMPATHY_TYPE_ROSTER_GROUP, "name", name, "icon", icon, - "use-markup", TRUE, - "expanded", TRUE, NULL); } -- cgit v1.2.3