From b428c3a627e7de45b7a9cde85893dcca06926561 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 29 Aug 2017 21:51:08 +0200 Subject: support platforms without UTF-8 and use native file picker --- plugins/http-files/src/contact_titlebar_entry.vala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'plugins/http-files') diff --git a/plugins/http-files/src/contact_titlebar_entry.vala b/plugins/http-files/src/contact_titlebar_entry.vala index 064adca9..3fd8ee39 100644 --- a/plugins/http-files/src/contact_titlebar_entry.vala +++ b/plugins/http-files/src/contact_titlebar_entry.vala @@ -35,10 +35,9 @@ public class ConversationTitlebarWidget : Button, Plugins.ConversationTitlebarWi } public void on_clicked() { - FileChooserDialog chooser = new FileChooserDialog ( - "Select file", null, FileChooserAction.OPEN, - "Cancel", ResponseType.CANCEL, - "Select", ResponseType.ACCEPT); + FileChooserNative chooser = new FileChooserNative ( + "Select file", get_toplevel() as Window, FileChooserAction.OPEN, + "Select", "Cancel"); int? max_file_size = stream_interactor.get_module(Manager.IDENTITY).get_max_file_size(conversation.account); if (max_file_size != null) { FileFilter filter = new FileFilter(); @@ -53,7 +52,6 @@ public class ConversationTitlebarWidget : Button, Plugins.ConversationTitlebarWi string uri = chooser.get_filename(); stream_interactor.get_module(Manager.IDENTITY).send(conversation, uri); } - chooser.close(); } public void on_upload_available(Account account) { -- cgit v1.2.3-70-g09d2