aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-02-09 16:35:05 -0600
committerTed Gould <ted@gould.cx>2015-02-09 16:35:05 -0600
commit043af330ce48ea89d820e50c1f915ac9a9b278c6 (patch)
treeaebf63cde3efe8cb7e7998e87505bddaf4b5eb32 /src/main.c
parent99ccf6fa240695e7b5f22bcc2637d5f72c96d241 (diff)
downloadayatana-indicator-sound-043af330ce48ea89d820e50c1f915ac9a9b278c6.tar.gz
ayatana-indicator-sound-043af330ce48ea89d820e50c1f915ac9a9b278c6.tar.bz2
ayatana-indicator-sound-043af330ce48ea89d820e50c1f915ac9a9b278c6.zip
Make it so that the accounts service object is made outside of the service object
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index d2a8be8..6cc3b13 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,19 +22,22 @@ main (int argc, char ** argv) {
notify_init ("indicator-sound");
MediaPlayerList * playerlist = NULL;
+ AccountsServiceUser * accounts = NULL;
if (g_strcmp0("lightdm", g_get_user_name()) == 0) {
playerlist = MEDIA_PLAYER_LIST(media_player_list_greeter_new());
} else {
playerlist = MEDIA_PLAYER_LIST(media_player_list_mpris_new());
+ accounts = accounts_service_user_new();
}
VolumeControlPulse * volume = volume_control_pulse_new();
- service = indicator_sound_service_new (playerlist, volume);
+ service = indicator_sound_service_new (playerlist, volume, accounts);
result = indicator_sound_service_run (service);
g_object_unref(playerlist);
+ g_clear_object(&accounts);
g_object_unref(service);
return result;