aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2018-06-19 12:52:00 +0200
committerSamuel Hand <samuel.hand@openmailbox.org>2018-06-26 15:42:02 +0100
commit638d81d67ecd6c7c8be7fd67aeaf15d16486f8e9 (patch)
treeea1cf3c5f28477bc928777ea0379d2616170fd0b /main/src
parent2a8352c5439129798b5141ec021b3b9405840a8a (diff)
downloaddino-638d81d67ecd6c7c8be7fd67aeaf15d16486f8e9.tar.gz
dino-638d81d67ecd6c7c8be7fd67aeaf15d16486f8e9.zip
More cleanup and database modifications
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/conversation_summary/conversation_view.vala14
1 files changed, 11 insertions, 3 deletions
diff --git a/main/src/ui/conversation_summary/conversation_view.vala b/main/src/ui/conversation_summary/conversation_view.vala
index 87a2dd34..b4a34f3b 100644
--- a/main/src/ui/conversation_summary/conversation_view.vala
+++ b/main/src/ui/conversation_summary/conversation_view.vala
@@ -7,7 +7,7 @@ using Dino.Entities;
namespace Dino.Ui.ConversationSummary {
[GtkTemplate (ui = "/im/dino/Dino/conversation_summary/view.ui")]
-public class ConversationView : Box, Plugins.ConversationItemCollection {
+public class ConversationView : Box, Plugins.ConversationItemCollection, Plugins.NotificationCollection {
public Conversation? conversation { get; private set; }
@@ -83,6 +83,9 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
foreach (Plugins.ConversationItemPopulator populator in app.plugin_registry.conversation_item_populators) {
populator.close(conversation);
}
+ foreach (Plugins.NotificationPopulator populator in app.plugin_registry.notification_populators) {
+ populator.close(conversation);
+ }
}
this.conversation = conversation;
stack.set_visible_child_name("void");
@@ -95,6 +98,9 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
foreach (Plugins.ConversationItemPopulator populator in app.plugin_registry.conversation_item_populators) {
populator.init(conversation, this, Plugins.WidgetType.GTK);
}
+ foreach (Plugins.NotificationPopulator populator in app.plugin_registry.notification_populators) {
+ populator.init(conversation, this, Plugins.WidgetType.GTK);
+ }
message_item_populator.init(conversation, this);
message_item_populator.populate_latest(conversation, 40);
Idle.add(() => { on_value_notify(); return false; });
@@ -130,14 +136,16 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
public void on_add_meta_notification(Plugins.MetaConversationNotification notification) {
Widget? widget = (Widget) notification.get_widget(Plugins.WidgetType.GTK);
- if(widget != null)
+ if (widget != null) {
add_notification(widget);
+ }
}
public void on_remove_meta_notification(Plugins.MetaConversationNotification notification){
Widget? widget = (Widget) notification.get_widget(Plugins.WidgetType.GTK);
- if(widget != null)
+ if (widget != null) {
remove_notification(widget);
+ }
}
public void add_notification(Widget widget) {