aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/add_conversation
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/add_conversation
parent03a349bfafe7e65abdbb692707e3361a9fdc57f4 (diff)
downloaddino-ca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce.tar.gz
dino-ca331e85efe2a74a6b9b5a5ff0fbcd10a36758ce.zip
Render avatar on demand
Diffstat (limited to 'main/src/ui/add_conversation')
-rw-r--r--main/src/ui/add_conversation/conference_list.vala2
-rw-r--r--main/src/ui/add_conversation/list_row.vala4
-rw-r--r--main/src/ui/add_conversation/select_jid_fragment.vala2
3 files changed, 4 insertions, 4 deletions
diff --git a/main/src/ui/add_conversation/conference_list.vala b/main/src/ui/add_conversation/conference_list.vala
index dfe80a66..b9f13432 100644
--- a/main/src/ui/add_conversation/conference_list.vala
+++ b/main/src/ui/add_conversation/conference_list.vala
@@ -94,7 +94,7 @@ internal class ConferenceListRow : ListRow {
via_label.visible = false;
}
- image.set_from_pixbuf((new AvatarGenerator(35, 35)).set_stateless(true).draw_jid(stream_interactor, jid, account));
+ image.set_jid(stream_interactor, jid, account);
}
}
diff --git a/main/src/ui/add_conversation/list_row.vala b/main/src/ui/add_conversation/list_row.vala
index ffc1802b..2d15c32a 100644
--- a/main/src/ui/add_conversation/list_row.vala
+++ b/main/src/ui/add_conversation/list_row.vala
@@ -9,7 +9,7 @@ namespace Dino.Ui {
[GtkTemplate (ui = "/im/dino/Dino/add_conversation/list_row.ui")]
public class ListRow : ListBoxRow {
- [GtkChild] public Image image;
+ [GtkChild] public AvatarImage image;
[GtkChild] public Label name_label;
[GtkChild] public Label via_label;
@@ -33,7 +33,7 @@ public class ListRow : ListBoxRow {
via_label.visible = false;
}
name_label.label = display_name;
- Util.image_set_from_scaled_pixbuf(image, (new AvatarGenerator(35, 35, image.scale_factor)).draw_jid(stream_interactor, jid, account));
+ image.set_jid(stream_interactor, jid, account);
}
}
diff --git a/main/src/ui/add_conversation/select_jid_fragment.vala b/main/src/ui/add_conversation/select_jid_fragment.vala
index aca0a937..09792c75 100644
--- a/main/src/ui/add_conversation/select_jid_fragment.vala
+++ b/main/src/ui/add_conversation/select_jid_fragment.vala
@@ -92,7 +92,7 @@ public class SelectJidFragment : Gtk.Box {
} else {
via_label.visible = false;
}
- image.set_from_pixbuf((new AvatarGenerator(35, 35)).set_greyscale(true).draw_text("?"));
+ image.set_text("?");
}
}
}