diff options
author | Miquel Lionel <lionel@les-miquelots.net> | 2024-01-29 02:18:25 +0100 |
---|---|---|
committer | Miquel Lionel <lionel@les-miquelots.net> | 2024-01-29 02:18:25 +0100 |
commit | 8241bd649f88e8bc59774219094066ee93e6398e (patch) | |
tree | 85dcb6d5757c27ecdac966031e36816b6b851d36 /main | |
parent | 92a428ce36349e4dd5e1596fb7d78f3cd4779e03 (diff) | |
download | dino-8241bd649f88e8bc59774219094066ee93e6398e.tar.gz dino-8241bd649f88e8bc59774219094066ee93e6398e.zip |
Show type in use when hovering encryption methodsmake-encryption-icon-status-more-noticeable
- also adresses https://github.com/dino/dino/issues/1240
Diffstat (limited to 'main')
-rw-r--r-- | main/src/ui/chat_input/encryption_button.vala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/main/src/ui/chat_input/encryption_button.vala b/main/src/ui/chat_input/encryption_button.vala index 0349f11d..fedea803 100644 --- a/main/src/ui/chat_input/encryption_button.vala +++ b/main/src/ui/chat_input/encryption_button.vala @@ -73,9 +73,14 @@ public class EncryptionButton { private void update_encryption_menu_icon() { set_icon(conversation.encryption == Encryption.NONE ? "changes-allow-symbolic" : "changes-prevent-symbolic"); + string? encbtn_tooltip = ""; string encbtn_bg_color = conversation.encryption == Encryption.NONE ? "#F2EE22" : "transparent"; - string encbtn_tooltip = conversation.encryption == Encryption.NONE ? _("Your message won't be encrypted. You can click to pick an encryption method.") : _("Your message will be encrypted.") ; - menu_button.tooltip_text = Util.string_if_tooltips_active(_(encbtn_tooltip)); + switch(conversation.encryption){ + case Encryption.NONE: encbtn_tooltip = _("Your message won't be encrypted. You can click to pick an encryption method."); break; + case Encryption.OMEMO: encbtn_tooltip = _("Your message will be OMEMO encrypted."); break; + case Encryption.PGP: encbtn_tooltip = _("Your message will be PGP encrypted."); break; + } + menu_button.tooltip_text = Util.string_if_tooltips_active(encbtn_tooltip); Util.force_css(menu_button, ".encryption-button {background-color: " + encbtn_bg_color +";border-radius: 15px; margin-bottom:2px; margin-right:2px;}"); } |