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

« back to all changes in this revision

Viewing changes to src/main.c

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2014-03-25 11:15:16 UTC
  • mfrom: (28.220.32)
  • Revision ID: package-import@ubuntu.com-20140325111516-ii39cglx38anz0bb
Tags: 12.10.2+14.04.20140324.is.12.10.2+14.04.20140320-0ubuntu1
Revert to previous indicator-sound to avoid pulling click on the
desktop

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