aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-25 21:44:09 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-02-09 20:22:19 +0800
commitb02e1667ba8c6e2af128ae461de082ea839dff56 (patch)
treed93d5e7e25c090edffa8fefa5e6fde4b6bec61e3
parent5c9ffe720041257034f8d85d1ae5298bbdf10492 (diff)
downloadgsoc2013-empathy-b02e1667ba8c6e2af128ae461de082ea839dff56.tar
gsoc2013-empathy-b02e1667ba8c6e2af128ae461de082ea839dff56.tar.gz
gsoc2013-empathy-b02e1667ba8c6e2af128ae461de082ea839dff56.tar.bz2
gsoc2013-empathy-b02e1667ba8c6e2af128ae461de082ea839dff56.tar.lz
gsoc2013-empathy-b02e1667ba8c6e2af128ae461de082ea839dff56.tar.xz
gsoc2013-empathy-b02e1667ba8c6e2af128ae461de082ea839dff56.tar.zst
gsoc2013-empathy-b02e1667ba8c6e2af128ae461de082ea839dff56.zip
Add a gsetting key to show/hide groups
https://bugzilla.gnome.org/show_bug.cgi?id=627658
-rw-r--r--data/org.gnome.Empathy.gschema.xml.in5
-rw-r--r--libempathy/empathy-gsettings.h1
-rw-r--r--src/empathy-roster-window.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/data/org.gnome.Empathy.gschema.xml.in b/data/org.gnome.Empathy.gschema.xml.in
index 02020e7e2..d107a9b14 100644
--- a/data/org.gnome.Empathy.gschema.xml.in
+++ b/data/org.gnome.Empathy.gschema.xml.in
@@ -88,6 +88,11 @@ present them to the user immediately.</_description>
<_summary>The position for the chat window side pane</_summary>
<_description>The stored position (in pixels) of the chat window side pane.</_description>
</key>
+ <key name="show-groups" type="b">
+ <default>true</default>
+ <_summary>Show contact groups</_summary>
+ <_description>Whether to show groups in the contact list.</_description>
+ </key>
</schema>
<schema id="org.gnome.Empathy.contacts" path="/org/gnome/empathy/contacts/">
<key name="sort-criterium" type="s">
diff --git a/libempathy/empathy-gsettings.h b/libempathy/empathy-gsettings.h
index ad55a9442..6206a549a 100644
--- a/libempathy/empathy-gsettings.h
+++ b/libempathy/empathy-gsettings.h
@@ -77,6 +77,7 @@ G_BEGIN_DECLS
#define EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST "compact-contact-list"
#define EMPATHY_PREFS_UI_CHAT_WINDOW_PANED_POS "chat-window-paned-pos"
#define EMPATHY_PREFS_UI_SHOW_OFFLINE "show-offline"
+#define EMPATHY_PREFS_UI_SHOW_GROUPS "show-groups"
#define EMPATHY_PREFS_CONTACTS_SCHEMA EMPATHY_PREFS_SCHEMA ".contacts"
#define EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM "sort-criterium"
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index 079ac515a..8219f79ab 100644
--- a/src/empathy-roster-window.c
+++ b/src/empathy-roster-window.c
@@ -2634,6 +2634,9 @@ empathy_roster_window_init (EmpathyRosterWindow *self)
self->priv->balance_vbox, "visible",
G_BINDING_SYNC_CREATE);
+ g_settings_bind (self->priv->gsettings_ui, "show-groups",
+ self->priv->individual_store, "show-groups", G_SETTINGS_BIND_DEFAULT);
+
/* Enable event handling */
self->priv->call_observer = empathy_call_observer_dup_singleton ();
self->priv->event_manager = empathy_event_manager_dup_singleton ();