[gnome-commander/get_rid_of_xml] Add search tool width and height to gSettings
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/get_rid_of_xml] Add search tool width and height to gSettings
- Date: Sun, 30 Dec 2018 17:53:52 +0000 (UTC)
commit 8809416badf2b37b71fe1f4551236c6f4a41fd7d
Author: Uwe Scholz <u scholz83 gmx de>
Date: Sat Dec 15 23:17:15 2018 +0100
Add search tool width and height to gSettings
data/org.gnome.gnome-commander.gschema.xml | 14 ++++++++++++++
src/gnome-cmd-data.cc | 4 ++++
src/gnome-cmd-data.h | 2 ++
3 files changed, 20 insertions(+)
---
diff --git a/data/org.gnome.gnome-commander.gschema.xml b/data/org.gnome.gnome-commander.gschema.xml
index ab281438..988dec88 100644
--- a/data/org.gnome.gnome-commander.gschema.xml
+++ b/data/org.gnome.gnome-commander.gschema.xml
@@ -479,6 +479,20 @@
The entries in this list represent the favorite apps configured by the user.
</description>
</key>
+ <key name="search-win-width" type="u">
+ <default>600</default>
+ <summary>Search window width</summary>
+ <description>
+ This option defines the width of the search window.
+ </description>
+ </key>
+ <key name="search-win-height" type="u">
+ <default>400</default>
+ <summary>Search window height</summary>
+ <description>
+ This option defines the height of the search window.
+ </description>
+ </key>
</schema>
<schema gettext-domain="gnome-commander" id="org.gnome.gnome-commander.preferences.network"
path="/org/gnome/gnome-commander/preferences/network/">
<key name="quick-connect-uri" type="s">
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 8ff3247a..331605ba 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -3091,6 +3091,8 @@ void GnomeCmdData::load()
options.save_dir_history_on_exit = g_settings_get_boolean (options.gcmd_settings->general,
GCMD_SETTINGS_SAVE_DIR_HISTORY_ON_EXIT);
options.save_cmdline_history_on_exit = g_settings_get_boolean (options.gcmd_settings->general,
GCMD_SETTINGS_SAVE_CMDLINE_HISTORY_ON_EXIT);
options.save_search_history_on_exit = g_settings_get_boolean (options.gcmd_settings->general,
GCMD_SETTINGS_SAVE_SEARCH_HISTORY_ON_EXIT);
+ search_defaults.height = g_settings_get_uint(options.gcmd_settings->general,
GCMD_SETTINGS_SEARCH_WIN_HEIGHT);
+ search_defaults.width = g_settings_get_uint(options.gcmd_settings->general,
GCMD_SETTINGS_SEARCH_WIN_WIDTH);
options.always_show_tabs = g_settings_get_boolean (options.gcmd_settings->general,
GCMD_SETTINGS_ALWAYS_SHOW_TABS);
options.tab_lock_indicator = (TabLockIndicator) g_settings_get_enum (options.gcmd_settings->general,
GCMD_SETTINGS_TAB_LOCK_INDICATOR);
@@ -3689,6 +3691,8 @@ void GnomeCmdData::save()
set_gsettings_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_SAVE_DIR_HISTORY_ON_EXIT,
&(options.save_dir_history_on_exit));
set_gsettings_when_changed (options.gcmd_settings->general,
GCMD_SETTINGS_SAVE_CMDLINE_HISTORY_ON_EXIT, &(options.save_cmdline_history_on_exit));
set_gsettings_when_changed (options.gcmd_settings->general,
GCMD_SETTINGS_SAVE_SEARCH_HISTORY_ON_EXIT, &(options.save_search_history_on_exit));
+ set_gsettings_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_SEARCH_WIN_WIDTH,
&(search_defaults.width));
+ set_gsettings_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_SEARCH_WIN_HEIGHT,
&(search_defaults.height));
set_gsettings_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_ALWAYS_SHOW_TABS,
&(options.always_show_tabs));
set_gsettings_enum_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_TAB_LOCK_INDICATOR,
options.tab_lock_indicator);
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 98faa591..145bb69b 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -126,6 +126,8 @@ GcmdSettings *gcmd_settings_new (void);
#define GCMD_SETTINGS_FAV_APPS "favorite-apps"
#define GCMD_SETTINGS_FAV_APPS_FORMAT_STRING "(ssssubbb)"
#define GCMD_SETTINGS_DIRECTORY_HISTORY "directory-history"
+#define GCMD_SETTINGS_SEARCH_WIN_WIDTH "search-win-width"
+#define GCMD_SETTINGS_SEARCH_WIN_HEIGHT "search-win-height"
#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]