Rename plugin vala file
This commit is contained in:
parent
0153953b5d
commit
9d9b9e8e42
|
@ -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
|
||||
|
|
|
@ -30,10 +30,10 @@ public class Plugin : RootInterface, Object {
|
|||
var text = "<toast launch=\"action=viewPhoto&photoId=92187\">
|
||||
<visual>
|
||||
<binding template=\"ToastGeneric\">
|
||||
<image placement=\"appLogoOverride\" hint-crop=\"circle\" src=\"https://unsplash.it/64?image=669\"/>
|
||||
<image placement=\"appLogoOverride\" hint-crop=\"circle\" src=\"C:\\Users\\user\\Pictures\\dino\\669-64x64\"/>
|
||||
<text>Adam Wilson tagged you in a photo</text>
|
||||
<text>On top of McClellan Butte - with Andrew Bares</text>
|
||||
<image src=\"https://unsplash.it/360/202?image=883\"/>
|
||||
<image src=\"C:\\Users\\user\\Pictures\\dino\\883-360x202.jpg\"/>
|
||||
</binding>
|
||||
</visual>
|
||||
<actions>
|
||||
|
@ -47,6 +47,31 @@ public class Plugin : RootInterface, Object {
|
|||
</actions>
|
||||
</toast>";
|
||||
|
||||
text = "<toast launch=\"action=viewEvent&eventId=63851\">
|
||||
<visual>
|
||||
<binding template=\"ToastGeneric\">
|
||||
<text>Surface Launch Party</text>
|
||||
<text>Studio S / Ballroom</text>
|
||||
<text>4:00 PM, 10/26/2015</text>
|
||||
</binding>
|
||||
</visual>
|
||||
<actions>
|
||||
<input id=\"status\" type=\"selection\" defaultInput=\"yes\">
|
||||
<selection id=\"yes\" content=\"Going\"/>
|
||||
<selection id=\"maybe\" content=\"Maybe\"/>
|
||||
<selection id=\"no\" content=\"Decline\"/>
|
||||
</input>
|
||||
<action
|
||||
activationType=\"background\"
|
||||
arguments=\"action=rsvpEvent&eventId=63851\"
|
||||
content=\"RSVP\"/>
|
||||
<action
|
||||
activationType=\"system\"
|
||||
arguments=\"dismiss\"
|
||||
content=\"\"/>
|
||||
</actions>
|
||||
</toast>";
|
||||
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in a new issue