From 1c6bb84e7f843bf93f8821a87f554431253720d7 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Sun, 17 Sep 2017 00:13:55 +0000 Subject: [PATCH] downloader: display URL in GUI when loaded with URL in parameters. git-svn-id: svn://kolibrios.org@6977 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/downloader/downloader.asm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/programs/network/downloader/downloader.asm b/programs/network/downloader/downloader.asm index 9f8647b0d9..bd36507368 100644 --- a/programs/network/downloader/downloader.asm +++ b/programs/network/downloader/downloader.asm @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; -;; Copyright (C) KolibriOS team 2014-2015. All rights reserved. ;; +;; Copyright (C) KolibriOS team 2014-2017. All rights reserved. ;; ;; Distributed under terms of the GNU General Public License ;; ;; ;; ;; downloader.asm - HTTP client for KolibriOS ;; @@ -69,7 +69,7 @@ START: ; If user provided parameters, start download right away! cmp byte[url], 0 - jne download + jne display_url_and_download mov [OpenDialog_data.draw_window], draw_window @@ -118,6 +118,13 @@ open_file: mcall 70, fileopen jmp mainloop +display_url_and_download: + xor al, al + mov ecx, 4096 + mov edi, url + repne scasb + sub edi, url+1 + mov [edit1.size], edi download: ; Extract the filename from URL