diff options
author | Miquel Lionel <lionel@les-miquelots.net> | 2024-01-29 02:18:25 +0100 |
---|---|---|
committer | Miquel Lionel <lionel@les-miquelots.net> | 2024-02-18 23:36:44 +0100 |
commit | ee318c7aa99417f174d27d37101ab8ea614e5f67 (patch) | |
tree | 1dafb527bb04b489b6f69ebd5ecba07615c751bf | |
parent | f27385d952a7400902a58e67d02a6089e2de6289 (diff) | |
download | dino-show-message-encryption-type-tooltip.tar.gz dino-show-message-encryption-type-tooltip.zip |
Show encryption type currently used when hovering padlock in chat input boxshow-message-encryption-type-tooltip
- also adresses https://github.com/dino/dino/issues/1240
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | main/src/ui/chat_input/encryption_button.vala | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b4fe6e7c..1365b6d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,8 +103,6 @@ endif () # Flags for all C files AddCFlagIfSupported(CMAKE_C_FLAGS -Wall) -AddCFlagIfSupported(CMAKE_C_FLAGS -Wno-incompatible-pointer-types-discards-qualifiers) -AddCFlagIfSupported(CMAKE_C_FLAGS --disable-warnings-as-errors) AddCFlagIfSupported(CMAKE_C_FLAGS -Wextra) AddCFlagIfSupported(CMAKE_C_FLAGS -Werror=format-security) AddCFlagIfSupported(CMAKE_C_FLAGS -Wno-duplicate-decl-specifier) diff --git a/main/src/ui/chat_input/encryption_button.vala b/main/src/ui/chat_input/encryption_button.vala index 2dd35ae9..9e990d28 100644 --- a/main/src/ui/chat_input/encryption_button.vala +++ b/main/src/ui/chat_input/encryption_button.vala @@ -73,6 +73,13 @@ public class EncryptionButton { private void update_encryption_menu_icon() { set_icon(conversation.encryption == Encryption.NONE ? "dino-unencrypted" : "changes-prevent-symbolic"); + string? 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); } private void update_visibility() { |