#include #include #include static void activate (GApplication *application) { /*g_print ("activated\n");*/ GNotification *notification = g_notification_new ("Test Notification"); g_notification_set_body (notification, "Some body"); /* XXX This breaks. */ g_notification_set_default_action (notification, "app.some-action"); g_application_send_notification (g_application_get_default (), "some-id", notification); } int main (int argc, char **argv) { GApplication *app; int status; /* Need to use org.baedert.corebird here since a .desktop file with the matching name * must be installed */ app = g_application_new ("org.baedert.corebird", G_APPLICATION_HANDLES_OPEN); g_signal_connect (app, "activate", G_CALLBACK (activate), NULL); status = g_application_run (app, argc, argv); g_object_unref (app); return status; }