~ubuntu-branches/ubuntu/trusty/indicator-sound/trusty-proposed

« back to all changes in this revision

Viewing changes to src/main.c

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Michael Terry, Ted Gould
  • Date: 2014-03-24 15:03:16 UTC
  • mfrom: (28.220.31)
  • Revision ID: package-import@ubuntu.com-20140324150316-5sccztn1uikiwocv
Tags: 12.10.2+14.04.20140324-0ubuntu1
[ Michael Terry ]
* Sync volume and mute settings with AccountsService. (LP: #840777)

[ Ted Gould ]
* Add an apport hook for debugging
* Synchronize process management across indicators
* Export currently running player to Accounts Service
* Create players on the phone greeter based on the accounts service
  data
* Allow the phone greeter player to control the running player in the
  session.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* main.c generated by valac 0.22.1, the Vala compiler
 
2
 * generated from main.vala, do not modify */
 
3
 
 
4
 
 
5
#include <glib.h>
 
6
#include <locale.h>
 
7
#include <libnotify/notify.h>
 
8
 
 
9
#include "indicator-sound-service.h"
 
10
#include "config.h"
 
11
 
 
12
int
 
13
main (int argc, char ** argv) {
 
14
        gint result = 0;
 
15
        IndicatorSoundService* service = NULL;
 
16
 
 
17
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
18
        setlocale (LC_ALL, "");
 
19
        bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
 
20
 
 
21
        /* Initialize libnotify */
 
22
        notify_init ("indicator-sound");
 
23
 
 
24
        MediaPlayerList * playerlist = NULL;
 
25
 
 
26
        if (g_strcmp0("lightdm", g_get_user_name()) == 0) {
 
27
                playerlist = MEDIA_PLAYER_LIST(media_player_list_greeter_new());
 
28
        } else {
 
29
                playerlist = MEDIA_PLAYER_LIST(media_player_list_mpris_new());
 
30
        }
 
31
 
 
32
        service = indicator_sound_service_new (playerlist);
 
33
        result = indicator_sound_service_run (service);
 
34
 
 
35
        g_object_unref(playerlist);
 
36
        g_object_unref(service);
 
37
 
 
38
        return result;
 
39
}
 
40
 
 
41