Rev 7746 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7746 | Rev 7765 | ||
---|---|---|---|
Line 87... | Line 87... | ||
87 | DrawDownloading(); |
87 | DrawDownloading(); |
88 | } |
88 | } |
89 | if (downloader.state == STATE_COMPLETED) |
89 | if (downloader.state == STATE_COMPLETED) |
90 | { |
90 | { |
91 | SaveDownloadedFile(); |
91 | SaveDownloadedFile(); |
- | 92 | if (download_and_exit) ExitProcess(); |
|
92 | StopDownloading(); |
93 | StopDownloading(); |
93 | DL_Draw_Window(); |
94 | DL_Draw_Window(); |
94 | break; |
95 | break; |
95 | } |
96 | } |
96 | } |
97 | } |
Line 143... | Line 144... | ||
143 | if (strncmp(#downloader_edit,"http://",7)!=0) { |
144 | if (strncmp(#downloader_edit,"http://",7)!=0) { |
144 | notify("'File address should start from http://' -E"); |
145 | notify("'File address should start from http://' -E"); |
145 | return; |
146 | return; |
146 | } |
147 | } |
147 | if (!downloader.Start(#downloader_edit)) { |
148 | if (!downloader.Start(#downloader_edit)) { |
- | 149 | if (download_and_exit) ExitProcess(); |
|
148 | notify("'Error while starting download process.\nPlease, check entered path and internet connection.' -E"); |
150 | notify("'Error while starting download process.\nPlease, check entered path and internet connection.' -E"); |
149 | StopDownloading(); |
151 | StopDownloading(); |
150 | return; |
152 | return; |
151 | } |
153 | } |
152 | ed.blur_border_color = 0xCACACA; |
154 | ed.blur_border_color = 0xCACACA; |
Line 215... | Line 217... | ||
215 | } |
217 | } |
216 | sprintf(#filepath, "%s/%s", #save_to, #aux+strrchr(#aux, '/')); |
218 | sprintf(#filepath, "%s/%s", #save_to, #aux+strrchr(#aux, '/')); |
Line 217... | Line 219... | ||
217 | 219 | ||
Line 218... | Line 220... | ||
218 | for (i=0; i |
220 | for (i=0; i |
219 | 221 | ||
220 | if (CreateFile(downloader.httpd.content_received, downloader.bufpointer, #filepath)==0) |
222 | if (CreateFile(downloader.httpd.content_received, downloader.bufpointer, #filepath)==0) { |
221 | sprintf(#notify_message, "%s%s%s",FILE_SAVED_AS,#filepath,"' -Dt"); |
223 | sprintf(#notify_message, "%s%s%s",FILE_SAVED_AS,#filepath,"' -Dt"); |
- | 224 | } else { |
|
Line 222... | Line 225... | ||
222 | else |
225 | sprintf(#notify_message, "%s%s%s","'Download manager\nError! Can\96t save file as ",#filepath,"' -Et"); |
223 | sprintf(#notify_message, "%s%s%s","'Download manager\nError! Can\96t save file as ",#filepath,"' -Et"); |
226 | } |
224 | 227 |