[gnome-commander/GSettings] Moves gnome_cmd_data_get_int() method into src/gnome-cmd-data.cc, removes unused functions



commit f782a09ea1dd566e8af03408d7b1ead6903937db
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Wed Apr 27 07:00:22 2016 +0200

    Moves gnome_cmd_data_get_int() method into src/gnome-cmd-data.cc, removes unused functions

 libgcmd/libgcmd-data.cc |   12 ------------
 libgcmd/libgcmd-data.h  |    2 --
 src/gnome-cmd-data.cc   |   22 +++++++++++-----------
 src/gnome-cmd-data.h    |    1 +
 4 files changed, 12 insertions(+), 25 deletions(-)
---
diff --git a/libgcmd/libgcmd-data.cc b/libgcmd/libgcmd-data.cc
index 6176be5..46d0106 100644
--- a/libgcmd/libgcmd-data.cc
+++ b/libgcmd/libgcmd-data.cc
@@ -147,18 +147,6 @@ gchar *gnome_cmd_data_get_string (const gchar *path, const gchar *def)
 }
 
 
-gint gnome_cmd_data_get_int (const gchar *path, int def)
-{
-    gchar *s = g_build_path (G_DIR_SEPARATOR_S, PACKAGE, path, NULL);
-
-    gint v = get_int (s, def);
-
-    g_free (s);
-
-    return v;
-}
-
-
 gboolean gnome_cmd_data_get_bool (const gchar *path, gboolean def)
 {
     gchar *s = g_build_path (G_DIR_SEPARATOR_S, PACKAGE, path, NULL);
diff --git a/libgcmd/libgcmd-data.h b/libgcmd/libgcmd-data.h
index e64d5b2..7641ae9 100644
--- a/libgcmd/libgcmd-data.h
+++ b/libgcmd/libgcmd-data.h
@@ -32,8 +32,6 @@ void gnome_cmd_data_set_color (const gchar *path, GdkColor *color);
 
 gchar *gnome_cmd_data_get_string (const gchar *path, const gchar *def);
 
-gint gnome_cmd_data_get_int (const gchar *path, int def);
-
 gboolean gnome_cmd_data_get_bool (const gchar *path, gboolean def);
 
 void gnome_cmd_data_get_color (const gchar *path, GdkColor *color);
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index c169889..3f51708 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -1149,17 +1149,6 @@ inline void GnomeCmdData::save_auto_load_plugins()
 }
 
 
-inline void load_uint_array (const gchar *format, guint *array, gint length)
-{
-    for (gint i=0; i<length; i++)
-    {
-        gchar *name = g_strdup_printf (format, i);
-        array[i] = gnome_cmd_data_get_int (name, array[i]);
-        g_free (name);
-    }
-}
-
-
 inline GList *load_string_history (const gchar *format, gint size)
 {
     GList *list = NULL;
@@ -2093,6 +2082,17 @@ void GnomeCmdData::save()
     gnome_config_sync ();
 }
 
+gint GnomeCmdData::gnome_cmd_data_get_int (const gchar *path, int def)
+{
+    gchar *s = g_build_path (G_DIR_SEPARATOR_S, PACKAGE, path, NULL);
+
+    gint v = get_int (s, def);
+
+    g_free (s);
+
+    return v;
+}
+
 
 GnomeCmdFileList::ColumnID GnomeCmdData::get_sort_col(FileSelectorID id) const
 {
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 25f9aac..fd3c263 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -473,6 +473,7 @@ struct GnomeCmdData
     void load();
     void load_more();
     void save();
+    gint gnome_cmd_data_get_int (const gchar *path, int def);
 
     GnomeCmdConRemote *get_quick_connect() const       {  return quick_connect;                     }
 


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