From df3716622a37cded9e3754da77497ca6d2f2baeb Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 30 Sep 2019 02:11:23 +0200 Subject: [PATCH] Rework no-open-conversation placeholder --- libdino/src/plugin/interfaces.vala | 1 + libdino/src/service/conversation_manager.vala | 1 + main/CMakeLists.txt | 1 + ...no-conversation-list-placeholder-arrow.svg | 11 ++ main/data/unified_main_content.ui | 163 ++++++++++++++---- main/data/unified_window_placeholder.ui | 3 +- .../ui/conversation_titlebar/menu_entry.vala | 8 +- .../occupants_entry.vala | 6 +- .../conversation_titlebar/search_entry.vala | 1 + main/src/ui/unified_window.vala | 17 +- main/src/ui/unified_window_controller.vala | 24 ++- 11 files changed, 191 insertions(+), 45 deletions(-) create mode 100644 main/data/icons/dino-conversation-list-placeholder-arrow.svg diff --git a/libdino/src/plugin/interfaces.vala b/libdino/src/plugin/interfaces.vala index 41929ac0..2c9fb69d 100644 --- a/libdino/src/plugin/interfaces.vala +++ b/libdino/src/plugin/interfaces.vala @@ -70,6 +70,7 @@ public interface ConversationTitlebarEntry : Object { public interface ConversationTitlebarWidget : Object { public abstract void set_conversation(Conversation conversation); + public abstract void unset_conversation(); } public abstract interface ConversationItemPopulator : Object { diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala index 10ba5f6d..1ba53b35 100644 --- a/libdino/src/service/conversation_manager.vala +++ b/libdino/src/service/conversation_manager.vala @@ -143,6 +143,7 @@ public class ConversationManager : StreamInteractionModule, Object { if(conversation.active) conversation_deactivated(conversation); } } + conversations.unset(account); } private class MessageListener : Dino.MessageListener { diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 84bd0044..ae3cd494 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -14,6 +14,7 @@ find_packages(MAIN_PACKAGES REQUIRED set(RESOURCE_LIST icons/dino-changes-prevent-symbolic.svg + icons/dino-conversation-list-placeholder-arrow.svg icons/dino-double-tick-symbolic.svg icons/dino-emoticon-symbolic.svg icons/dino-qr-code-symbolic.svg diff --git a/main/data/icons/dino-conversation-list-placeholder-arrow.svg b/main/data/icons/dino-conversation-list-placeholder-arrow.svg new file mode 100644 index 00000000..1de38347 --- /dev/null +++ b/main/data/icons/dino-conversation-list-placeholder-arrow.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/main/data/unified_main_content.ui b/main/data/unified_main_content.ui index 9e660b50..587fb706 100644 --- a/main/data/unified_main_content.ui +++ b/main/data/unified_main_content.ui @@ -5,14 +5,56 @@ horizontal True - - True - never + True - + + True + never True + + + True + + + + content + + + + + 20 + 10 + start + start + True + + + True + start + + + + + + True + 70 + 50 + True + end + Click here to start a conversation or join a channel + + + + + + placeholder + @@ -24,54 +66,99 @@ True - + True - - vertical + True - - - True - - - - - True - - - - - - - end - end - crossfade - True - 30 - 70 - - - False - end - end + + vertical True - - go-down-symbolic - 1 + + True + + + + True + + + end + end + crossfade + True + 30 + 70 + + + False + end + end + True + + + + go-down-symbolic + 1 + True + + + + + + + + content + + + + + vertical + True + center + center + True + + + im.dino.Dino-symbolic + 144 + 30 + True + + + + + + True + You have no open chats + 0.5 + 0.5 + + + + + + + + + placeholder + diff --git a/main/data/unified_window_placeholder.ui b/main/data/unified_window_placeholder.ui index a16d98d4..cfabd132 100644 --- a/main/data/unified_window_placeholder.ui +++ b/main/data/unified_window_placeholder.ui @@ -6,7 +6,6 @@ vertical - 10 center center True @@ -38,6 +37,7 @@ 0.5 0.5 + 5 True