aboutsummaryrefslogtreecommitdiff
path: root/client/src/ui/manage_accounts/account_row.vala
blob: 6ca4daf6f3828fc10e2f8baf1351a96ccd4b99d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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());
    }
}
}