From 914fc45666cd4c434919df145ee39b83b48c8eea Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 5 Jan 2009 08:47:55 +0900 Subject: [PATCH] support drag & drop from konqueror too --- ankiqt/ui/facteditor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index cf1c1fe4f..1f9b64b64 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -595,7 +595,8 @@ class FactEdit(QTextEdit): audio = ("wav", "mp3", "ogg", "flac") if source.hasText(): txt = unicode(source.text()) - if txt.lower().startswith("http://"): + l = txt.lower() + if l.startswith("http://") or l.startswith("file://"): if not source.hasImage(): # firefox on linux just gives us a url ext = txt.split(".")[-1].lower()