]> git.0d.be Git - empathy.git/commitdiff
Add a gsetting key to show/hide groups
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 25 Nov 2011 13:44:09 +0000 (14:44 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 9 Feb 2012 12:22:19 +0000 (13:22 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=627658

data/org.gnome.Empathy.gschema.xml.in
libempathy/empathy-gsettings.h
src/empathy-roster-window.c

index 02020e7e2f81d3dd3de488f92f964f63d7a8f02f..d107a9b14d288dafbe63e62c84593cc500cadde1 100644 (file)
@@ -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">
index ad55a9442d377fbcd369fb432d26583d63468064..6206a549a381ce38d1206c5a85e8a4f879f5531e 100644 (file)
@@ -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"
index 079ac515ae0038cb013e19f8595787962ffd392e..8219f79abaa6d54ac23c8a3fa7d6768cda9d8682 100644 (file)
@@ -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 ();