【发布时间】:2019-01-04 12:56:46
【问题描述】:
我不喜欢 Windows,我只是想看看 Vala 是如何跨平台的。
当使用libnoyify我明白了
gavr@DESKTOP-B57MHT8 MINGW64 ~
$ ./notify.exe
** (notify.exe:6680): ERROR **: 15:50:47.138: notify.vala:13: Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications is unknown
在这样的代码中
public static int main (string[] args) {
string summary = "Short summary";
string body = "A long description";
string icon = "dialog-information";
Notify.init ("My test app");
try {
Notify.Notification notification = new Notify.Notification (summary, body, icon);
notification.show ();
} catch (Error e) {
error ("Error
: %s", e.message);
}
return 0;
}
那么有没有办法从 Vala 触发弹出通知?
我找到的只是this,但我认为它不适合 Windows 10,它似乎在 2011 年就停止了。
【问题讨论】:
标签: windows popup vala notify msys2