diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-08-30 20:11:20 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-08-30 20:12:25 +0800 |
commit | 52d535121a9cbeebd182c144a984122c5973a7db (patch) | |
tree | 2b01b9aa842151001c98ee9f0563cc8aa5d9f765 /libempathy-gtk | |
parent | c11c1cb31e7b46f89de4fd41f9d75f2731c5ded0 (diff) | |
download | gsoc2013-empathy-52d535121a9cbeebd182c144a984122c5973a7db.tar gsoc2013-empathy-52d535121a9cbeebd182c144a984122c5973a7db.tar.gz gsoc2013-empathy-52d535121a9cbeebd182c144a984122c5973a7db.tar.bz2 gsoc2013-empathy-52d535121a9cbeebd182c144a984122c5973a7db.tar.lz gsoc2013-empathy-52d535121a9cbeebd182c144a984122c5973a7db.tar.xz gsoc2013-empathy-52d535121a9cbeebd182c144a984122c5973a7db.tar.zst gsoc2013-empathy-52d535121a9cbeebd182c144a984122c5973a7db.zip |
roster-view: remember state expanded status of groups
Pretty simple actually, that's a simple port of the logic from
empathy-individual-view.
https://bugzilla.gnome.org/show_bug.cgi?id=679259
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-roster-view.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c index 4ad2d16ef..00544fbb0 100644 --- a/libempathy-gtk/empathy-roster-view.c +++ b/libempathy-gtk/empathy-roster-view.c @@ -4,6 +4,8 @@ #include <glib/gi18n-lib.h> +#include <libempathy/empathy-contact-groups.h> + #include <libempathy-gtk/empathy-roster-contact.h> #include <libempathy-gtk/empathy-roster-group.h> #include <libempathy-gtk/empathy-ui-utils.h> @@ -200,6 +202,9 @@ group_expanded_cb (EmpathyRosterGroup *group, } g_list_free (widgets); + + empathy_contact_group_set_expanded (empathy_roster_group_get_name (group), + gtk_expander_get_expanded (GTK_EXPANDER (group))); } static EmpathyRosterGroup * @@ -226,6 +231,9 @@ ensure_roster_group (EmpathyRosterView *self, else roster_group = empathy_roster_group_new (group, NULL); + gtk_expander_set_expanded (GTK_EXPANDER (roster_group), + empathy_contact_group_get_expanded (group)); + g_signal_connect (roster_group, "notify::expanded", G_CALLBACK (group_expanded_cb), self); @@ -932,6 +940,9 @@ empathy_roster_view_constructed (GObject *object) g_assert (EMPATHY_IS_ROSTER_MODEL (self->priv->model)); + /* Get saved group states. */ + empathy_contact_groups_get_all (); + populate_view (self); tp_g_signal_connect_object (self->priv->model, "individual-added", |