[empathy] remove deprecated gsettings keys



commit a27a6f8621c1f054c39e0ee1c0b8334434b10c97
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Jun 13 09:45:28 2012 +0200

    remove deprecated gsettings keys
    
    Those are not supported by the new roster UI and so can be removed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677949

 data/empathy.convert               |    7 ---
 data/org.gnome.Empathy.gschema.xml |   26 ------------
 libempathy/empathy-gsettings.h     |    6 ---
 src/empathy-preferences.c          |   45 ---------------------
 src/empathy-preferences.ui         |   75 ------------------------------------
 5 files changed, 0 insertions(+), 159 deletions(-)
---
diff --git a/data/empathy.convert b/data/empathy.convert
index b6a1d2d..eabc9e4 100644
--- a/data/empathy.convert
+++ b/data/empathy.convert
@@ -9,19 +9,12 @@ file-transfer-default-folder = /apps/empathy/file_transfer_default_folder
   
 [org.gnome.Empathy.ui]
 show-offline = /apps/empathy/ui/show_offline
-show-avatars = /apps/empathy/ui/show_avatars
-show-protocols = /apps/empathy/ui/show_protocols
-compact-contact-list = /apps/empathy/ui/compact_contact_list
 main-window-hidden = /apps/empathy/ui/main_window_hidden
 avatar-directory = /apps/empathy/ui/avatar_directory
 separate-chat-windows = /apps/empathy/ui/separate_chat_windows
 chat-window-paned-pos = /apps/empathy/ui/chat_window_paned_pos
 
   
-[org.gnome.Empathy.contacts]
-sort-criterium = /apps/empathy/contacts/sort_criterium
-
-  
 [org.gnome.Empathy.sounds]
 sounds-enabled = /apps/empathy/sounds/sounds_enabled
 sounds-disabled-away = /apps/empathy/sounds/sounds_disabled_away
diff --git a/data/org.gnome.Empathy.gschema.xml b/data/org.gnome.Empathy.gschema.xml
index e7597d7..6deaffa 100644
--- a/data/org.gnome.Empathy.gschema.xml
+++ b/data/org.gnome.Empathy.gschema.xml
@@ -48,26 +48,11 @@
       <summary>Show offline contacts</summary>
       <description>Whether to show contacts that are offline in the contact list.</description>
     </key>
-    <key name="show-avatars" type="b">
-      <default>true</default>
-      <summary>Show avatars</summary>
-      <description>Whether to show avatars for contacts in the contact list and chat windows.</description>
-    </key>
-    <key name="show-protocols" type="b">
-      <default>false</default>
-      <summary>Show protocols</summary>
-      <description>Whether to show protocols for contacts in the contact list.</description>
-    </key>
     <key name="show-balance-in-roster" type="b">
       <default>true</default>
       <summary>Show Balance in contact list</summary>
       <description>Whether to show account balances in the contact list.</description>
     </key>
-    <key name="compact-contact-list" type="b">
-      <default>false</default>
-      <summary>Compact contact list</summary>
-      <description>Whether to show the contact list in compact mode.</description>
-    </key>
     <key name="main-window-hidden" type="b">
       <default>false</default>
       <summary>Hide main window</summary>
@@ -100,17 +85,6 @@ present them to the user immediately.</description>
       <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">
-      <default>'state'</default>
-      <choices>
-        <choice value='state'/>
-        <choice value='name'/>
-      </choices>
-      <summary>Contact list sort criterion</summary>
-      <description>Which criterion to use when sorting the contact list. Default is to sort by the contact's state with the value "state". A value of "name" will sort the contact list by name.</description>
-    </key>
-  </schema>
   <schema id="org.gnome.Empathy.sounds" path="/org/gnome/empathy/sounds/">
     <key name="sounds-enabled" type="b">
       <default>true</default>
diff --git a/libempathy/empathy-gsettings.h b/libempathy/empathy-gsettings.h
index 4178b67..0a7a18c 100644
--- a/libempathy/empathy-gsettings.h
+++ b/libempathy/empathy-gsettings.h
@@ -74,17 +74,11 @@ G_BEGIN_DECLS
 #define EMPATHY_PREFS_UI_EVENTS_NOTIFY_AREA        "events-notify-area"
 #define EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN        "main-window-hidden"
 #define EMPATHY_PREFS_UI_AVATAR_DIRECTORY          "avatar-directory"
-#define EMPATHY_PREFS_UI_SHOW_AVATARS              "show-avatars"
-#define EMPATHY_PREFS_UI_SHOW_PROTOCOLS            "show-protocols"
 #define EMPATHY_PREFS_UI_SHOW_BALANCES             "show-balance-in-roster"
-#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"
-
 #define EMPATHY_PREFS_HINTS_SCHEMA EMPATHY_PREFS_SCHEMA ".hints"
 #define EMPATHY_PREFS_HINTS_CLOSE_MAIN_WINDOW      "close-main-window"
 
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index c72c6ae..923bef0 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -86,7 +86,6 @@ struct _EmpathyPreferencesPriv {
 	GSettings *gsettings_sound;
 	GSettings *gsettings_ui;
 	GSettings *gsettings_logger;
-	GSettings *gsettings_contacts;
 };
 
 static void     preferences_setup_widgets                (EmpathyPreferences      *preferences,
@@ -152,36 +151,6 @@ static SoundEventEntry sound_entries [] = {
 	{ N_("Account disconnected"), EMPATHY_PREFS_SOUNDS_SERVICE_LOGOUT }
 };
 
-static gboolean
-sort_criterium_get_mapping (GValue *value,
-			    GVariant *variant,
-			    gpointer user_data)
-{
-	const char *s = g_variant_get_string (variant, NULL);
-
-	if (!tp_strdiff (s, "state"))
-		g_value_set_boolean (value, TRUE);
-	else if (!tp_strdiff (s, "name"))
-		g_value_set_boolean (value, FALSE);
-	else
-		return FALSE;
-
-	return TRUE;
-}
-
-static GVariant *
-sort_criterium_set_mapping (const GValue *value,
-			    const GVariantType *expected_type,
-			    gpointer user_data)
-{
-	gboolean b = g_value_get_boolean (value);
-
-	if (b)
-		return g_variant_new_string ("state");
-	else
-		return g_variant_new_string ("name");
-}
-
 static void
 preferences_setup_widgets (EmpathyPreferences *preferences,
 			   GtkBuilder *gui)
@@ -210,8 +179,6 @@ preferences_setup_widgets (EmpathyPreferences *preferences,
 
 	BIND_ACTIVE (ui, UI_SHOW_OFFLINE,
 		     "checkbutton_show_offline");
-	BIND_ACTIVE (ui, UI_SHOW_PROTOCOLS,
-		     "checkbutton_show_protocols");
 	BIND_ACTIVE (ui, UI_SEPARATE_CHAT_WINDOWS,
 		     "radiobutton_chats_new_windows");
 	BIND_ACTIVE (ui, UI_EVENTS_NOTIFY_AREA,
@@ -280,16 +247,6 @@ preferences_setup_widgets (EmpathyPreferences *preferences,
 				 		 "checkbutton_autoconnect"),
 			 "active",
 			 G_SETTINGS_BIND_DEFAULT);
-
-	g_settings_bind_with_mapping (priv->gsettings_contacts,
-			 EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM,
-			 gtk_builder_get_object (gui,
-				 		 "radiobutton_sort_by_status"),
-			 "active",
-			 G_SETTINGS_BIND_DEFAULT,
-			 sort_criterium_get_mapping,
-			 sort_criterium_set_mapping,
-			 NULL, NULL);
 }
 
 static void
@@ -1075,7 +1032,6 @@ empathy_preferences_finalize (GObject *self)
 	g_object_unref (priv->gsettings_sound);
 	g_object_unref (priv->gsettings_ui);
 	g_object_unref (priv->gsettings_logger);
-	g_object_unref (priv->gsettings_contacts);
 
 	G_OBJECT_CLASS (empathy_preferences_parent_class)->finalize (self);
 }
@@ -1140,7 +1096,6 @@ empathy_preferences_init (EmpathyPreferences *preferences)
 	priv->gsettings_sound = g_settings_new (EMPATHY_PREFS_SOUNDS_SCHEMA);
 	priv->gsettings_ui = g_settings_new (EMPATHY_PREFS_UI_SCHEMA);
 	priv->gsettings_logger = g_settings_new (EMPATHY_PREFS_LOGGER_SCHEMA);
-	priv->gsettings_contacts = g_settings_new (EMPATHY_PREFS_CONTACTS_SCHEMA);
 
 	/* Create chat theme preview, and track changes */
 	priv->theme_manager = empathy_theme_manager_dup_singleton ();
diff --git a/src/empathy-preferences.ui b/src/empathy-preferences.ui
index a17f000..4b80b0f 100644
--- a/src/empathy-preferences.ui
+++ b/src/empathy-preferences.ui
@@ -45,22 +45,6 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" id="checkbutton_show_protocols">
-                        <property name="label" translatable="yes">Show protocol in avatar</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="use_action_appearance">False</property>
-                        <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
                       <object class="GtkCheckButton" id="checkbutton_show_balances">
                         <property name="label" translatable="yes">Show account balances</property>
                         <property name="visible">True</property>
@@ -76,65 +60,6 @@
                         <property name="position">2</property>
                       </packing>
                     </child>
-                    <child>
-                      <object class="GtkBox" id="box3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">3</property>
-                        <child>
-                          <object class="GtkLabel" id="label9">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">Sort contacts by:</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkRadioButton" id="radiobutton_sort_by_status">
-                            <property name="label" translatable="yes">status</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="xalign">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkRadioButton" id="radiobutton_sort_by_name">
-                            <property name="label" translatable="yes">name</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="xalign">0</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <property name="group">radiobutton_sort_by_status</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">True</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">True</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
                   </object>
                 </child>
               </object>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]