diff options
-rw-r--r-- | main/data/conversation_row.ui | 97 | ||||
-rw-r--r-- | main/src/ui/conversation_selector/conversation_selector_row.vala | 20 |
2 files changed, 21 insertions, 96 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 @@ </object> </child> <child> - <object class="GtkRevealer" id="time_revealer"> - <property name="transition-type">slide-right</property> - <property name="transition-duration">50</property> - <property name="reveal-child">True</property> - <child> - <object class="GtkLabel" id="time_label"> - <property name="hexpand">False</property> - <property name="xalign">1</property> - <attributes> - <attribute name="scale" value="0.7"/> - </attributes> - </object> - </child> + <object class="GtkLabel" id="time_label"> + <property name="hexpand">False</property> + <property name="xalign">1</property> + <attributes> + <attribute name="scale" value="0.7"/> + </attributes> </object> </child> </object> @@ -88,80 +81,32 @@ </object> </child> <child> - <object class="GtkRevealer" id="top_row_revealer"> - <property name="transition-type">slide-right</property> - <property name="transition-duration">50</property> - <property name="reveal-child">True</property> + <object class="GtkBox"> + <property name="orientation">horizontal</property> <property name="margin-start">15</property> + <property name="spacing">6</property> <child> - <object class="GtkBox"> - <property name="orientation">horizontal</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="unread_count_label"> - <property name="vexpand">False</property> - <property name="visible">False</property> - <property name="xalign">0.5</property> - <attributes> - <attribute name="scale" value="0.6"/> - <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> - </attributes> - </object> - </child> - <child> - <object class="GtkImage" id="pinned_image"> - <property name="icon-name">view-pin-symbolic</property> - <property name="pixel-size">12</property> - <property name="visible">False</property> - </object> - </child> + <object class="GtkLabel" id="unread_count_label"> + <property name="vexpand">False</property> + <property name="visible">False</property> + <property name="xalign">0.5</property> + <attributes> + <attribute name="scale" value="0.6"/> + <attribute name="weight" value="PANGO_WEIGHT_BOLD"/> + </attributes> </object> </child> - </object> - </child> - </object> - </child> - </object> - </child> - <child> - <object class="GtkBox"> - <property name="orientation">vertical</property> - <child> - <object class="GtkBox"> - <property name="vexpand">True</property> - </object> - </child> - <child> - <object class="GtkRevealer" id="xbutton_revealer"> - <property name="transition-type">slide-left</property> - <property name="transition-duration">100</property> - <property name="reveal-child">False</property> - <child> - <object class="GtkButton" id="x_button"> - <property name="width-request">27</property> - <property name="height-request">27</property> - <property name="vexpand">False</property> - <property name="margin-start">5</property> - <style> - <class name="conversation_list_row_xbutton"/> - <class name="circular"/> - <class name="flat"/> - </style> <child> - <object class="GtkImage"> - <property name="icon-name">window-close-symbolic</property> - <property name="icon-size">1</property> + <object class="GtkImage" id="pinned_image"> + <property name="icon-name">view-pin-symbolic</property> + <property name="pixel-size">12</property> + <property name="visible">False</property> </object> </child> </object> </child> </object> </child> - <child> - <object class="GtkBox"> - <property name="vexpand">True</property> - </object> - </child> </object> </child> </object> 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() { |