diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-10 19:53:24 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-10 19:53:24 +0100 |
commit | 24b55d83a1f9e21b028c8d5ac9778e75565f417d (patch) | |
tree | 195b0f332e32d08e1a18fc3d8a5a6725c5ed11d7 /libdino/src/ui/conversation_summary/status_item.vala | |
parent | 4c48c5c16d5f5b010c2e5dfb1affcb59f937510c (diff) | |
parent | 29ca70a6d534e1cd79963718c793ae740318cff1 (diff) | |
download | dino-24b55d83a1f9e21b028c8d5ac9778e75565f417d.tar.gz dino-24b55d83a1f9e21b028c8d5ac9778e75565f417d.zip |
Merge branch 'master' of github.com:dino/dino
Diffstat (limited to 'libdino/src/ui/conversation_summary/status_item.vala')
-rw-r--r-- | libdino/src/ui/conversation_summary/status_item.vala | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libdino/src/ui/conversation_summary/status_item.vala b/libdino/src/ui/conversation_summary/status_item.vala new file mode 100644 index 00000000..0775d8f3 --- /dev/null +++ b/libdino/src/ui/conversation_summary/status_item.vala @@ -0,0 +1,30 @@ +using Gtk; +using Markup; + +using Dino.Entities; + +namespace Dino.Ui.ConversationSummary { + +private class StatusItem : Grid { + + private Image image = new Image(); + private Label label = new Label(""); + + private StreamInteractor stream_interactor; + private Conversation conversation; + + public StatusItem(StreamInteractor stream_interactor, Conversation conversation, string? text) { + Object(column_spacing : 7); + set_hexpand(true); + this.stream_interactor = stream_interactor; + this.conversation = conversation; + image.set_from_pixbuf((new AvatarGenerator(30, 30)).set_greyscale(true).draw_conversation(stream_interactor, conversation)); + attach(image, 0, 0, 1, 1); + attach(label, 1, 0, 1, 1); + string display_name = Util.get_display_name(stream_interactor, conversation.counterpart, conversation.account); + label.set_markup(@"<span foreground=\"#B1B1B1\"> $(escape_text(display_name)) $text </span>"); + show_all(); + } +} + +}
\ No newline at end of file |