Remove conversation closing via hover button
This commit is contained in:
parent
209b657133
commit
2a7063d992
|
@ -37,11 +37,6 @@
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</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>
|
<child>
|
||||||
<object class="GtkLabel" id="time_label">
|
<object class="GtkLabel" id="time_label">
|
||||||
<property name="hexpand">False</property>
|
<property name="hexpand">False</property>
|
||||||
|
@ -53,8 +48,6 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="valign">end</property>
|
<property name="valign">end</property>
|
||||||
|
@ -87,15 +80,10 @@
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</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>
|
|
||||||
<property name="margin-start">15</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<property name="orientation">horizontal</property>
|
<property name="orientation">horizontal</property>
|
||||||
|
<property name="margin-start">15</property>
|
||||||
<property name="spacing">6</property>
|
<property name="spacing">6</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="unread_count_label">
|
<object class="GtkLabel" id="unread_count_label">
|
||||||
|
@ -123,49 +111,6 @@
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</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>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox">
|
|
||||||
<property name="vexpand">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -18,10 +18,6 @@ public class ConversationSelectorRow : ListBoxRow {
|
||||||
[GtkChild] protected unowned Label nick_label;
|
[GtkChild] protected unowned Label nick_label;
|
||||||
[GtkChild] protected unowned Label message_label;
|
[GtkChild] protected unowned Label message_label;
|
||||||
[GtkChild] protected unowned Label unread_count_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] protected unowned Image pinned_image;
|
||||||
[GtkChild] public unowned Revealer main_revealer;
|
[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);
|
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);
|
picture.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).set_conversation(conversation);
|
||||||
conversation.notify["read-up-to-item"].connect(() => update_read());
|
conversation.notify["read-up-to-item"].connect(() => update_read());
|
||||||
conversation.notify["pinned"].connect(() => { update_pinned_icon(); });
|
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 static Regex dino_resource_regex = /^dino\.[a-f0-9]{8}$/;
|
||||||
|
|
||||||
private Widget generate_tooltip() {
|
private Widget generate_tooltip() {
|
||||||
|
|
Loading…
Reference in a new issue