From ea5d3e50c6fd63ae3a151c883f691e76b9cb1018 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 3 Apr 2017 19:20:31 +0200 Subject: Start private conversation with MUC occupant via occupant menu --- main/src/ui/occupant_menu/list_row.vala | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 main/src/ui/occupant_menu/list_row.vala (limited to 'main/src/ui/occupant_menu/list_row.vala') diff --git a/main/src/ui/occupant_menu/list_row.vala b/main/src/ui/occupant_menu/list_row.vala new file mode 100644 index 00000000..b8b95758 --- /dev/null +++ b/main/src/ui/occupant_menu/list_row.vala @@ -0,0 +1,30 @@ +using Gtk; + +using Dino.Entities; +using Xmpp; + +namespace Dino.Ui.OccupantMenu { + +[GtkTemplate (ui = "/org/dino-im/occupant_list_item.ui")] +public class ListRow : ListBoxRow { + + [GtkChild] private Image image; + [GtkChild] public Label name_label; + + public Account account; + public Jid jid; + + public ListRow(StreamInteractor stream_interactor, Account account, Jid jid) { + this.account = account; + this.jid = jid; + + name_label.label = Util.get_display_name(stream_interactor, jid, account); + Util.image_set_from_scaled_pixbuf(image, (new AvatarGenerator(30, 30, image.scale_factor)).draw_jid(stream_interactor, jid, account)); + } + + public void on_presence_received(Presence.Stanza presence) { + + } +} + +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf