[totem] Convert visual-quality to an enum
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] Convert visual-quality to an enum
- Date: Sat, 4 Sep 2010 15:47:41 +0000 (UTC)
commit 8826617a7812fdb74c95e6a190a780f19c5c9dfe
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 36ee20a..1bc2bb7 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 954fe76..c63c4fc 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -479,8 +479,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]