[gnome-commander/GSettings] Adds icon_scale_quality option to GSettings (now known as icon-scale-quality)
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/GSettings] Adds icon_scale_quality option to GSettings (now known as icon-scale-quality)
- Date: Sun, 22 May 2016 14:11:13 +0000 (UTC)
commit f337843d1e8fb607342b521933c23e70494cdf5b
Author: Uwe Scholz <uwescholz src gnome org>
Date: Sun May 22 16:07:41 2016 +0200
Adds icon_scale_quality option to GSettings (now known as icon-scale-quality)
data/org.gnome.gnome-commander.gschema.xml | 15 +++++++++++----
src/gnome-cmd-data.cc | 7 +++++--
src/gnome-cmd-data.h | 1 +
3 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/data/org.gnome.gnome-commander.gschema.xml b/data/org.gnome.gnome-commander.gschema.xml
index 4effdbf..8ce44fc 100644
--- a/data/org.gnome.gnome-commander.gschema.xml
+++ b/data/org.gnome.gnome-commander.gschema.xml
@@ -55,6 +55,13 @@
<value nick="select" value="1"/>
</enum>
+ <enum id="org.gnome.gnome-commander.preferences.general.icon-scale-quality">
+ <value nick="GDK_INTERP_NEAREST" value="0"/>
+ <value nick="GDK_INTERP_TILES" value="1"/>
+ <value nick="GDK_INTERP_BILINEAR" value="2"/>
+ <value nick="GDK_INTERP_HYPER" value="3"/>
+ </enum>
+
<schema gettext-domain="gnome-commander" id="org.gnome.gnome-commander.preferences.general"
path="/org/gnome/gnome-commander/preferences/general/">
<key name="use-default-font" type="b">
<default>true</default>
@@ -151,10 +158,10 @@
<summary>Device icon size</summary>
<description>Icon size in the device list.</description>
</key>
- <key name="icon-scale-quality" type="i">
- <default l10n="messages">3</default>
- <summary></summary>
- <description></description>
+ <key name="icon-scale-quality" enum='org.gnome.gnome-commander.preferences.general.icon-scale-quality'>
+ <default l10n="messages">'GDK_INTERP_HYPER'</default>
+ <summary>Icon scale quality</summary>
+ <description>Describes the different interpolation modes that can be used with the scaling
functions.</description>
</key>
<key name="theme-icon-dir" type="s">
<default l10n="messages">'/usr/local/share/pixmaps/gnome-commander/mime-icons'</default>
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 6bb2f80..bfc9c73 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -1700,6 +1700,9 @@ void GnomeCmdData::migrate_all_data_to_gsettings()
//dev-icon_size
migrate_data_int_value_into_gsettings(gnome_cmd_data_get_int ("/options/dev_icon_size", 16),
options.gcmd_settings->general,
GCMD_SETTINGS_DEV_ICON_SIZE);
+ //icon_scale_quality
+ migrate_data_int_value_into_gsettings(gnome_cmd_data_get_int ("/options/icon_scale_quality",
GDK_INTERP_HYPER),
+ options.gcmd_settings->general,
GCMD_SETTINGS_ICON_SCALE_QUALITY);
// 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
@@ -1881,7 +1884,7 @@ void GnomeCmdData::load()
options.right_mouse_button_mode = (RightMouseButtonMode) g_settings_get_enum
(options.gcmd_settings->general, GCMD_SETTINGS_RIGHT_MOUSE_BUTTON_MODE);
options.icon_size = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_ICON_SIZE);
dev_icon_size = g_settings_get_uint (options.gcmd_settings->general, GCMD_SETTINGS_DEV_ICON_SIZE);
- options.icon_scale_quality = (GdkInterpType) gnome_cmd_data_get_int ("/options/icon_scale_quality",
GDK_INTERP_HYPER);
+ options.icon_scale_quality = (GdkInterpType) g_settings_get_uint (options.gcmd_settings->general,
GCMD_SETTINGS_ICON_SCALE_QUALITY);
options.theme_icon_dir = gnome_cmd_data_get_string ("/options/theme_icon_dir", theme_icon_dir);
g_free (theme_icon_dir);
options.document_icon_dir = gnome_cmd_data_get_string ("/options/document_icon_dir", document_icon_dir);
@@ -2415,7 +2418,7 @@ void GnomeCmdData::save()
set_gsettings_enum_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_RIGHT_MOUSE_BUTTON_MODE,
options.right_mouse_button_mode);
set_gsettings_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_ICON_SIZE,
&(options.icon_size));
set_gsettings_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_DEV_ICON_SIZE,
&(dev_icon_size));
- gnome_cmd_data_set_int ("/options/icon_scale_quality", options.icon_scale_quality);
+ set_gsettings_when_changed (options.gcmd_settings->general, GCMD_SETTINGS_ICON_SCALE_QUALITY,
&(options.icon_scale_quality));
gnome_cmd_data_set_string ("/options/theme_icon_dir", options.theme_icon_dir);
gnome_cmd_data_set_string ("/options/document_icon_dir", options.document_icon_dir);
gnome_cmd_data_set_int ("/options/cmdline_history_length", cmdline_history_length);
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 7ee4b9c..0af017f 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -69,6 +69,7 @@ GcmdSettings *gcmd_settings_new (void);
#define GCMD_SETTINGS_RIGHT_MOUSE_BUTTON_MODE "right-mouse-btn-mode"
#define GCMD_SETTINGS_ICON_SIZE "icon-size"
#define GCMD_SETTINGS_DEV_ICON_SIZE "dev-icon-size"
+#define GCMD_SETTINGS_ICON_SCALE_QUALITY "icon-scale-quality"
#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]