]> git.0d.be Git - empathy.git/commitdiff
remove deprecated gsettings keys
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 13 Jun 2012 07:45:28 +0000 (09:45 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 15 Jun 2012 11:45:47 +0000 (13:45 +0200)
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
data/org.gnome.Empathy.gschema.xml
libempathy/empathy-gsettings.h
src/empathy-preferences.c
src/empathy-preferences.ui

index b6a1d2d3aad60a0bf58fdd0505f5805fc23903de..eabc9e488ca868c28fb26292320eb898039bd445 100644 (file)
@@ -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
index e7597d7f1cbaaa2d0f5100e393b79487e586b565..6deaffaf135ac5e17e925de1bc9aba7a1a4373b2 100644 (file)
       <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>
index 4178b6728787835984f6fbdd3be10d1df3825448..0a7a18c3ed81171ceb50af64c9eb85eb88a820c3 100644 (file)
@@ -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"
 
index c72c6ae6164c81f33602a19ec544dc89f7d8b64b..923bef0e987b3a2720f0570d5f47018c501306da 100644 (file)
@@ -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 ();
index a17f0005551aabf39bdc0c89547382ebaf1c1a9b..4b80b0f958f73879be17d6a8d8c3cc317dbcac0a 100644 (file)
                         <property name="position">0</property>
                       </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="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>