#include #include #include #include "dbus-shared.h" static IndicatorService * service = NULL; static GMainLoop * mainloop = NULL; static void service_shutdown (IndicatorService * service, gpointer user_data) { g_warning("Shutting down service!"); g_main_loop_quit(mainloop); return; } int main (int argc, char ** argv) { g_type_init(); service = indicator_service_new_version(SERVICE_NAME, SERVICE_VERSION); g_signal_connect(service, INDICATOR_SERVICE_SIGNAL_SHUTDOWN, G_CALLBACK(service_shutdown), NULL); /* Setting up i18n and gettext. Apparently, we need all of these. */ setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); textdomain (GETTEXT_PACKAGE); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); g_object_unref(G_OBJECT(service)); return 0; }