aboutsummaryrefslogtreecommitdiff
path: root/plugins/http-files
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-08-29 21:51:08 +0200
committerMarvin W <git@larma.de>2017-08-29 22:09:07 +0200
commitb428c3a627e7de45b7a9cde85893dcca06926561 (patch)
treeef72a6ec70dc559c1db18b6c1e3617f8a54324ca /plugins/http-files
parent7c2023803ebdc83393d6ea56287222a223febc3d (diff)
downloaddino-b428c3a627e7de45b7a9cde85893dcca06926561.tar.gz
dino-b428c3a627e7de45b7a9cde85893dcca06926561.zip
support platforms without UTF-8 and use native file picker
Diffstat (limited to 'plugins/http-files')
-rw-r--r--plugins/http-files/src/contact_titlebar_entry.vala8
1 files changed, 3 insertions, 5 deletions
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) {