diff --git a/plugins/windows-notification/CMakeLists.txt b/plugins/windows-notification/CMakeLists.txt index 41fcc722..9cef5965 100644 --- a/plugins/windows-notification/CMakeLists.txt +++ b/plugins/windows-notification/CMakeLists.txt @@ -10,8 +10,8 @@ find_packages(WINDOWS_NOTIFICATION_PACKAGES REQUIRED vala_precompile(WINDOWS_NOTIFICATION_VALA_C SOURCES - src/plugin.vala - src/register_plugin.vala + src/windows_notifications_plugin.vala + src/windows_notifications_register_plugin.vala # src/win_notification_provider.vala CUSTOM_VAPIS ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi diff --git a/plugins/windows-notification/src/plugin.vala b/plugins/windows-notification/src/windows_notifications_plugin.vala similarity index 57% rename from plugins/windows-notification/src/plugin.vala rename to plugins/windows-notification/src/windows_notifications_plugin.vala index fd804595..72344199 100644 --- a/plugins/windows-notification/src/plugin.vala +++ b/plugins/windows-notification/src/windows_notifications_plugin.vala @@ -30,10 +30,10 @@ public class Plugin : RootInterface, Object { var text = " - + Adam Wilson tagged you in a photo On top of McClellan Butte - with Andrew Bares - + @@ -47,6 +47,31 @@ public class Plugin : RootInterface, Object { "; + text = " + + + Surface Launch Party + Studio S / Ballroom + 4:00 PM, 10/26/2015 + + + + + + + + + + + + "; + this.notifier = new ToastNotifier(AUMID); this.notification = new ToastNotification(text); var token = notification.Activated((c, d) => { @@ -60,6 +85,22 @@ public class Plugin : RootInterface, Object { stdout.printf("Yay! Activated 2!\n"); }); + var token2 = notification.Failed(() => { + stdout.printf("Failed! :/\n"); + }); + notification.RemoveFailed(token2); + + var give_me_reason = ToastDismissalReason.TimedOut; + var give_me_template = ToastTemplateType.ToastText01; + var template = ToastNotificationManager.GetTemplateContent(give_me_template); + + var token3 = notification.Dismissed((reason) => { + stdout.printf("Dismissed! :(\n"); + var r = reason; + var m = 2; + }); + notification.RemoveDismissed(token3); + notifier.Show(notification); } diff --git a/plugins/windows-notification/src/register_plugin.vala b/plugins/windows-notification/src/windows_notifications_register_plugin.vala similarity index 100% rename from plugins/windows-notification/src/register_plugin.vala rename to plugins/windows-notification/src/windows_notifications_register_plugin.vala