[gnome-commander/GSettings] Adds //save_dir_history_on_exit to GSettings (now known as save-dir-history-on-exit)
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/GSettings] Adds //save_dir_history_on_exit to GSettings (now known as save-dir-history-on-exit)
- Date: Wed, 8 Jun 2016 19:52:22 +0000 (UTC)
commit 478fd24fbf55fa8fa6c1dccf7b3a8af24b25678a
Author: Uwe Scholz <uwescholz src gnome org>
Date: Wed Jun 8 21:51:49 2016 +0200
Adds //save_dir_history_on_exit to GSettings (now known as save-dir-history-on-exit)
data/org.gnome.gnome-commander.gschema.xml | 6 ++++--
src/gnome-cmd-data.cc | 7 +++++--
src/gnome-cmd-data.h | 1 +
3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/data/org.gnome.gnome-commander.gschema.xml b/data/org.gnome.gnome-commander.gschema.xml
index 29e045f..613b110 100644
--- a/data/org.gnome.gnome-commander.gschema.xml
+++ b/data/org.gnome.gnome-commander.gschema.xml
@@ -296,8 +296,10 @@
</key>
<key name="save-dir-history-on-exit" type="b">
<default l10n="messages">true</default>
- <summary></summary>
- <description></description>
+ <summary>Save directory history on exit</summary>
+ <description>
+ Defines if the history of visited directories is saved on exit.
+ </description>
</key>
<key name="always-show-tabs" type="b">
<default l10n="messages">false</default>
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 066a7a6..18e1e0f 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -1894,6 +1894,9 @@ void GnomeCmdData::migrate_all_data_to_gsettings()
//save_tabs_on_exit
migrate_data_int_value_into_gsettings(gnome_cmd_data_get_bool ("/options/save_tabs_on_exit", TRUE) ?
1 : 0,
options.gcmd_settings->general,
GCMD_SETTINGS_SAVE_TABS_ON_EXIT);
+ //save_dir_history_on_exit
+ migrate_data_int_value_into_gsettings(gnome_cmd_data_get_bool ("/options/save_dir_history_on_exit",
TRUE) ? 1 : 0,
+ options.gcmd_settings->general,
GCMD_SETTINGS_SAVE_DIR_HISTORY_ON_EXIT);
// ToDo: Move old xml-file to ~/.gnome-commander/gnome-commander.xml.backup
// à la save_devices_old ("devices.backup");
// and move .gnome2/gnome-commander to .gnome2/gnome-commander.backup
@@ -2131,7 +2134,7 @@ void GnomeCmdData::load()
options.save_dirs_on_exit = g_settings_get_boolean (options.gcmd_settings->general,
GCMD_SETTINGS_SAVE_DIRS_ON_EXIT);
options.save_tabs_on_exit = g_settings_get_boolean (options.gcmd_settings->general,
GCMD_SETTINGS_SAVE_TABS_ON_EXIT);
- options.save_dir_history_on_exit = gnome_cmd_data_get_bool ("/options/save_dir_history_on_exit", TRUE);
+ options.save_dir_history_on_exit = g_settings_get_boolean (options.gcmd_settings->general,
GCMD_SETTINGS_SAVE_DIR_HISTORY_ON_EXIT);
options.always_show_tabs = gnome_cmd_data_get_bool ("/options/always_show_tabs", FALSE);
options.tab_lock_indicator = (TabLockIndicator) gnome_cmd_data_get_int ("/options/tab_lock_indicator",
TAB_LOCK_ICON);
@@ -2663,7 +2666,7 @@ void GnomeCmdData::save()
set_gsettings_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_SAVE_DIRS_ON_EXIT,
&(options.save_dirs_on_exit));
set_gsettings_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_SAVE_TABS_ON_EXIT,
&(options.save_tabs_on_exit));
- gnome_cmd_data_set_bool ("/options/save_dir_history_on_exit", options.save_dir_history_on_exit);
+ set_gsettings_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_SAVE_DIR_HISTORY_ON_EXIT,
&(options.save_dir_history_on_exit));
gnome_cmd_data_set_bool ("/options/always_show_tabs", options.always_show_tabs);
gnome_cmd_data_set_int ("/options/tab_lock_indicator", (int) options.tab_lock_indicator);
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 58982c8..dfd55d7 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -85,6 +85,7 @@ GcmdSettings *gcmd_settings_new (void);
#define GCMD_SETTINGS_MAIN_WIN_POS_Y "main-win-pos-y"
#define GCMD_SETTINGS_SAVE_DIRS_ON_EXIT "save-dirs-on-exit"
#define GCMD_SETTINGS_SAVE_TABS_ON_EXIT "save-tabs-on-exit"
+#define GCMD_SETTINGS_SAVE_DIR_HISTORY_ON_EXIT "save-dir-history-on-exit"
#define GCMD_PREF_FILTER "org.gnome.gnome-commander.preferences.filter"
#define GCMD_SETTINGS_FILTER_HIDE_UNKNOWN "hide-unknown"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]