aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
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/service.vala
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/service.vala')
-rw-r--r--src/service.vala7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/service.vala b/src/service.vala
index c63f5c0..c6f318b 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -18,7 +18,7 @@
*/
public class IndicatorSound.Service: Object {
- public Service (MediaPlayerList playerlist, VolumeControl volume) {
+ public Service (MediaPlayerList playerlist, VolumeControl volume, AccountsServiceUser? accounts) {
sync_notification = new Notify.Notification(_("Volume"), "", "audio-volume-muted");
this.notification_server_watch = GLib.Bus.watch_name(GLib.BusType.SESSION,
"org.freedesktop.Notifications",
@@ -34,10 +34,9 @@ public class IndicatorSound.Service: Object {
this.volume_control = volume;
+ this.accounts_service = accounts;
/* If we're on the greeter, don't export */
- if (GLib.Environment.get_user_name() != "lightdm") {
- this.accounts_service = new AccountsServiceUser();
-
+ if (this.accounts_service != null) {
this.accounts_service.notify["showDataOnGreeter"].connect(() => {
this.export_to_accounts_service = this.accounts_service.showDataOnGreeter;
eventually_update_player_actions();