2018-03-02 12:13:15 +00:00
|
|
|
namespace Dino.Plugins.NotificationSound {
|
|
|
|
|
|
|
|
public class Plugin : RootInterface, Object {
|
|
|
|
|
|
|
|
public Dino.Application app;
|
|
|
|
private Canberra.Context sound_context;
|
|
|
|
|
|
|
|
public void registered(Dino.Application app) {
|
|
|
|
this.app = app;
|
|
|
|
Canberra.Context.create(out sound_context);
|
|
|
|
|
2018-11-06 23:17:24 +00:00
|
|
|
app.stream_interactor.get_module(NotificationEvents.IDENTITY).notify_content_item.connect((item, conversation) => {
|
2018-03-02 12:13:15 +00:00
|
|
|
sound_context.play(0, Canberra.PROP_EVENT_ID, "message-new-instant", Canberra.PROP_EVENT_DESCRIPTION, "New Dino message");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public void shutdown() { }
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|