[gnome-commander/get_rid_of_xml] Make save_devices_via_gsettings a private member function of GnomeCmdData class
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/get_rid_of_xml] Make save_devices_via_gsettings a private member function of GnomeCmdData class
- Date: Tue, 20 Nov 2018 06:59:26 +0000 (UTC)
commit 45e072f5ded45ad3fac833a969c188a7b2b0fb73
Author: Uwe Scholz <u scholz83 gmx de>
Date: Sun Nov 18 22:37:53 2018 +0100
Make save_devices_via_gsettings a private member function of GnomeCmdData class
src/gnome-cmd-data.cc | 10 +++++-----
src/gnome-cmd-data.h | 1 +
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 02e7069d..27772ac1 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -1748,9 +1748,9 @@ void GnomeCmdData::save_advrename_profiles (const gchar *fname)
/**
- * Save devices in given gSettings and in given key
+ * Save devices in gSettings
*/
-static void save_devices_via_gsettings(GSettings *gSettings, const char *gSettingsKey)
+void GnomeCmdData::save_devices_via_gsettings()
{
GList *devices;
@@ -1795,7 +1795,7 @@ static void save_devices_via_gsettings(GSettings *gSettings, const char *gSettin
}
}
devicesToStore = g_variant_builder_end (&gVariantBuilder);
- g_settings_set_value(gSettings, gSettingsKey, devicesToStore);
+ g_settings_set_value(options.gcmd_settings->general, GCMD_SETTINGS_DEVICES, devicesToStore);
}
}
@@ -3418,7 +3418,7 @@ void GnomeCmdData::load()
if (load_devices (DEVICES_FILENAME) == FALSE)
load_devices_from_gsettings();
else // This is done for migration to gSettings. Can be deleted in gcmd 1.9.
- save_devices_via_gsettings(options.gcmd_settings->general, GCMD_SETTINGS_DEVICES);
+ save_devices_via_gsettings();
gchar *xml_cfg_path = config_dir ? g_build_filename (config_dir, PACKAGE ".xml", NULL) :
g_build_filename (g_get_home_dir (), "." PACKAGE, PACKAGE ".xml", NULL);
@@ -3807,7 +3807,7 @@ void GnomeCmdData::save()
set_gsettings_string_array_from_glist(options.gcmd_settings->general,
GCMD_SETTINGS_ADVRENAME_TOOL_TEMPLATE_HISTORY, advrename_defaults.templates.ents);
save_tabs_via_gsettings (options.gcmd_settings->general, GCMD_SETTINGS_FILE_LIST_TABS);
- save_devices_via_gsettings (options.gcmd_settings->general, GCMD_SETTINGS_DEVICES);
+ save_devices_via_gsettings ();
save_fav_apps_via_gsettings ();
save_cmdline_history();
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 6ecedc86..90be93e1 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -632,6 +632,7 @@ struct GnomeCmdData
gboolean save_auto_load_plugins();
void save_cmdline_history();
void save_intviewer_defaults();
+ void save_devices_via_gsettings();
void save_fav_apps_via_gsettings();
void set_settings_monitor (const char *file_path);
inline gint get_int (const gchar *path, int def);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]