aboutsummaryrefslogtreecommitdiff
path: root/client/src/ui/manage_accounts/account_row.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-02 15:37:32 +0100
committerfiaxh <git@mx.ax.lt>2017-03-02 15:37:32 +0100
commit56bc45ce4d07a7a9a415e9dc8ad2f7c3f3c9e48d (patch)
tree0bd0c2c80cb81179c26282fb3fbe8fd22983f40b /client/src/ui/manage_accounts/account_row.vala
downloaddino-56bc45ce4d07a7a9a415e9dc8ad2f7c3f3c9e48d.tar.gz
dino-56bc45ce4d07a7a9a415e9dc8ad2f7c3f3c9e48d.zip
Initial commit
Diffstat (limited to 'client/src/ui/manage_accounts/account_row.vala')
-rw-r--r--client/src/ui/manage_accounts/account_row.vala24
1 files changed, 24 insertions, 0 deletions
diff --git a/client/src/ui/manage_accounts/account_row.vala b/client/src/ui/manage_accounts/account_row.vala
new file mode 100644
index 00000000..6ca4daf6
--- /dev/null
+++ b/client/src/ui/manage_accounts/account_row.vala
@@ -0,0 +1,24 @@
+using Gtk;
+
+using Dino.Entities;
+
+namespace Dino.Ui.ManageAccounts {
+
+[GtkTemplate (ui = "/org/dino-im/manage_accounts/account_row.ui")]
+public class AccountRow : Gtk.ListBoxRow {
+
+ [GtkChild]
+ public Image image;
+
+ [GtkChild]
+ public Label jid_label;
+
+ public Account account;
+
+ public AccountRow(StreamInteractor stream_interactor, Account account) {
+ this.account = account;
+ Util.image_set_from_scaled_pixbuf(image, (new AvatarGenerator(40, 40, image.scale_factor)).draw_account(stream_interactor, account));
+ jid_label.set_label(account.bare_jid.to_string());
+ }
+}
+} \ No newline at end of file