aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/manage_accounts/dialog.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2018-01-16 16:17:42 +0100
committerfiaxh <git@mx.ax.lt>2018-01-28 00:38:47 +0100
commitca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce (patch)
tree9c8f9487904b8f59fc7edfc658e64914e4eac579 /main/src/ui/manage_accounts/dialog.vala
parent03a349bfafe7e65abdbb692707e3361a9fdc57f4 (diff)
downloaddino-ca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce.tar.gz
dino-ca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce.zip
Render avatar on demand
Diffstat (limited to 'main/src/ui/manage_accounts/dialog.vala')
-rw-r--r--main/src/ui/manage_accounts/dialog.vala6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/src/ui/manage_accounts/dialog.vala b/main/src/ui/manage_accounts/dialog.vala
index 6fb0c427..8f2b76a7 100644
--- a/main/src/ui/manage_accounts/dialog.vala
+++ b/main/src/ui/manage_accounts/dialog.vala
@@ -19,7 +19,7 @@ public class Dialog : Gtk.Dialog {
[GtkChild] public Button no_accounts_add;
[GtkChild] public ToolButton add_account_button;
[GtkChild] public ToolButton remove_account_button;
- [GtkChild] public Image image;
+ [GtkChild] public AvatarImage image;
[GtkChild] public Button image_button;
[GtkChild] public Label jid_label;
[GtkChild] public Label state_label;
@@ -185,14 +185,14 @@ public class Dialog : Gtk.Dialog {
private void on_received_avatar(Pixbuf pixbuf, Jid jid, Account account) {
if (selected_account.equals(account) && jid.equals(account.bare_jid)) {
- Util.image_set_from_scaled_pixbuf(image, (new AvatarGenerator(50, 50, image.scale_factor)).draw_account(stream_interactor, account));
+ image.set_jid(stream_interactor, account.bare_jid, account);
}
}
private void populate_grid_data(Account account) {
active_switch.state_set.disconnect(change_account_state);
- Util.image_set_from_scaled_pixbuf(image, (new AvatarGenerator(50, 50, image.scale_factor)).draw_account(stream_interactor, account));
+ image.set_jid(stream_interactor, account.bare_jid, account);
active_switch.set_active(account.enabled);
jid_label.label = account.bare_jid.to_string();