summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/org.gnome.totem.gschema.xml.in.in14
-rw-r--r--data/preferences.ui235
-rw-r--r--data/totem.convert3
-rw-r--r--src/totem-object.c2
-rw-r--r--src/totem-preferences.c152
-rw-r--r--src/totem-preferences.h1
6 files changed, 2 insertions, 405 deletions
diff --git a/data/org.gnome.totem.gschema.xml.in.in b/data/org.gnome.totem.gschema.xml.in.in
index 401aef3e3..70ed9710f 100644
--- a/data/org.gnome.totem.gschema.xml.in.in
+++ b/data/org.gnome.totem.gschema.xml.in.in
@@ -1,15 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<schema id="org.gnome.totem" path="/org/gnome/Totem/" gettext-domain="@GETTEXT_PACKAGE@">
- <key name="show-visualizations" type="b">
- <default>false</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="visualization-name" type="s">
- <default>'goom'</default>
- <_summary>Name of the visual effects plugin</_summary>
- </key>
<key name="brightness" type="i">
<default>32767</default>
<_summary>The brightness of the video</_summary>
@@ -42,11 +33,6 @@
<default>'stereo'</default>
<_summary>Type of audio output to use</_summary>
</key>
- <key name="visualization-quality" enum="org.gnome.totem.BvwVisualizationQuality">
- <default>'small'</default>
- <_summary>Visualization quality setting</_summary>
- <_description>Quality setting for the audio visualization.</_description>
- </key>
<key name="network-buffer-threshold" type="d">
<default>2</default>
<_summary>Network buffering threshold</_summary>
diff --git a/data/preferences.ui b/data/preferences.ui
index 6f9e4cf82..de92feaf3 100644
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@ -4,31 +4,6 @@
<interface>
<requires lib="gtk+" version="3.11"/>
-<object class="GtkListStore" id="tpw_visuals_size_liststore">
- <columns>
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes" comments="Audio visualization dimensions">Normal</col>
- </row>
- <row>
- <col id="0" translatable="yes" comments="Audio visualization dimensions">Large</col>
- </row>
- <row>
- <col id="0" translatable="yes" comments="Audio visualization dimensions">Extra Large</col>
- </row>
- </data>
-</object>
-
-<object class="GtkListStore" id="tpw_visuals_type_liststore">
- <columns>
- <column type="gchararray"/>
- </columns>
- <data>
- </data>
-</object>
-
<object class="GtkListStore" id="tpw_sound_output_liststore">
<columns>
<column type="gchararray"/>
@@ -589,216 +564,6 @@
</child>
<child>
- <object class="GtkVBox" id="tpw_visuals_effects_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <property name="orientation">vertical</property>
-
- <child>
- <object class="GtkLabel" id="tpw_visuals_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Visual Effects</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <object class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <object class="GtkVBox" id="vbox9">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <property name="orientation">vertical</property>
-
- <child>
- <object class="GtkCheckButton" id="tpw_visuals_checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Show _visual effects when an audio file is played</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="checkbutton2_toggled_cb"/>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <object class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
-
- <child>
- <object class="GtkLabel" id="tpw_visuals_type_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Type of visualization:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">tpw_visuals_type_combobox</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
-
- <child>
- <object class="GtkLabel" id="tpw_visuals_size_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Visualization _size:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">tpw_visuals_size_combobox</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
-
- <child>
- <object class="GtkComboBox" id="tpw_visuals_size_combobox">
- <property name="visible">True</property>
- <property name="model">tpw_visuals_size_liststore</property>
- <property name="add_tearoffs">False</property>
- <property name="focus_on_click">True</property>
- <child>
- <object class="GtkCellRendererText" id="tpw_visuals_size_cell"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <object class="GtkComboBox" id="tpw_visuals_type_combobox">
- <property name="visible">True</property>
- <property name="add_tearoffs">False</property>
- <property name="focus_on_click">True</property>
- <property name="model">tpw_visuals_type_liststore</property>
- <signal name="changed" handler="visual_menu_changed"/>
- <child>
- <object class="GtkCellRendererText" id="renderer1"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
<object class="GtkVBox" id="tpw_bright_contr_vbox">
<property name="visible">True</property>
<property name="homogeneous">False</property>
diff --git a/data/totem.convert b/data/totem.convert
index bf65e3b41..ff2d3f490 100644
--- a/data/totem.convert
+++ b/data/totem.convert
@@ -1,6 +1,4 @@
[org.gnome.totem]
-show-visualizations = /apps/totem/show_vfx
-visualization-name = /apps/totem/visual
brightness = /apps/totem/brightness
contrast = /apps/totem/contrast
hue = /apps/totem/hue
@@ -9,7 +7,6 @@ repeat = /apps/totem/repeat
disable-deinterlacing = /apps/totem/disable_deinterlacing
debug = /apps/totem/debug
audio-output-type = /apps/totem/audio_output_type
-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/totem-object.c b/src/totem-object.c
index cc9bf9be9..12bb0d285 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -3968,8 +3968,6 @@ video_widget_create (TotemObject *totem)
gtk_widget_show (GTK_WIDGET (totem->bvw));
- totem_preferences_visuals_setup (totem);
-
/* FIXME: Otherwise we get a visible but
* not realized widget ?!?! */
gtk_widget_realize (GTK_WIDGET (totem->bvw));
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index 881f4ec4d..25aead3d7 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -50,77 +50,17 @@
/* Callback functions for GtkBuilder */
G_MODULE_EXPORT void checkbutton2_toggled_cb (GtkToggleButton *togglebutton, Totem *totem);
-G_MODULE_EXPORT void visual_menu_changed (GtkComboBox *combobox, Totem *totem);
G_MODULE_EXPORT void tpw_color_reset_clicked_cb (GtkButton *button, Totem *totem);
G_MODULE_EXPORT void font_set_cb (GtkFontButton * fb, Totem * totem);
G_MODULE_EXPORT void encoding_set_cb (GtkComboBox *cb, Totem *totem);
static void
-totem_prefs_set_show_visuals (Totem *totem, gboolean value)
-{
- GtkWidget *item;
-
- g_settings_set_boolean (totem->settings, "show-visualizations", value);
-
- item = PWID ("tpw_visuals_type_label");
- gtk_widget_set_sensitive (item, value);
- item = PWID ("tpw_visuals_type_combobox");
- gtk_widget_set_sensitive (item, value);
- item = PWID ("tpw_visuals_size_label");
- gtk_widget_set_sensitive (item, value);
- item = PWID ("tpw_visuals_size_combobox");
- gtk_widget_set_sensitive (item, value);
-
- bacon_video_widget_set_show_visualizations
- (BACON_VIDEO_WIDGET (totem->bvw), value);
-}
-
-void
-checkbutton2_toggled_cb (GtkToggleButton *togglebutton, Totem *totem)
-{
- gboolean value;
-
- value = gtk_toggle_button_get_active (togglebutton);
- totem_prefs_set_show_visuals (totem, value);
-}
-
-static void
-show_vfx_changed_cb (GSettings *settings, const gchar *key, TotemObject *totem)
-{
- GObject *item;
-
- item = POBJ ("tpw_visuals_checkbutton");
- 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-visualizations"));
-
- g_signal_connect (item, "toggled",
- G_CALLBACK (checkbutton2_toggled_cb), totem);
-}
-
-static void
disable_kbd_shortcuts_changed_cb (GSettings *settings, const gchar *key, TotemObject *totem)
{
totem->disable_kbd_shortcuts = g_settings_get_boolean (totem->settings, "disable-keyboard-shortcuts");
}
void
-visual_menu_changed (GtkComboBox *combobox, Totem *totem)
-{
- GList *list;
- const gchar *name;
- int i;
-
- i = gtk_combo_box_get_active (combobox);
- list = bacon_video_widget_get_visualization_list (totem->bvw);
- name = g_list_nth_data (list, i);
-
- g_settings_set_string (totem->settings, "visualization-name", name);
- bacon_video_widget_set_visualization (totem->bvw, name);
-}
-
-void
tpw_color_reset_clicked_cb (GtkButton *button, Totem *totem)
{
guint i;
@@ -217,21 +157,6 @@ int_enum_set_mapping (const GValue *value, const GVariantType *expected_type, GE
return g_variant_new_string (enum_value->value_nick);
}
-static void
-visualization_quality_writable_changed_cb (GSettings *settings, const gchar *key, TotemObject *totem)
-{
- gboolean writable, show_visualizations;
-
- if (strcmp (key, "visualization-quality") != 0)
- return;
-
- writable = g_settings_is_writable (settings, key);
- show_visualizations = g_settings_get_boolean (settings, "show-visualizations");
-
- /* Only enable the size combobox if the visualization-quality setting is writable, and visualizations are enabled */
- gtk_widget_set_sensitive (PWID ("tpw_visuals_size_combobox"), writable && show_visualizations);
-}
-
static gboolean
totem_plugins_window_delete_cb (GtkWidget *window,
GdkEventAny *event,
@@ -289,11 +214,9 @@ plugin_button_clicked_cb (GtkButton *button,
void
totem_setup_preferences (Totem *totem)
{
- GtkWidget *menu, *bvw;
- gboolean show_visuals;
+ GtkWidget *bvw;
guint i, hidden;
- char *visual, *font, *encoding;
- GList *list, *l;
+ char *font, *encoding;
GObject *item;
static struct {
@@ -327,18 +250,6 @@ totem_setup_preferences (Totem *totem)
g_settings_bind (totem->settings, "disable-deinterlacing", bvw, "deinterlacing",
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY | G_SETTINGS_BIND_INVERT_BOOLEAN);
- /* Enable visuals */
- item = POBJ ("tpw_visuals_checkbutton");
- show_visuals = g_settings_get_boolean (totem->settings, "show-visualizations");
-
- g_signal_handlers_disconnect_by_func (item, checkbutton2_toggled_cb, totem);
- gtk_toggle_button_set_active
- (GTK_TOGGLE_BUTTON (item), show_visuals);
- 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-visualizations", (GCallback) show_vfx_changed_cb, totem);
-
/* Auto-load subtitles */
item = POBJ ("tpw_auto_subtitles_checkbutton");
g_settings_bind (totem->settings, "autoload-subtitles", item, "active", G_SETTINGS_BIND_DEFAULT);
@@ -352,50 +263,6 @@ totem_setup_preferences (Totem *totem)
g_signal_connect (G_OBJECT (item), "clicked",
G_CALLBACK (plugin_button_clicked_cb), totem);
- /* Visuals list */
- list = bacon_video_widget_get_visualization_list (totem->bvw);
- menu = gtk_menu_new ();
- gtk_widget_show (menu);
-
- visual = g_settings_get_string (totem->settings, "visualization-name");
- if (*visual == '\0') {
- g_free (visual);
- visual = g_strdup ("goom");
- }
-
- item = POBJ ("tpw_visuals_type_liststore");
-
- i = 0;
- for (l = list; l != NULL; l = l->next) {
- const char *name = l->data;
- GtkTreeIter iter;
-
- gtk_list_store_append (GTK_LIST_STORE (item), &iter);
- gtk_list_store_set (GTK_LIST_STORE (item), &iter,
- 0, name, -1);
-
- if (strcmp (name, visual) == 0) {
- GObject *combobox;
-
- combobox = POBJ ("tpw_visuals_type_combobox");
- gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), i);
- }
-
- i++;
- }
- g_free (visual);
-
- /* Visualisation quality. We have to bind the writability separately, as the sensitivity of the size combobox is also affected by whether
- * visualizations are enabled. */
- item = POBJ ("tpw_visuals_size_combobox");
- g_settings_bind (totem->settings, "visualization-quality", bvw, "visualization-quality",
- G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY);
- g_settings_bind_with_mapping (totem->settings, "visualization-quality", item, "active",
- G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY,
- (GSettingsBindGetMapping) int_enum_get_mapping, (GSettingsBindSetMapping) int_enum_set_mapping,
- g_type_class_ref (BVW_TYPE_VISUALIZATION_QUALITY), (GDestroyNotify) g_type_class_unref);
- g_signal_connect (totem->settings, "writable-changed::visualization-quality", (GCallback) visualization_quality_writable_changed_cb, totem);
-
/* Brightness and all */
hidden = 0;
for (i = 0; i < G_N_ELEMENTS (props); i++) {
@@ -465,18 +332,3 @@ totem_setup_preferences (Totem *totem)
g_object_unref (bvw);
}
-
-void
-totem_preferences_visuals_setup (Totem *totem)
-{
- char *visual;
-
- visual = g_settings_get_string (totem->settings, "visualization-name");
- if (*visual == '\0') {
- g_free (visual);
- visual = g_strdup ("goom");
- }
-
- bacon_video_widget_set_visualization (totem->bvw, visual);
- g_free (visual);
-}
diff --git a/src/totem-preferences.h b/src/totem-preferences.h
index 0f3f6b198..3fc25f03a 100644
--- a/src/totem-preferences.h
+++ b/src/totem-preferences.h
@@ -32,7 +32,6 @@
G_BEGIN_DECLS
void totem_setup_preferences (Totem *totem);
-void totem_preferences_visuals_setup (Totem *totem);
G_END_DECLS