From 638d81d67ecd6c7c8be7fd67aeaf15d16486f8e9 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 19 Jun 2018 12:52:00 +0200 Subject: More cleanup and database modifications --- libdino/src/plugin/registry.vala | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libdino/src/plugin/registry.vala') diff --git a/libdino/src/plugin/registry.vala b/libdino/src/plugin/registry.vala index 7b4410aa..fbdf2c5c 100644 --- a/libdino/src/plugin/registry.vala +++ b/libdino/src/plugin/registry.vala @@ -9,6 +9,7 @@ public class Registry { internal Map text_commands = new HashMap(); internal Gee.List message_displays = new ArrayList(); internal Gee.List conversation_item_populators = new ArrayList(); + internal Gee.List notification_populators = new ArrayList(); internal Gee.Collection conversation_titlebar_entries = new Gee.TreeSet((a, b) => { if (a.order < b.order) { return -1; @@ -89,6 +90,16 @@ public class Registry { return true; } } + + public bool register_notification_populator(NotificationPopulator populator) { + lock (notification_populators) { + foreach(NotificationPopulator p in notification_populators) { + if (p.id == populator.id) return false; + } + notification_populators.add(populator); + return true; + } + } } } -- cgit v1.2.3-54-g00ecf