diff options
author | Miquel Lionel <lionel@les-miquelots.net> | 2024-02-18 19:52:40 +0100 |
---|---|---|
committer | Miquel Lionel <lionel@les-miquelots.net> | 2024-02-18 19:52:40 +0100 |
commit | f27385d952a7400902a58e67d02a6089e2de6289 (patch) | |
tree | 1f17c9502b4c14352dd6d41f2d747ac38f3b9705 | |
parent | 4f950d401b2feb799b20e3231e6f09b892614a8c (diff) | |
download | dino-f27385d952a7400902a58e67d02a6089e2de6289.tar.gz dino-f27385d952a7400902a58e67d02a6089e2de6289.zip |
More noticeable encryption type color and encryption status
- added file changes-allow-symbolic from GTK Adwaita icon theme
as dino-unencrypted.svg (licensed under LGPL3)
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | main/CMakeLists.txt | 1 | ||||
-rw-r--r-- | main/data/gresource.xml | 1 | ||||
-rw-r--r-- | main/data/icons/scalable/status/dino-unencrypted.svg | 4 | ||||
-rw-r--r-- | main/src/ui/chat_input/chat_input_controller.vala | 2 | ||||
-rw-r--r-- | main/src/ui/chat_input/encryption_button.vala | 4 | ||||
-rw-r--r-- | main/src/ui/conversation_content_view/conversation_item_skeleton.vala | 4 |
7 files changed, 13 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1365b6d2..b4fe6e7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,6 +103,8 @@ 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/CMakeLists.txt b/main/CMakeLists.txt index 9a7cb189..770ee7c4 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -43,6 +43,7 @@ set(RESOURCE_LIST icons/scalable/status/dino-bell-large-symbolic.svg icons/scalable/status/dino-block-symbolic.svg icons/scalable/status/dino-double-tick-symbolic.svg + icons/scalable/status/dino-unencrypted.svg icons/scalable/status/dino-party-popper-symbolic.svg icons/scalable/status/dino-security-high-symbolic.svg icons/scalable/status/dino-status-away.svg diff --git a/main/data/gresource.xml b/main/data/gresource.xml index 282838e0..ffd480c7 100644 --- a/main/data/gresource.xml +++ b/main/data/gresource.xml @@ -40,6 +40,7 @@ <file>icons/scalable/mimetypes/dino-file-table-symbolic.svg</file> <file>icons/scalable/mimetypes/dino-file-video-symbolic.svg</file> <file>icons/scalable/status/dino-double-tick-symbolic.svg</file> + <file>icons/scalable/status/dino-unencrypted.svg</file> <file>icons/scalable/status/dino-bell-large-none-symbolic.svg</file> <file>icons/scalable/status/dino-bell-large-symbolic.svg</file> <file>icons/scalable/status/dino-block-symbolic.svg</file> diff --git a/main/data/icons/scalable/status/dino-unencrypted.svg b/main/data/icons/scalable/status/dino-unencrypted.svg new file mode 100644 index 00000000..dd99347e --- /dev/null +++ b/main/data/icons/scalable/status/dino-unencrypted.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg"> + <path d="m 8 0 c -2.199219 0 -4 1.800781 -4 4 v 1 c 0 0.550781 0.449219 1 1 1 s 1 -0.449219 1 -1 v -1 c 0 -1.125 0.875 -2 2 -2 s 2 0.875 2 2 v 4 h -6 c -1.109375 0 -2 0.890625 -2 2 v 5 c 0 0.554688 0.445312 1 1 1 h 10 c 0.554688 0 1 -0.445312 1 -1 v -5 c 0 -1.109375 -0.890625 -2 -2 -2 v -4 c 0 -2.199219 -1.800781 -4 -4 -4 z m 0 0" fill="#F03600"/> +</svg> diff --git a/main/src/ui/chat_input/chat_input_controller.vala b/main/src/ui/chat_input/chat_input_controller.vala index d1c42d35..cee5fb71 100644 --- a/main/src/ui/chat_input/chat_input_controller.vala +++ b/main/src/ui/chat_input/chat_input_controller.vala @@ -103,7 +103,7 @@ public class ChatInputController : Object { private void on_encryption_changed(Encryption encryption) { reset_input_field_status(); - if (encryption == Encryption.NONE) return; + if (encryption == Encryption.NONE) status_description_label.label = "This message won't be end-to-end encrypted." ; return; Application app = GLib.Application.get_default() as Application; var encryption_entry = app.plugin_registry.encryption_list_entries[encryption]; diff --git a/main/src/ui/chat_input/encryption_button.vala b/main/src/ui/chat_input/encryption_button.vala index 1f991338..2dd35ae9 100644 --- a/main/src/ui/chat_input/encryption_button.vala +++ b/main/src/ui/chat_input/encryption_button.vala @@ -72,7 +72,7 @@ public class EncryptionButton { } private void update_encryption_menu_icon() { - set_icon(conversation.encryption == Encryption.NONE ? "changes-allow-symbolic" : "changes-prevent-symbolic"); + set_icon(conversation.encryption == Encryption.NONE ? "dino-unencrypted" : "changes-prevent-symbolic"); } private void update_visibility() { @@ -111,4 +111,4 @@ public class EncryptionButton { } } -}
\ No newline at end of file +} 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 5c71d4fb..e4decccd 100644 --- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala +++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala @@ -156,7 +156,7 @@ public class ConversationItemSkeleton : Plugins.ConversationItemWidgetInterface, encryption_image.visible = true; if (item.encryption == Encryption.OMEMO) { encryption_image.tooltip_text = Util.string_if_tooltips_active(_("This message is OMEMO encrypted.")); - Util.force_color(encryption_image, "#659E4F"); + Util.force_color(encryption_image, "#0AEC00"); } if (item.encryption == Encryption.PGP) { encryption_image.tooltip_text = Util.string_if_tooltips_active(_("This message is PGP encrypted.")); @@ -168,7 +168,7 @@ public class ConversationItemSkeleton : Plugins.ConversationItemWidgetInterface, if (conversation.encryption != Encryption.NONE) { encryption_image.icon_name = "changes-allow-symbolic"; encryption_image.tooltip_text = Util.string_if_tooltips_active(_("Unencrypted")); - Util.force_error_color(encryption_image); + Util.force_color(encryption_image, "#F02900"); encryption_image.visible = true; } else if (conversation.encryption == Encryption.NONE) { encryption_image.icon_name = null; |