aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/manage_accounts/account_row.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-03-11 23:52:12 +0100
committerMarvin W <git@larma.de>2017-03-11 23:58:35 +0100
commite27d63269d0b41fa8d5b5f0f2e4a9dc7de4b9ab9 (patch)
tree80e547d0e02e770e8bcd912e42f8afa753aeb0f6 /main/src/ui/manage_accounts/account_row.vala
parentcd6b904e970291a63551d0f1d80bbd550e778ec8 (diff)
downloaddino-e27d63269d0b41fa8d5b5f0f2e4a9dc7de4b9ab9.tar.gz
dino-e27d63269d0b41fa8d5b5f0f2e4a9dc7de4b9ab9.zip
Move UI code into main dir
Diffstat (limited to 'main/src/ui/manage_accounts/account_row.vala')
-rw-r--r--main/src/ui/manage_accounts/account_row.vala22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/src/ui/manage_accounts/account_row.vala b/main/src/ui/manage_accounts/account_row.vala
new file mode 100644
index 00000000..5e4570f0
--- /dev/null
+++ b/main/src/ui/manage_accounts/account_row.vala
@@ -0,0 +1,22 @@
+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