aboutsummaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-10-16 00:23:51 +0200
committerfiaxh <git@mx.ax.lt>2017-10-22 18:26:31 +0200
commit9ea16b6d8568cb383eb1f469d1dc54bfcad4f188 (patch)
tree27da8705fc99f2407af5e60083e34ddeeff39630 /main/src
parent8b43df8ec3f92477f857280668a9f29f0b9d6229 (diff)
downloaddino-9ea16b6d8568cb383eb1f469d1dc54bfcad4f188.tar.gz
dino-9ea16b6d8568cb383eb1f469d1dc54bfcad4f188.zip
PGP encrypted file transfers
Diffstat (limited to 'main/src')
-rw-r--r--main/src/ui/conversation_summary/file_populator.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/src/ui/conversation_summary/file_populator.vala b/main/src/ui/conversation_summary/file_populator.vala
index d1a26d12..99185f6b 100644
--- a/main/src/ui/conversation_summary/file_populator.vala
+++ b/main/src/ui/conversation_summary/file_populator.vala
@@ -41,7 +41,7 @@ class FilePopulator : Plugins.ConversationItemPopulator, Object {
public void populate_between_widgets(Conversation conversation, DateTime from, DateTime to) { }
private void insert_file(FileTransfer transfer) {
- if (transfer.mime_type.has_prefix("image")) {
+ if (transfer.mime_type != null && transfer.mime_type.has_prefix("image")) {
item_collection.insert_item(new ImageItem(stream_interactor, transfer));
}
}
@@ -81,7 +81,7 @@ public class ImageItem : Plugins.MetaConversationItem {
public override Object get_widget(Plugins.WidgetType widget_type) {
Image image = new Image() { halign=Align.START, visible = true };
- Gdk.Pixbuf pixbuf = new Gdk.Pixbuf.from_stream(file_transfer.input_stream);
+ Gdk.Pixbuf pixbuf = new Gdk.Pixbuf.from_file(file_transfer.get_uri());
int max_scaled_height = MAX_HEIGHT * image.scale_factor;
if (pixbuf.height > max_scaled_height) {