From a27a6f8621c1f054c39e0ee1c0b8334434b10c97 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 13 Jun 2012 09:45:28 +0200 Subject: 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, 159 deletions(-) diff --git a/data/empathy.convert b/data/empathy.convert index b6a1d2d3a..eabc9e488 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 e7597d7f1..6deaffaf1 100644 --- a/data/org.gnome.Empathy.gschema.xml +++ b/data/org.gnome.Empathy.gschema.xml @@ -48,26 +48,11 @@ Show offline contacts Whether to show contacts that are offline in the contact list. - - true - Show avatars - Whether to show avatars for contacts in the contact list and chat windows. - - - false - Show protocols - Whether to show protocols for contacts in the contact list. - true Show Balance in contact list Whether to show account balances in the contact list. - - false - Compact contact list - Whether to show the contact list in compact mode. - false Hide main window @@ -100,17 +85,6 @@ present them to the user immediately. Whether to show groups in the contact list. - - - 'state' - - - - - Contact list sort criterion - 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. - - true diff --git a/libempathy/empathy-gsettings.h b/libempathy/empathy-gsettings.h index 4178b6728..0a7a18c3e 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 c72c6ae61..923bef0e9 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 a17f00055..4b80b0f95 100644 --- a/src/empathy-preferences.ui +++ b/src/empathy-preferences.ui @@ -44,22 +44,6 @@ 0 - - - Show protocol in avatar - True - True - False - False - 0 - True - - - False - True - 1 - - Show account balances @@ -76,65 +60,6 @@ 2 - - - True - False - 3 - - - True - False - Sort contacts by: - - - False - True - 0 - - - - - status - True - True - False - False - 0 - True - True - - - False - True - 1 - - - - - name - True - True - False - False - 0 - True - True - radiobutton_sort_by_status - - - False - True - 2 - - - - - False - True - 3 - - -- cgit v1.2.3