diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-31 01:17:01 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-31 16:39:28 +0200 |
commit | 22adbd38dca0868f0e10754314a3859bba0a7d87 (patch) | |
tree | 44ecf9cf8af6aef78030dade95aecb1de2b99873 /main/src/ui/conversation_selector/conversation_row.vala | |
parent | 7d2f995a097086be01426cc79c9c801dabaf9e3b (diff) | |
download | dino-22adbd38dca0868f0e10754314a3859bba0a7d87.tar.gz dino-22adbd38dca0868f0e10754314a3859bba0a7d87.zip |
Handle MUC private messages
Diffstat (limited to 'main/src/ui/conversation_selector/conversation_row.vala')
-rw-r--r-- | main/src/ui/conversation_selector/conversation_row.vala | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/main/src/ui/conversation_selector/conversation_row.vala b/main/src/ui/conversation_selector/conversation_row.vala index 6930db67..ce8845f2 100644 --- a/main/src/ui/conversation_selector/conversation_row.vala +++ b/main/src/ui/conversation_selector/conversation_row.vala @@ -120,6 +120,29 @@ public abstract class ConversationRow : ListBoxRow { message_label.label = message_label.label; } + protected Box get_fulljid_box(Jid full_jid) { + Box box = new Box(Orientation.HORIZONTAL, 5) { visible=true }; + + Show show = stream_interactor.get_module(PresenceManager.IDENTITY).get_last_show(full_jid, conversation.account); + Image image = new Image() { visible=true }; + if (show.as == Show.AWAY) { + image.set_from_icon_name("dino-status-away", IconSize.SMALL_TOOLBAR); + } else if (show.as == Show.XA || show.as == Show.DND) { + image.set_from_icon_name("dino-status-dnd", IconSize.SMALL_TOOLBAR); + } else if (show.as == Show.CHAT) { + image.set_from_icon_name("dino-status-chat", IconSize.SMALL_TOOLBAR); + } else { + image.set_from_icon_name("dino-status-online", IconSize.SMALL_TOOLBAR); + } + box.add(image); + + Label resource = new Label(full_jid.resourcepart) { visible=true }; + resource.xalign = 0; + box.add(resource); + box.show_all(); + return box; + } + private void on_x_button_clicked() { main_revealer.set_transition_type(RevealerTransitionType.SLIDE_UP); main_revealer.set_reveal_child(false); |