aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/active-sink.c9
-rw-r--r--src/active-sink.h4
-rw-r--r--src/slider-menu-item.c4
-rw-r--r--src/sound-service.c4
4 files changed, 14 insertions, 7 deletions
diff --git a/src/active-sink.c b/src/active-sink.c
index 78eb79f..62aa8d2 100644
--- a/src/active-sink.c
+++ b/src/active-sink.c
@@ -176,6 +176,15 @@ active_sink_mute_update (ActiveSink* self, gboolean muted)
sound_service_dbus_update_sound_state (priv->service, state);
}
+void
+active_sink_ensure_sink_is_unmuted (ActiveSink* self)
+{
+ ActiveSinkPrivate* priv = ACTIVE_SINK_GET_PRIVATE (self);
+ if (mute_menu_item_is_muted (priv->mute_menuitem)){
+ pm_update_mute (FALSE);
+ }
+}
+
static SoundState
active_sink_get_state_from_volume (ActiveSink* self)
diff --git a/src/active-sink.h b/src/active-sink.h
index 3d57829..ab05ebc 100644
--- a/src/active-sink.h
+++ b/src/active-sink.h
@@ -61,9 +61,9 @@ SoundState active_sink_get_state (ActiveSink* self);
void active_sink_deactivate (ActiveSink* self);
-//void active_sink_volume_update (ActiveSink* self, gdouble vol_percent);
-
+void active_sink_update_mute (ActiveSink* self, gboolean mute_update);
void active_sink_update_volume (ActiveSink* self, gdouble percent);
+void active_sink_ensure_sink_is_unmuted (ActiveSink* self);
ActiveSink* active_sink_new (SoundServiceDbus* service);
diff --git a/src/slider-menu-item.c b/src/slider-menu-item.c
index aaa6787..687e43b 100644
--- a/src/slider-menu-item.c
+++ b/src/slider-menu-item.c
@@ -98,10 +98,8 @@ handle_event (DbusmenuMenuitem * mi,
if (IS_SLIDER_MENU_ITEM (mi)) {
SliderMenuItemPrivate* priv = SLIDER_MENU_ITEM_GET_PRIVATE (SLIDER_MENU_ITEM (mi));
active_sink_update_volume (priv->a_sink, volume_input);
+ active_sink_ensure_sink_is_unmuted (priv->a_sink);
}
- /*if (default_sink_is_muted () == TRUE){
- toggle_global_mute (FALSE);
- }*/
}
}
diff --git a/src/sound-service.c b/src/sound-service.c
index d80127e..c1bb9b4 100644
--- a/src/sound-service.c
+++ b/src/sound-service.c
@@ -67,8 +67,8 @@ main (int argc, char ** argv)
SoundServiceDbus* sound_service = g_object_new(SOUND_SERVICE_DBUS_TYPE, NULL);
DbusmenuMenuitem* root_menuitem = sound_service_dbus_create_root_item(sound_service);
- //MusicPlayerBridge* server = music_player_bridge_new();
- //music_player_bridge_set_root_menu_item(server, root_menuitem);
+ MusicPlayerBridge* server = music_player_bridge_new();
+ music_player_bridge_set_root_menu_item(server, root_menuitem);
// Run the loop
mainloop = g_main_loop_new(NULL, FALSE);