[totem/gsettings: 19/20] Convert visual-quality to an enum
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gsettings: 19/20] Convert visual-quality to an enum
- Date: Sat, 21 Aug 2010 19:35:44 +0000 (UTC)
commit 50fd7dd05a0a8f7b9ff061fcb4f1fe54781bddc4
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Aug 19 09:41:16 2010 +0100
Convert visual-quality to an enum
data/org.gnome.totem.gschema.xml.in.in | 6 +++---
src/totem-preferences.c | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/data/org.gnome.totem.gschema.xml.in.in b/data/org.gnome.totem.gschema.xml.in.in
index 40b42fe..e182fc0 100644
--- a/data/org.gnome.totem.gschema.xml.in.in
+++ b/data/org.gnome.totem.gschema.xml.in.in
@@ -60,10 +60,10 @@
<default>'stereo'</default>
<_summary>Type of audio output to use</_summary>
</key>
- <key name="visual-quality" type="i">
- <default>0</default>
+ <key name="visual-quality" enum="org.gnome.totem.BvwVisualsQuality">
+ <default>'small'</default>
<_summary>Visualization quality setting</_summary>
- <_description>Quality settings for the audio visualization: "0" for small, "1" for normal, "2" for large, "3" for extra large.</_description>
+ <_description>Quality settings for the audio visualization.</_description>
</key>
<key name="network-buffer-threshold" type="d">
<default>2</default>
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index 71d6cd4..71d1a66 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -515,8 +515,10 @@ totem_setup_preferences (Totem *totem)
/* Visualisation quality */
item = gtk_builder_get_object (totem->xml, "tpw_visuals_size_combobox");
- g_settings_bind (totem->settings, "visual-quality", item, "active", G_SETTINGS_BIND_DEFAULT);
g_settings_bind (totem->settings, "visual-quality", bvw, "visualization-quality", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind_with_mapping (totem->settings, "visual-quality", item, "active", G_SETTINGS_BIND_DEFAULT,
+ (GSettingsBindGetMapping) int_enum_get_mapping, (GSettingsBindSetMapping) int_enum_set_mapping,
+ g_type_class_ref (BVW_TYPE_VISUALIZATION_QUALITY), (GDestroyNotify) g_type_class_unref);
/* Brightness and all */
hidden = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]