aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c4
-rw-r--r--src/service.vala4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index e9a148e..d2a8be8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -29,7 +29,9 @@ main (int argc, char ** argv) {
playerlist = MEDIA_PLAYER_LIST(media_player_list_mpris_new());
}
- service = indicator_sound_service_new (playerlist);
+ VolumeControlPulse * volume = volume_control_pulse_new();
+
+ service = indicator_sound_service_new (playerlist, volume);
result = indicator_sound_service_run (service);
g_object_unref(playerlist);
diff --git a/src/service.vala b/src/service.vala
index b435726..c63f5c0 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -18,7 +18,7 @@
*/
public class IndicatorSound.Service: Object {
- public Service (MediaPlayerList playerlist) {
+ public Service (MediaPlayerList playerlist, VolumeControl volume) {
sync_notification = new Notify.Notification(_("Volume"), "", "audio-volume-muted");
this.notification_server_watch = GLib.Bus.watch_name(GLib.BusType.SESSION,
"org.freedesktop.Notifications",
@@ -32,7 +32,7 @@ public class IndicatorSound.Service: Object {
this.settings.bind ("visible", this, "visible", SettingsBindFlags.GET);
this.notify["visible"].connect ( () => this.update_root_icon () );
- this.volume_control = new VolumeControlPulse ();
+ this.volume_control = volume;
/* If we're on the greeter, don't export */
if (GLib.Environment.get_user_name() != "lightdm") {