aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui')
-rw-r--r--main/src/ui/conversation_content_view/conversation_item_skeleton.vala21
1 files changed, 21 insertions, 0 deletions
diff --git a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
index b4cd766f..8c59dde7 100644
--- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
+++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
@@ -124,6 +124,13 @@ public class ItemMetaDataHeader : Box {
}
}
}
+ if (item.encryption == Encryption.NONE) {
+ conversation.notify["encryption"].connect(update_unencrypted_icon);
+ update_unencrypted_icon();
+ }
+
+ this.add(received_image);
+
if (item.display_time != null) {
update_time();
}
@@ -132,6 +139,20 @@ public class ItemMetaDataHeader : Box {
update_received_mark();
}
+ private void update_unencrypted_icon() {
+ if (conversation.encryption != Encryption.NONE) {
+ encryption_image = new Image() { opacity=0.4, visible = true };
+ encryption_image.set_from_icon_name("dino-changes-allowed-symbolic", ICON_SIZE_HEADER);
+ encryption_image.tooltip_text = _("Unencrypted");
+ this.add(encryption_image);
+ this.reorder_child(encryption_image, 3);
+ Util.force_error_color(encryption_image);
+ } else if (encryption_image != null) {
+ encryption_image.destroy();
+ encryption_image = null;
+ }
+ }
+
private void update_time() {
time_label.label = get_relative_time(item.display_time.to_local()).to_string();