summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2010-11-01 23:39:23 +0100
committerAraq <rumpf_a@web.de>2010-11-01 23:39:23 +0100
commit651686cdfef62f452e9604301e09f36da08fa764 (patch)
treed9fa884d4af5801b846c9527482112430516170f
parent5055d307535e5e05e3ec5630107080a9aefbf2ea (diff)
downloadNim-651686cdfef62f452e9604301e09f36da08fa764.tar.gz
bugfix: dialogs.ChooseFilesToOpen
-rwxr-xr-xlib/impure/dialogs.nim4
-rwxr-xr-xweb/news.txt2
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/impure/dialogs.nim b/lib/impure/dialogs.nim
index c0b077177..348fe76a8 100755
--- a/lib/impure/dialogs.nim
+++ b/lib/impure/dialogs.nim
@@ -129,6 +129,10 @@ proc ChooseFilesToOpen*(window: PWindow, root: string = ""): seq[string] =
           inc(i)
           if buf[i] == '\0': break
         for i in 0..result.len-1: result[i] = os.joinPath(path, result[i])
+      else:
+        # only one file selected --> gosh, what an ungly thing 
+        # the windows API is
+        add(result, path) 
   else:
     var chooser = file_chooser_dialog_new("Open Files", window,
                 FILE_CHOOSER_ACTION_OPEN,
diff --git a/web/news.txt b/web/news.txt
index af0ce1fbd..21773a05c 100755
--- a/web/news.txt
+++ b/web/news.txt
@@ -11,6 +11,8 @@ Bugfixes
 - Bugfix: ``httpclient`` correct passes the path starting with ``/``.
 - Bugfixes for the ``htmlparser`` module.
 - Bugfix: ``pegs.find`` did not respect ``start`` parameter.
+- Bugfix: ``dialogs.ChooseFilesToOpen`` did not work if only one file is
+  selected.
 
 
 Additions