From 2a7063d9920eebc9abaf8ba41315336a40eb4b9d Mon Sep 17 00:00:00 2001 From: fiaxh Date: Thu, 21 Mar 2024 13:34:04 +0100 Subject: [PATCH] Remove conversation closing via hover button --- main/data/conversation_row.ui | 103 ++++-------------- .../conversation_selector_row.vala | 20 ---- 2 files changed, 24 insertions(+), 99 deletions(-) diff --git a/main/data/conversation_row.ui b/main/data/conversation_row.ui index 3bd5527d..c59ab8e0 100644 --- a/main/data/conversation_row.ui +++ b/main/data/conversation_row.ui @@ -38,19 +38,12 @@ - - slide-right - 50 - True - - - False - 1 - - - - - + + False + 1 + + + @@ -88,33 +81,26 @@ - - slide-right - 50 - True + + horizontal 15 + 6 - - horizontal - 6 - - - False - False - 0.5 - - - - - - - - - view-pin-symbolic - 12 - False - - + + False + False + 0.5 + + + + + + + + + view-pin-symbolic + 12 + False @@ -123,47 +109,6 @@ - - - vertical - - - True - - - - - slide-left - 100 - False - - - 27 - 27 - False - 5 - - - - window-close-symbolic - 1 - - - - - - - - - True - - - - diff --git a/main/src/ui/conversation_selector/conversation_selector_row.vala b/main/src/ui/conversation_selector/conversation_selector_row.vala index 1bcf6962..c180b6b3 100644 --- a/main/src/ui/conversation_selector/conversation_selector_row.vala +++ b/main/src/ui/conversation_selector/conversation_selector_row.vala @@ -18,10 +18,6 @@ public class ConversationSelectorRow : ListBoxRow { [GtkChild] protected unowned Label nick_label; [GtkChild] protected unowned Label message_label; [GtkChild] protected unowned Label unread_count_label; - [GtkChild] protected unowned Button x_button; - [GtkChild] protected unowned Revealer time_revealer; - [GtkChild] protected unowned Revealer xbutton_revealer; - [GtkChild] protected unowned Revealer top_row_revealer; [GtkChild] protected unowned Image pinned_image; [GtkChild] public unowned Revealer main_revealer; @@ -98,9 +94,6 @@ public class ConversationSelectorRow : ListBoxRow { last_content_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_latest(conversation); - x_button.clicked.connect(() => { - stream_interactor.get_module(ConversationManager.IDENTITY).close_conversation(conversation); - }); picture.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).set_conversation(conversation); conversation.notify["read-up-to-item"].connect(() => update_read()); conversation.notify["pinned"].connect(() => { update_pinned_icon(); }); @@ -270,19 +263,6 @@ public class ConversationSelectorRow : ListBoxRow { } } - public override void state_flags_changed(StateFlags flags) { - StateFlags curr_flags = get_state_flags(); - if ((curr_flags & StateFlags.PRELIGHT) != 0) { - time_revealer.set_reveal_child(false); - top_row_revealer.set_reveal_child(false); - xbutton_revealer.set_reveal_child(true); - } else { - time_revealer.set_reveal_child(true); - top_row_revealer.set_reveal_child(true); - xbutton_revealer.set_reveal_child(false); - } - } - private static Regex dino_resource_regex = /^dino\.[a-f0-9]{8}$/; private Widget generate_tooltip() {