[gnome-commander/GSettings] Moves set_int and gnome_cmd_data_set_int methods into GnomeCmdData class



commit 9e7b1eedc8df3f0b709f6b471cbdeee8f6870f13
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sun May 15 19:24:52 2016 +0200

    Moves set_int and gnome_cmd_data_set_int methods into GnomeCmdData class

 libgcmd/libgcmd-data.cc |   14 --------------
 src/gnome-cmd-data.cc   |   16 ++++++++++++++++
 src/gnome-cmd-data.h    |    2 ++
 3 files changed, 18 insertions(+), 14 deletions(-)
---
diff --git a/libgcmd/libgcmd-data.cc b/libgcmd/libgcmd-data.cc
index b811d25..6ea531b 100644
--- a/libgcmd/libgcmd-data.cc
+++ b/libgcmd/libgcmd-data.cc
@@ -29,11 +29,6 @@ inline void set_string (const gchar *path, const gchar *value)
     gnome_config_set_string (path, value);
 }
 
-inline void set_int (const gchar *path, int value)
-{
-    gnome_config_set_int (path, value);
-}
-
 inline void set_bool (const gchar *path, gboolean value)
 {
     gnome_config_set_bool (path, value);
@@ -97,15 +92,6 @@ void gnome_cmd_data_set_string (const gchar *path, const gchar *value)
 }
 
 
-void gnome_cmd_data_set_int (const gchar *path, int value)
-{
-    gchar *s = g_build_path (G_DIR_SEPARATOR_S, PACKAGE, path, NULL);
-
-    set_int (s, value);
-
-    g_free (s);
-}
-
 void gnome_cmd_data_set_bool (const gchar *path, gboolean value)
 {
     gchar *s = g_build_path (G_DIR_SEPARATOR_S, PACKAGE, path, NULL);
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 7f70f90..cb57972 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -350,6 +350,12 @@ inline gint GnomeCmdData::get_int (const gchar *path, int def)
 }
 
 
+inline void GnomeCmdData::set_int (const gchar *path, int value)
+{
+    gnome_config_set_int (path, value);
+}
+
+
 inline XML::xstream &operator << (XML::xstream &xml, GnomeCmdBookmark &bookmark)
 {
     xml << XML::tag("Bookmark") << XML::attr("name") << XML::escape(bookmark.name);
@@ -2317,6 +2323,16 @@ gint GnomeCmdData::gnome_cmd_data_get_int (const gchar *path, int def)
 }
 
 
+void GnomeCmdData::gnome_cmd_data_set_int (const gchar *path, int value)
+{
+    gchar *s = g_build_path (G_DIR_SEPARATOR_S, PACKAGE, path, NULL);
+
+    set_int (s, value);
+
+    g_free (s);
+}
+
+
 GnomeCmdFileList::ColumnID GnomeCmdData::get_sort_col(FileSelectorID id) const
 {
     return (GnomeCmdFileList::ColumnID) priv->sort_column[id];
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 7b03049..5949f04 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -453,6 +453,7 @@ struct GnomeCmdData
     void save_cmdline_history();
     void save_intviewer_defaults();
     inline gint get_int (const gchar *path, int def);
+    inline void set_int (const gchar *path, int value);
 
   public:
 
@@ -505,6 +506,7 @@ struct GnomeCmdData
     void load_more();
     void save();
     gint gnome_cmd_data_get_int (const gchar *path, int def);
+    void gnome_cmd_data_set_int (const gchar *path, int value);
 
     GnomeCmdConRemote *get_quick_connect() const       {  return quick_connect;                     }
 


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