diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-07-31 23:09:41 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-07-31 23:09:41 -0500 |
commit | 39263df5ab76e2f444e5dbb702512f741c56830c (patch) | |
tree | 0c135e12007e9ae868782215700c0e4f72b22960 /src/main.vala | |
parent | 761a9fff03812af3c0beb26da1094c69fc3a0a72 (diff) | |
download | ayatana-indicator-bluetooth-39263df5ab76e2f444e5dbb702512f741c56830c.tar.gz ayatana-indicator-bluetooth-39263df5ab76e2f444e5dbb702512f741c56830c.tar.bz2 ayatana-indicator-bluetooth-39263df5ab76e2f444e5dbb702512f741c56830c.zip |
add main() to its own file
Diffstat (limited to 'src/main.vala')
-rw-r--r-- | src/main.vala | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main.vala b/src/main.vala new file mode 100644 index 0000000..79683b2 --- /dev/null +++ b/src/main.vala @@ -0,0 +1,27 @@ + +public static int +main (string[] args) +{ + Intl.bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8"); + Intl.setlocale (LocaleCategory.ALL, ""); + Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.GNOMELOCALEDIR); + Intl.textdomain (Config.GETTEXT_PACKAGE); + + var loop = new MainLoop (); + + BluetoothIndicator indicator; + try + { + indicator = new BluetoothIndicator (); + } + catch (Error e) + { + warning ("Failed to start bluetooth indicator service: %s", e.message); + return Posix.EXIT_FAILURE; + } + + loop.run (); + return Posix.EXIT_SUCCESS; +} + //var service = new IndicatorSound.Service (); + //return service.run (); |