[totem/gsettings: 20/20] Improve naming of the visualization GSettings keys



commit 920a8ef08ebf843462788d0977e17adc81824e93
Author: Philip Withnall <philip tecnocode co uk>
Date:   Thu Aug 19 21:38:09 2010 +0100

    Improve naming of the visualization GSettings keys

 data/org.gnome.totem.gschema.xml.in.in    |   10 +++++-----
 data/totem.convert                        |    6 +++---
 src/backend/bacon-video-widget-gst-0.10.c |    2 +-
 src/totem-preferences.c                   |   22 +++++++++++-----------
 4 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/data/org.gnome.totem.gschema.xml.in.in b/data/org.gnome.totem.gschema.xml.in.in
index e182fc0..24f9fe3 100644
--- a/data/org.gnome.totem.gschema.xml.in.in
+++ b/data/org.gnome.totem.gschema.xml.in.in
@@ -6,14 +6,14 @@
 			<_summary>Allow the screensaver to activate when playing audio</_summary>
 			<_description>Allow the screensaver to activate when playing audio. Disable if you have monitor-powered speakers.</_description>
 		</key>
-		<key name="show-vfx" type="b">
+		<key name="show-visualizations" type="b">
 			<default>true</default>
 			<_summary>Show visual effects when no video is displayed</_summary>
 			<_description>Show visual effects when playing an audio only file.</_description>
 		</key>
-		<key name="visual" type="s">
+		<key name="visualization-name" type="s">
 			<default>'goom'</default>
-			<_summary>Name of the visual effects plugins</_summary>
+			<_summary>Name of the visual effects plugin</_summary>
 		</key>
 		<key name="brightness" type="i">
 			<default>32767</default>
@@ -60,10 +60,10 @@
 			<default>'stereo'</default>
 			<_summary>Type of audio output to use</_summary>
 		</key>
-		<key name="visual-quality" enum="org.gnome.totem.BvwVisualsQuality">
+		<key name="visualization-quality" enum="org.gnome.totem.BvwVisualizationQuality">
 			<default>'small'</default>
 			<_summary>Visualization quality setting</_summary>
-			<_description>Quality settings for the audio visualization.</_description>
+			<_description>Quality setting for the audio visualization.</_description>
 		</key>
 		<key name="network-buffer-threshold" type="d">
 			<default>2</default>
diff --git a/data/totem.convert b/data/totem.convert
index 18e063c..7f5158b 100644
--- a/data/totem.convert
+++ b/data/totem.convert
@@ -1,7 +1,7 @@
 [org.gnome.totem]
 lock-screensaver-on-audio = /apps/totem/lock_screensaver_on_audio
-show-vfx = /apps/totem/show_vfx
-visual = /apps/totem/visual
+show-visualizations = /apps/totem/show_vfx
+visualization-name = /apps/totem/visual
 brightness = /apps/totem/brightness
 contrast = /apps/totem/contrast
 hue = /apps/totem/hue
@@ -13,7 +13,7 @@ shuffle = /apps/totem/shuffle
 disable-deinterlacing = /apps/totem/disable_deinterlacing
 debug = /apps/totem/debug
 audio-output-type = /apps/totem/audio_output_type
-visual-quality = /apps/totem/visual_quality
+visualization-quality = /apps/totem/visual_quality
 network-buffer-threshold = /apps/totem/network-buffer-threshold
 subtitle-font = /apps/totem/subtitle_font
 subtitle-encoding = /apps/totem/subtitle_encoding
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 4ba955a..7dbfd0b 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -4866,7 +4866,7 @@ setup_vis_find_factory (BaconVideoWidget * bvw, const gchar * vis_name)
 
     /* set to long name as key so that the preferences dialog gets it right */
     if (f && strcmp (vis_name, GST_PLUGIN_FEATURE_NAME (f)) == 0) {
-      g_settings_set_string (bvw->priv->settings, "visual",
+      g_settings_set_string (bvw->priv->settings, "visualization-name",
           gst_element_factory_get_longname (f));
       fac = f;
       goto done;
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index 71d1a66..d7d7185 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -115,7 +115,7 @@ totem_prefs_set_show_visuals (Totem *totem, gboolean value)
 {
 	GtkWidget *item;
 
-	g_settings_set_boolean (totem->settings, "show-vfx", value);
+	g_settings_set_boolean (totem->settings, "show-visualizations", value);
 
 	item = GTK_WIDGET (gtk_builder_get_object (totem->xml, "tpw_visuals_type_label"));
 	gtk_widget_set_sensitive (item, value);
@@ -143,7 +143,7 @@ checkbutton2_toggled_cb (GtkToggleButton *togglebutton, Totem *totem)
 	{
 		if (ask_show_visuals (totem) == FALSE)
 		{
-			g_settings_set_boolean (totem->settings, "show-vfx", FALSE);
+			g_settings_set_boolean (totem->settings, "show-visualizations", FALSE);
 			gtk_toggle_button_set_active (togglebutton, FALSE);
 			return;
 		}
@@ -170,7 +170,7 @@ show_vfx_changed_cb (GSettings *settings, const gchar *key, TotemObject *totem)
 	g_signal_handlers_disconnect_by_func (item,
 			checkbutton2_toggled_cb, totem);
 
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item), g_settings_get_boolean (totem->settings, "show-vfx"));
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item), g_settings_get_boolean (totem->settings, "show-visualizations"));
 
 	g_signal_connect (item, "toggled",
 			G_CALLBACK (checkbutton2_toggled_cb), totem);
@@ -215,11 +215,11 @@ visual_menu_changed (GtkComboBox *combobox, Totem *totem)
 	list = bacon_video_widget_get_visualization_list (totem->bvw);
 	name = g_list_nth_data (list, i);
 
-	old_name = g_settings_get_string (totem->settings, "visual");
+	old_name = g_settings_get_string (totem->settings, "visualization-name");
 
 	if (old_name == NULL || strcmp (old_name, name) != 0)
 	{
-		g_settings_set_string (totem->settings, "visual", name);
+		g_settings_set_string (totem->settings, "visualization-name", name);
 
 		if (bacon_video_widget_set_visualization (totem->bvw, name) != FALSE)
 			totem_action_info (_("Changing the visuals effect type will require a restart to take effect."), totem);
@@ -466,7 +466,7 @@ totem_setup_preferences (Totem *totem)
 
 	/* Enable visuals */
 	item = gtk_builder_get_object (totem->xml, "tpw_visuals_checkbutton");
-	show_visuals = g_settings_get_boolean (totem->settings, "show-vfx");
+	show_visuals = g_settings_get_boolean (totem->settings, "show-visualizations");
 	if (is_local == FALSE && show_visuals != FALSE)
 		show_visuals = ask_show_visuals (totem);
 
@@ -476,7 +476,7 @@ totem_setup_preferences (Totem *totem)
 	totem_prefs_set_show_visuals (totem, show_visuals);
 	g_signal_connect (item, "toggled", G_CALLBACK (checkbutton2_toggled_cb), totem);
 
-	g_signal_connect (totem->settings, "changed::show-vfx", (GCallback) show_vfx_changed_cb, totem);
+	g_signal_connect (totem->settings, "changed::show-visualizations", (GCallback) show_vfx_changed_cb, totem);
 
 	/* Auto-load subtitles */
 	item = gtk_builder_get_object (totem->xml, "tpw_auto_subtitles_checkbutton");
@@ -492,7 +492,7 @@ totem_setup_preferences (Totem *totem)
 	menu = gtk_menu_new ();
 	gtk_widget_show (menu);
 
-	visual = g_settings_get_string (totem->settings, "visual");
+	visual = g_settings_get_string (totem->settings, "visualization-name");
 	if (visual == NULL || strcmp (visual, "") == 0) {
 		g_free (visual);
 		visual = g_strdup ("goom");
@@ -515,8 +515,8 @@ 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", bvw, "visualization-quality", G_SETTINGS_BIND_DEFAULT);
-	g_settings_bind_with_mapping (totem->settings, "visual-quality", item, "active", G_SETTINGS_BIND_DEFAULT,
+	g_settings_bind (totem->settings, "visualization-quality", bvw, "visualization-quality", G_SETTINGS_BIND_DEFAULT);
+	g_settings_bind_with_mapping (totem->settings, "visualization-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);
 
@@ -588,7 +588,7 @@ totem_preferences_visuals_setup (Totem *totem)
 {
 	char *visual;
 
-	visual = g_settings_get_string (totem->settings, "visual");
+	visual = g_settings_get_string (totem->settings, "visualization-name");
 	if (visual == NULL || strcmp (visual, "") == 0) {
 		g_free (visual);
 		visual = g_strdup ("goom");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]