diff options
author | Marvin W <git@larma.de> | 2018-06-19 12:52:00 +0200 |
---|---|---|
committer | Samuel Hand <samuel.hand@openmailbox.org> | 2018-06-26 15:42:02 +0100 |
commit | 638d81d67ecd6c7c8be7fd67aeaf15d16486f8e9 (patch) | |
tree | ea1cf3c5f28477bc928777ea0379d2616170fd0b /libdino/src/plugin/registry.vala | |
parent | 2a8352c5439129798b5141ec021b3b9405840a8a (diff) | |
download | dino-638d81d67ecd6c7c8be7fd67aeaf15d16486f8e9.tar.gz dino-638d81d67ecd6c7c8be7fd67aeaf15d16486f8e9.zip |
More cleanup and database modifications
Diffstat (limited to 'libdino/src/plugin/registry.vala')
-rw-r--r-- | libdino/src/plugin/registry.vala | 11 |
1 files changed, 11 insertions, 0 deletions
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<string, TextCommand> text_commands = new HashMap<string, TextCommand>(); internal Gee.List<MessageDisplayProvider> message_displays = new ArrayList<MessageDisplayProvider>(); internal Gee.List<ConversationItemPopulator> conversation_item_populators = new ArrayList<ConversationItemPopulator>(); + internal Gee.List<NotificationPopulator> notification_populators = new ArrayList<NotificationPopulator>(); internal Gee.Collection<ConversationTitlebarEntry> conversation_titlebar_entries = new Gee.TreeSet<ConversationTitlebarEntry>((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; + } + } } } |