[totem] main: Remove volume menu items
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] main: Remove volume menu items
- Date: Wed, 8 May 2013 17:21:33 +0000 (UTC)
commit aa82f6a9ca2aa18a124f31a005d6e33cbe4762cf
Author: Bastien Nocera <hadess hadess net>
Date: Wed May 8 19:17:30 2013 +0200
main: Remove volume menu items
data/totem.ui | 20 --------------------
src/totem-object.c | 15 ---------------
2 files changed, 0 insertions(+), 35 deletions(-)
---
diff --git a/data/totem.ui b/data/totem.ui
index 7ca73df..ef50e64 100644
--- a/data/totem.ui
+++ b/data/totem.ui
@@ -193,24 +193,6 @@
<property name="label" translatable="yes">_Sound</property>
</object>
</child>
- <child>
- <object class="GtkAction" id="volume-up">
- <property name="label" translatable="yes">Volume _Up</property>
- <property name="icon-name">audio-volume-high-symbolic</property>
- <property name="tooltip" translatable="yes">Increase volume</property>
- <signal name="activate" handler="volume_up_action_callback"/>
- </object>
- <accelerator key="Up"/>
- </child>
- <child>
- <object class="GtkAction" id="volume-down">
- <property name="label" translatable="yes">Volume _Down</property>
- <property name="icon-name">audio-volume-low-symbolic</property>
- <property name="tooltip" translatable="yes">Decrease volume</property>
- <signal name="activate" handler="volume_down_action_callback"/>
- </object>
- <accelerator key="Down"/>
- </child>
<child>
<object class="GtkToggleAction" id="sidebar">
@@ -342,8 +324,6 @@
<menu name="languages" action="languages-menu">
<placeholder name="placeholder"/>
</menu>
- <menuitem name="volume-up" action="volume-up"/>
- <menuitem name="volume-down" action="volume-down"/>
</menu>
</menubar>
<popup name="totem-main-popup">
diff --git a/src/totem-object.c b/src/totem-object.c
index 8840292..e999e92 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -80,8 +80,6 @@
#define DEFAULT_WINDOW_W 650
#define DEFAULT_WINDOW_H 500
-#define VOLUME_EPSILON (1e-10)
-
/* casts are to shut gcc up */
static const GtkTargetEntry target_table[] = {
{ (gchar*) "text/uri-list", 0, 0 },
@@ -1700,8 +1698,6 @@ totem_action_set_mrl (TotemObject *totem,
/* Volume */
totem_controls_set_sensitivity ("volume_button", FALSE);
- totem_action_set_sensitivity ("volume-up", FALSE);
- totem_action_set_sensitivity ("volume-down", FALSE);
totem->volume_sensitive = FALSE;
/* Control popup */
@@ -1724,7 +1720,6 @@ totem_action_set_mrl (TotemObject *totem,
g_object_notify (G_OBJECT (totem), "playing");
} else {
gboolean caps;
- gdouble volume;
char *user_agent;
char *autoload_sub;
@@ -1752,9 +1747,6 @@ totem_action_set_mrl (TotemObject *totem,
/* Volume */
caps = bacon_video_widget_can_set_volume (totem->bvw);
totem_controls_set_sensitivity ("volume_button", caps);
- volume = bacon_video_widget_get_volume (totem->bvw);
- totem_action_set_sensitivity ("volume-up", caps && volume < (1.0 - VOLUME_EPSILON));
- totem_action_set_sensitivity ("volume-down", caps && volume > VOLUME_EPSILON);
totem->volume_sensitive = caps;
/* Clear the playlist */
@@ -2489,19 +2481,12 @@ static void
update_volume_sliders (TotemObject *totem)
{
double volume;
- GtkAction *action;
volume = bacon_video_widget_get_volume (totem->bvw);
g_signal_handlers_block_by_func (totem->volume, volume_button_value_changed_cb, totem);
gtk_scale_button_set_value (GTK_SCALE_BUTTON (totem->volume), volume);
g_signal_handlers_unblock_by_func (totem->volume, volume_button_value_changed_cb, totem);
-
- action = gtk_action_group_get_action (totem->main_action_group, "volume-down");
- gtk_action_set_sensitive (action, volume > VOLUME_EPSILON && totem->volume_sensitive);
-
- action = gtk_action_group_get_action (totem->main_action_group, "volume-up");
- gtk_action_set_sensitive (action, volume < (1.0 - VOLUME_EPSILON) && totem->volume_sensitive);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]