[gedit] GeditSettings: remove dead code



commit 795185ba853003df5078158838d01055c70e9f8c
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Mar 25 11:38:56 2020 +0100

    GeditSettings: remove dead code

 gedit/gedit-settings.c | 54 --------------------------------------------------
 gedit/gedit-settings.h |  9 ---------
 2 files changed, 63 deletions(-)
---
diff --git a/gedit/gedit-settings.c b/gedit/gedit-settings.c
index dc70582e6..49dc5f4cb 100644
--- a/gedit/gedit-settings.c
+++ b/gedit/gedit-settings.c
@@ -374,60 +374,6 @@ gedit_settings_get_system_font (GeditSettings *self)
        return g_settings_get_string (self->interface, "monospace-font-name");
 }
 
-GSList *
-gedit_settings_get_list (GSettings   *settings,
-                        const gchar *key)
-{
-       GSList *list = NULL;
-       gchar **values;
-       gint i;
-
-       g_return_val_if_fail (G_IS_SETTINGS (settings), NULL);
-       g_return_val_if_fail (key != NULL, NULL);
-
-       values = g_settings_get_strv (settings, key);
-
-       for (i = 0; values[i] != NULL; i++)
-       {
-               list = g_slist_prepend (list, values[i]);
-       }
-
-       g_free (values);
-
-       return g_slist_reverse (list);
-}
-
-void
-gedit_settings_set_list (GSettings    *settings,
-                        const gchar  *key,
-                        const GSList *list)
-{
-       gchar **values = NULL;
-
-       g_return_if_fail (G_IS_SETTINGS (settings));
-       g_return_if_fail (key != NULL);
-
-       if (list != NULL)
-       {
-               gint list_length;
-               gint i;
-               const GSList *l;
-
-               list_length = g_slist_length ((GSList *)list);
-               values = g_new (gchar *, list_length + 1);
-
-               for (l = list, i = 0; l != NULL; l = l->next, i++)
-               {
-                       values[i] = l->data;
-               }
-
-               values[i] = NULL;
-       }
-
-       g_settings_set_strv (settings, key, (const gchar * const *)values);
-       g_free (values);
-}
-
 static gboolean
 strv_is_empty (gchar **strv)
 {
diff --git a/gedit/gedit-settings.h b/gedit/gedit-settings.h
index 06f65a242..e07ced73c 100644
--- a/gedit/gedit-settings.h
+++ b/gedit/gedit-settings.h
@@ -41,15 +41,6 @@ gchar *              gedit_settings_get_system_font                  (GeditSettings *gs);
 
 GSList *       gedit_settings_get_candidate_encodings          (gboolean *default_candidates);
 
-/* Utility functions */
-
-GSList *       gedit_settings_get_list                         (GSettings   *settings,
-                                                                const gchar *key);
-
-void           gedit_settings_set_list                         (GSettings    *settings,
-                                                                const gchar  *key,
-                                                                const GSList *list);
-
 /* key constants */
 #define GEDIT_SETTINGS_USE_DEFAULT_FONT                        "use-default-font"
 #define GEDIT_SETTINGS_EDITOR_FONT                     "editor-font"


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