Author SHA1 Message Date
Leency 8817a9b36a better refresh/stop buttons, remove highlight_c.h 2026-06-02 12:48:12 +03:00
Leency e05e9aa43f add cyrillic 2026-06-01 14:33:08 +03:00
Leency 1edc13b6d6 webview-3.97: arrange <li> in one line if they are inside <nav> 2026-06-01 14:22:36 +03:00
Leency 473a1b9045 update test.htm and various bugfixes 2026-06-01 02:54:40 +03:00
Leency 02a0a7c566 sysmon: fix checkbox state while using Tab key (#448)
Press Tab. Now you'll see how checkbox state is changing.

Reviewed-on: KolibriOS/kolibrios#448
Reviewed-by: Ivan B <1+dunkaist@noreply.localhost>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2026-05-29 18:35:43 +00:00
Leency ca4cf1fb9f dl: fix text overlap (#450)
fixed overlapping text "Save to:"

Reviewed-on: KolibriOS/kolibrios#450
Reviewed-by: Ivan B <1+dunkaist@noreply.localhost>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: leency <lipatov.kiril@gmail.com>
Co-committed-by: leency <lipatov.kiril@gmail.com>
2026-05-29 18:14:36 +00:00
15 changed files with 85 additions and 236 deletions

No files matched your search

+4 -3
View File
@@ -89,7 +89,7 @@ void TWebBrowser::tag_font()
}
}
else {
if (bg_colors.count>1) text_colors.pop();
if (text_colors.count>1) text_colors.pop();
if (bg_colors.count>1) bg_colors.pop(); //never pop the last color
}
}
@@ -190,8 +190,9 @@ void TWebBrowser::tag_ol_ul_dt()
void TWebBrowser::tag_li()
{
//if (style.nav) return;
if (tag.opened) {
if (style.nav) {
chrncat(#linebuf, ' ', sizeof(TWebBrowser.linebuf));
} else if (tag.opened) {
if (!style.tag_list.level) style.tag_list.upd_level(1, 'u');
if (!style.pre) NewLine();
if (style.tag_list.order_type() == 'u') {
+9 -9
View File
@@ -363,7 +363,7 @@ void ProcessKeyEvent()
void SetElementSizes()
{
omnibox_edit.width = Form.cwidth - BUTTON_W - SEARCH_GO_GAP - BUTTON_W - omnibox_edit.left - 52 - 16;
omnibox_edit.width = Form.cwidth - BUTTON_W - SEARCH_GO_GAP - BUTTON_W - omnibox_edit.left - 52 - 23;
if (Form.cwidth - scroll_wv.size_x != WB1.list.w) {
//temporary fix for crash
//related to 'cur_img_url' var read
@@ -391,7 +391,7 @@ void draw_window()
DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, MixColors(sc.dark, sc.work, 180));
DrawBar(0,TOOLBAR_H-1, Form.cwidth,1, sc.line);
DrawBar(0, PADDING, omnibox_edit.left-2, TSZE+1, sc.work);
DrawBar(omnibox_edit.left+omnibox_edit.width+18, PADDING, Form.cwidth-omnibox_edit.left-omnibox_edit.width-18, TSZE+1, sc.work);
DrawBar(omnibox_edit.left+omnibox_edit.width+24, PADDING, Form.cwidth-omnibox_edit.left-omnibox_edit.width-24, TSZE+1, sc.work);
DrawTopPanelButton(BACK_BUTTON, PADDING-1, PADDING, 30, false);
DrawTopPanelButton(FORWARD_BUTTON, PADDING+TSZE+PADDING-2, PADDING, 31, false);
@@ -796,7 +796,7 @@ void DrawProgress()
if (!http.transfer) return;
if (http_get_type==PAGE) && (prbar.max) pct = prbar.value*30/prbar.max; else pct = 10;
if (http_get_type==IMG) pct = prbar.value * 70 / prbar.max + 30;
DrawBar(omnibox_edit.left-1, omnibox_edit.top+20, pct*omnibox_edit.width+16/100, 2, 0x72B7EB);
DrawBar(omnibox_edit.left-1, omnibox_edit.top+20, pct*omnibox_edit.width+23/100, 2, 0x72B7EB);
}
void EventShowPageMenu()
@@ -918,18 +918,18 @@ void DrawStatusBar(dword _msg)
void DrawOmnibox()
{
int imgxoff;
DrawOvalBorder(omnibox_edit.left-2, omnibox_edit.top-3, omnibox_edit.width+18, 24, sc.line,
DrawOvalBorder(omnibox_edit.left-2, omnibox_edit.top-3, omnibox_edit.width+24, 24, sc.line,
sc.line, sc.line, sc.dark);
DrawBar(omnibox_edit.left-1, omnibox_edit.top-2, omnibox_edit.width+18, 1, 0xD8DCD8);
DrawBar(omnibox_edit.left-1, omnibox_edit.top-1, omnibox_edit.width+18, 1, omnibox_edit.bg_color);
DrawBar(omnibox_edit.left-1, omnibox_edit.top-2, omnibox_edit.width+24, 1, 0xD8DCD8);
DrawBar(omnibox_edit.left-1, omnibox_edit.top-1, omnibox_edit.width+24, 1, omnibox_edit.bg_color);
DrawBar(omnibox_edit.left-1, omnibox_edit.top, 1, 22, omnibox_edit.bg_color);
if (omnibox_edit.flags & ed_focus) omnibox_edit.flags = ed_focus; else omnibox_edit.flags = 0;
EditBox_UpdateText(#omnibox_edit, omnibox_edit.flags);
edit_box_draw stdcall(#omnibox_edit);
if (http.transfer) imgxoff = 16*23*3; else imgxoff = 0;
PutImage(omnibox_edit.left+omnibox_edit.width+1, omnibox_edit.top-1, 16, 23, imgxoff + #editbox_icons);
DefineHiddenButton(omnibox_edit.left+omnibox_edit.width-1, omnibox_edit.top-2, 17, 23, REFRESH_BUTTON);
if (http.transfer) imgxoff = 23*23*3; else imgxoff = 0;
PutImage(omnibox_edit.left+omnibox_edit.width, omnibox_edit.top-1, 23, 23, imgxoff + #editbox_icons);
DefineHiddenButton(omnibox_edit.left+omnibox_edit.width, omnibox_edit.top-2, 22, 23, REFRESH_BUTTON);
DrawProgress();
}
+2
View File
@@ -59,4 +59,6 @@ void _cache::clear()
type.drop();
current_buf = NULL;
current_size = NULL;
current_type = NULL;
current_charset = NULL;
}
+1 -1
View File
@@ -115,4 +115,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
char version[]="WebView 3.95";
char version[]="WebView 3.98";
Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 1.1 KiB

+1 -1
View File
@@ -1 +1 @@
№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№ЇЇЇ╠╠╠мммМММммм╠╠╠ЇЇЇ№№№№№№№№№№№№№№№№№№№№№№№№▄▄▄МММММММММММММММММММММ▄▄▄№№№╠╠╠№№№№№№№№№№№№▄▄▄ММММММ╠╠╠ЇЇЇ№№№ЇЇЇ╠╠╠ММММММ╠╠╠МММ№№№№№№№№№ЇЇЇММММММ▄▄▄№№№№№№№№№№№№№№№ЇЇЇМММММММММ№№№№№№№№№╠╠╠МММ╠╠╠№№№№№№№№№№№№№№№№№№╠╠╠МММММММММ№№№№№№№№№мммМММЇЇЇ№№№№№№№№№№№№№№№╠╠╠ММММММММММММ№№№№№№№№№МММммм№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№мммМММЇЇЇ№№№№№№№№№№№№№№№№№№№№№ЇЇЇММММММ№№№№№№№№№╠╠╠МММ╠╠╠№№№№№№№№№№№№№№№№№№№№№╠╠╠МММ╠╠╠№№№№№№№№№ЇЇЇММММММ▄▄▄№№№№№№№№№№№№№№№▄▄▄ММММММЇЇЇ№№№№№№№№№№№№▄▄▄ММММММ╠╠╠ЇЇЇ№№№ЇЇЇ╠╠╠ММММММ▄▄▄№№№№№№№№№№№№№№№№№№▄▄▄МММММММММММММММММММММ▄▄▄№№№№№№№№№№№№№№№№№№№№№№№№ЇЇЇ╠╠╠мммМММммм╠╠╠ЇЇЇ№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№▄▄▄№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№\L╘№№№№№№№№№№№№\L╘№№№№№№№№№№№№№№№№№№№№№№№№№№№\L╘\L╘\L╘№№№№№№\L╘\L╘\L╘№№№№№№№№№№№№№№№№№№№№№\L╘\L╘\L╘\L╘\L╘\L╘\L╘\L╘\L╘4$д№№№№№№№№№№№№№№№№№№№№№\L╘\L╘\L╘\L╘\L╘\L╘\L╘4$д№№№№№№№№№№№№№№№№№№№№№№№№№№№\L╘\L╘\L╘\L╘\L╘4$д№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№\L╘\L╘\L╘\L╘\L╘4$д№№№№№№№№№№№№№№№№№№№№№№№№№№№\L╘\L╘\L╘\L╘\L╘\L╘\L╘\L╘№№№№№№№№№№№№№№№№№№№№№\L╘\L╘\L╘\L╘4$д4$д\L╘\L╘\L╘4$д№№№№№№№№№№№№№№№№№№№№№\L╘\L╘4$д№№№№№№4$д\L╘4$д№№№№№№№№№№№№№№№№№№№№№№№№№№№4$д№№№№№№№№№№№№4$д№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№№▄▄▄
                                                                                                                                                                                                                                                                                                                                                                                 ▐▐▌бЯЮВБ~xwtВБ~бЯЮ▐▐▌      ╜╗╗                                 ¤¤¤млк{xuЙЕГСОМЦУССОМЙЕГ{xuмлл╗╗╣rpm                                 нмй~{ПНКЙЕГ~{x{xu|yЙЕГПНККЖДЙЕГxvs                              ▐▐▌{xuПНКБ|ввЯччх√√√ччхеввКИДЩХТЩХТyxu                              вЯЯЙЕГЙЕГввЯ            ╛╜╗КЖДЩХТЩХТyxu                              ГБСОМ~{xччх         ╜╗╗rpmxvsyxuyxutqo                              xwtЦУС{xu···                                                         ДБСОМ~{xшчч                                                         бЮЭЙЕГЙЕГдба               пон}yx┤│▓                                 ▌▌▌{xuПНКБ|двбччч√√√чччдвб~{ЙЕГ|yv                                    нкк~{ПНКЙЕГ~{x{xu~{xЙЕГПНК~{нлй                                    √√√нкк{xuЙЕГСОМЦУССОМЙЕГ{xuнкк№№№                                          ▐▌▌вЯЯВБxwtВБвЯЯ▐▌▌                                                                                                                                                                                                                                                                                                                                                                              ▄▄▄                                                                                                                                                                                                                                                                                                            ,╨                  ,╨                                          ,╨ФОъ,╨            ,╨ФОъ,╨                                    ,╨ФОъJA┘JA┘JA┘      JA┘ФОъJA┘JA┘,╨                              ,╨JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘,╨                            жJA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘,╨ ж                               жJA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘,╨ ж                                    ,╨JA┘JA┘JA┘JA┘JA┘JA┘JA┘,╨ ж                                          ,╨JA┘JA┘JA┘JA┘JA┘JA┘,╨                                          ,╨JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘ ж                                    ,╨ФОъJA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘JA┘,╨                              ,╨ФОъJA┘JA┘JA┘JA┘,╨,╨JA┘JA┘JA┘JA┘JA┘,╨                           ,╨JA┘JA┘JA┘JA┘,╨      ,╨JA┘JA┘JA┘,╨ ж                              ,╨JA┘,╨ ж            ,╨JA┘,╨ ж                                     ж ж                  ,╨ ж                                                                                                                                                                                                                                                                                                                                                                        ▄▄▄
-121
View File
@@ -1,121 +0,0 @@
enum { TAG, OPTION_VALUE, TEXT, COMMENT, INLINE_COMMENT, CODE };
char* C_HL_keywords[] = {
"switch", "if", "while", "for", "break", "continue", "return", "else",
"union", "typedef", "static", "class", "case", "#include",
"volatile", "register", "sizeof", "typedef", "union", "goto", "const", "auto",
"#define", "#endif", "#error", "#ifdef", "#ifndef", "#undef", "#if", "#else",
"inline",
"int ", "dword ", "long ", "double ", "float ", "char ", "unsigned ", "signed ",
"void ", "bool ", "enum ", "byte ", "word ", "struct ", "NULL", "loop", "stdcall ",
":void ", ":int ", ":bool ", ":dword ", NULL
};
dword ShowCodeSource(dword _bufpointer, _bufsize)
{
dword new_buf, new_buf_start, i;
int mode = CODE;
char spstr[64];
dword keylen;
dword keyn;
dword keycolor;
new_buf = malloc(_bufsize*10);
new_buf_start = new_buf;
sprintf(new_buf,"<html><head><title>%s</title><body><pre>",#current_path);
new_buf += strlen(new_buf);
for (i=_bufpointer; i<_bufpointer+_bufsize; i++)
{
if ('<' == ESBYTE[i]) {
strcpy(new_buf, "&lt;");
new_buf+=4;
continue;
}
if ('>' == ESBYTE[i]) {
strcpy(new_buf, "&gt;");
new_buf+=4;
continue;
}
if (ESBYTE[i] >= '0') && (ESBYTE[i] <= '9') && (CODE == mode) {
strcpy(new_buf, "<font color=#CF00FF>?</font>");
ESBYTE[new_buf+20] = ESBYTE[i];
new_buf+=28;
if (ESBYTE[i+1] == 'x') {
strcpy(new_buf, "<font color=#CF00FF>x</font>");
new_buf+=28;
i++;
}
continue;
}
if (CODE == mode) && ('\"' == ESBYTE[i]) {
mode = TEXT;
strcpy(new_buf, "<font color=#080>\"");
new_buf+=18;
continue;
}
if (TEXT == mode) && ('\"' == ESBYTE[i]) {
mode = CODE;
strcpy(new_buf, "\"</font>");
new_buf+=8;
continue;
}
if (! strncmp(i, "//", 2) ) && (mode == CODE) {
mode = INLINE_COMMENT;
strcpy(new_buf, "<font color=#999>//");
new_buf+=19;
i++;
continue;
}
if (INLINE_COMMENT == mode) {
if (13 == ESBYTE[i]) {
mode = CODE;
strcpy(new_buf, "\13</font>");
new_buf+=8;
continue;
}
}
if (! strncmp(i, "/*", 2) ) {
mode = COMMENT;
strcpy(new_buf, "<font color=#999>/*");
new_buf+=19;
i++;
continue;
}
if (! strncmp(i, "*/", 2) ) {
mode = CODE;
strcpy(new_buf, "*/</font>");
new_buf+=9;
i++;
continue;
}
if (CODE == mode) for (keyn=0; C_HL_keywords[keyn]!=NULL; keyn++)
{
keylen = strlen(C_HL_keywords[keyn]);
if (! strncmp(i, C_HL_keywords[keyn], keylen) ) {
if (keyn<31) keycolor="#f00"; else keycolor="#00f";
sprintf(#spstr, "<font color=%s>%s</font>", keycolor, C_HL_keywords[keyn]);
strcpy(new_buf, #spstr);
new_buf += keylen + 24;
i += keylen-1;
goto _CONTINUE;
}
}
ESBYTE[new_buf] = ESBYTE[i];
new_buf++;
_CONTINUE:
}
ESBYTE[new_buf] = 0;
LoadInternalPage(new_buf_start, new_buf - new_buf_start);
free(new_buf_start);
}
+1 -1
View File
@@ -42,7 +42,7 @@ By the way,
' |
() .-.,="``"=. - o -
'=/_ \ |
* | '=._ |
* | '=.<a href=WebView:test>&nbsp;</a> |
\ `=./`, '
. '=.__.=' `=' *
+ +
+2 -2
View File
@@ -41,8 +41,8 @@
* +
' |
() .-.,="``"=. - o -
'=/_ \ |
* | '=._ |
'=/_ \ |
* | '=.<a href=WebView:test>&nbsp;</a> |
\ `=./`, '
. '=.__.=' `=' *
+ +
+26 -30
View File
@@ -1,39 +1,35 @@
<html>
<title>TEST</title>
<style>a {display:block;font-size:130%;margin:5px 40px 5px 0;}</style>
<body>
<body bgcolor=#fff>
<pre><h2>HTTP</h2>
<pre><h3><kosicon n=21>Tables</h3>
<a href=//th99.infania.net>Total Hardware 1999</a>
<a href=//wiby.org>wiby.org</a>
<a href=//menuetos.net>menuetos.net</a>
<a href=//macintosh.garden/>Macintosh Garden</a>
<a href=//pci-ids.ucw.cz>pci.ids</a>
<a href=//xcal1.vodafone.co.uk>Vodafone Test Files</a>
<a href=//vetusware.com>vetusware.com</a>
<a href=//toastytech.com/guis/index.html>GUI Gallery</a>
<a href=//www.weitek.com/textual/support/driver.html>weitek</a>
<a href=//www.abandonwarering.com/?Page=Listing>abandonware</a>
<a href=//neonfloppy.sytes.net/articles/win3-usb/>neonfloppy</a>
<a href=//www.win31.de/eindex.htm>win31.de</a>
<a href=http://www.retro-computing.com/Home/retro-computing.php>retro-computing</a>
<a href=https://www.alanwood.net/unicode/cyrillic.html>cyrillic</a>
<h3>VPN-only</h3>
<a href=//dgmag.in>dgmag.in</a>
<a href=//fdd5-25.pdp-11.ru>fdd5-25</a>
<a href=//old-dos.ru>old-dos.ru</a>
<a href=//artcon.ru>artcon.ru</a>
<a href=//nubo.ru>nubo.ru</a>
<a href=//mirrors.pdp-11.ru>mirrors.pdp-11.ru</a>
<a href=//nostalgy.net.ru/>nostalgy.net.ru</a>
<pre><h3><kosicon n=22>Demoscene</h3>
<a href="https://amp.dascene.net/home.php">Amiga Music Preservation</a>
<a href="https://files.scene.org">Scene.org</a>
<a href=https://www.pouet.net/>Pouet.net</a>
<a href="https://aminet.net/tree?path=mods">Aminet</a>
<a href=https://barefeats.com/indarch.html>barefeats</a>
<h2>HTTPS :(</h2>
<a href=//os-menuet.narod.ru>os-menuet.narod.ru</a>
<a href=//mestack.narod.ru/index.html>mestack.narod.ru</a>
<a href=//coolthemes.narod.ru/indexold.html>coolthemes.narod.ru</a>
<a href=//lionovsky.us>lionovsky.us</a>
<a href=//acmp.ru/index.asp?main=tasks>acmp.ru</a>
<a href=//xn--80abh7bk0c.xn--p1ai>bashorg</a>
<a href=//opennet.ru>opennet</a>
<a href=//linux.org.ru>LOR</a>
<a href=//www.xlr8yourmac.com/OSX/os_x_network_cards.html>OSX network cards</a>
<h3><kosicon n=13>Forms</h3>
<a href=//wiby.org>wiby.org</a>
<h3><kosicon n=3>Other</h3>
<a href=//menuetos.net>menuetos.net</a>
<a href=//osnews.com>osnews.com</a>
<h3><kosicon n=54>Cyrillic only</h3>
<a href=//dgmag.in>dgmag.in</a> <a href=//old-dos.ru>old-dos.ru</a> <a href=//lionovsky.us>lionovsky.us</a> <a href=//mirrors.pdp-11.ru>mirrors.pdp-11.ru</a>
<a href=//artcon.ru>artcon.ru</a> <a href=//nubo.ru>nubo.ru</a> <a href=//nostalgy.net.ru/>nostalgy.net.ru</a> <a href=//acmp.ru/index.asp?main=tasks>acmp.ru</a>
<a href=//opennet.ru>opennet</a> <a href=//linux.org.ru>LOR</a>
<a href=//samlib.ru/b>samlib.ru/b</a>
<a href=//vetusware.com>vetusware.com</a>
<a href=//electromyne.de>electromyne.de</a>
<a href=//os-menuet.narod.ru>os-menuet.narod.ru</a> <a href=//coolthemes.narod.ru/indexold.html>coolthemes.narod.ru</a>
+1 -4
View File
@@ -16,13 +16,10 @@ void SourceBufAdd(dword _mode, src)
if (font_found_pointer = strstr(src, "</font>")) {
opened_font_counter--;
src = font_found_pointer+2;
}
src = src_orig;
if (font_found_pointer = strstr(src, "<font ")) {
if (font_found_pointer = strstr(src_orig, "<font ")) {
opened_font_counter++;
src = font_found_pointer+2;
}
}
+1 -1
View File
@@ -58,7 +58,7 @@
char dl_shared[] = "DL";
#define URL_SPEED_TEST "http://kolibrios.org/speedtest/100MB.zip"
#define URL_SPEED_TEST "http://speedtest.tele2.net/100MB.zip"
enum {
BTN_EXIT=1,
+34 -51
View File
@@ -32,7 +32,6 @@ char proxy_address[256];
#include "settings.h"
char* active_status;
char* save_path_set = false;
edit_box ed = {WIN_W-GAPX-GAPX,GAPX,20,0xffffff,0x94AECE,0xffffff,0xffffff,
0x10000000, sizeof(uEdit)-2, #uEdit, 0, ed_focus + ed_always_focus, 19, 19};
@@ -42,8 +41,6 @@ progress_bar pb = {0, GAPX, 52, WIN_W - GAPX - GAPX, 17, 0, NULL, NULL,
void main()
{
dword save_path_separator_pos;
dword path_pointer;
// dword shared_url; // only used by the disabled -mem branch (long URL via SHM)
load_dll(libini, #lib_init,1);
@@ -59,21 +56,14 @@ void main()
InitDownload();
if (param) {
path_pointer = #param;
//save path specified? Example: https://example.com/file|/sys/media/ac97snd
if (save_path_separator_pos = strchr(#param, '|')) {
save_path_set = true;
strcpy(#filepath, save_path_separator_pos+1);
ESBYTE[save_path_separator_pos] = '\0';
}
if (streqrp(#param, "-e ")) {
autoclose.checked = true;
path_pointer += 3;
param += 3;
}
if (streqrp(#param, "-eo ")) {
autoclose.checked = true;
open_file = true;
path_pointer += 4;
param += 4;
}
// Disabled long-URL-via-SHM ("DL") channel. memopen was never
@@ -83,13 +73,12 @@ void main()
// shared_url = memopen(#dl_shared, URL_SIZE+1, SHM_OPEN + SHM_WRITE);
// strcpy(#uEdit, shared_url);
// } else {
strcpy(#uEdit, #param);
// }
if (streq(#param, "-test")) {
strcpy(#uEdit, URL_SPEED_TEST);
} else {
strcpy(#uEdit, path_pointer);
debugln(path_pointer);
}
// }
}
if (uEdit[0]) StartDownloading(); else {
edit_box_set_text stdcall (#ed, "http://");
@@ -182,12 +171,8 @@ void DrawWindow()
DrawBar(GAPX, WIN_H - 58, WIN_W - GAPX - GAPX, 1, sc.light);
DrawBar(GAPX, WIN_H - 58 + 1, WIN_W - GAPX - GAPX, 1, sc.dark);
WriteText(GAPX, WIN_H - 48, 0x90, sc.work_text, T_SAVE_TO);
if (save_path_set) {
WriteTextWithBg(GAPX + 108, WIN_H - 48, 0xD0, sc.work_text, #filepath, sc.light);
} else {
WriteTextWithBg(GAPX + 108, WIN_H - 48, 0xD0, sc.work_text, #save_dir, sc.light);
}
WriteTextWithBg(GAPX, WIN_H - 48, 0xD0, sc.work_text, T_SAVE_TO, sc.work);
WriteTextWithBg(GAPX + 108, WIN_H - 48, 0xD0, sc.work_text, #save_dir, sc.light);
edit_box_draw stdcall (#ed);
progressbar_draw stdcall(#pb);
autoclose.draw(GAPX, WIN_H - 24);
@@ -320,39 +305,37 @@ void SaveFile(int attempt)
char notify_message[4296];
char file_name[URL_SIZE+96];
//if save_path is not set than we have to combine it
if (!save_path_set) {
strcpy(#filepath, #save_dir);
chrcat(#filepath, '/'); ///need to check the last symbol
if (attempt > 9) {
notify("'Too many saving attempts' -E");
return;
}
strcpy(#filepath, #save_dir);
chrcat(#filepath, '/'); ///need to check the last symbol
if (attempt > 0) {
chrcat(#filepath, attempt+'0');
chrcat(#filepath, '_');
}
//Content-Disposition: attachment; filename="RealFootball_2018_Nokia_5800_EN_IGP_EU_TS_101.zip"
if (http.header_field("content-disposition", #file_name, sizeof(file_name))) {
if (EDX = strstr(#file_name,"filename=\"")) {
strcat(#filepath, EDX+10);
ESBYTE[strchr(#filepath,'\"')] = '\0';
}
} else {
// Clean all slashes at the end
strcpy(#file_name, #uEdit);
while (file_name[strlen(#file_name)-1] == '/') {
file_name[strlen(#file_name)-1] = 0;
}
strcat(#filepath, #file_name+strrchr(#file_name, '/'));
}
for (i=0; i<strlen(#filepath); i++) if(filepath[i]==':')||(filepath[i]=='?')filepath[i]='-';
if (attempt > 9) {
notify("'Too many saving attempts' -E");
return;
}
if (attempt > 0) {
chrcat(#filepath, attempt+'0');
chrcat(#filepath, '_');
}
//Content-Disposition: attachment; filename="RealFootball_2018_Nokia_5800_EN_IGP_EU_TS_101.zip"
if (http.header_field("content-disposition", #file_name, sizeof(file_name))) {
if (EDX = strstr(#file_name,"filename=\"")) {
strcat(#filepath, EDX+10);
ESBYTE[strchr(#filepath,'\"')] = '\0';
}
} else {
// Clean all slashes at the end
strcpy(#file_name, #uEdit);
while (file_name[strlen(#file_name)-1] == '/') {
file_name[strlen(#file_name)-1] = 0;
}
strcat(#filepath, #file_name+strrchr(#file_name, '/'));
}
for (i=0; i<strlen(#filepath); i++) if(filepath[i]==':')||(filepath[i]=='?')filepath[i]='-';
while (file_exists(#filepath)) {
SaveFile(attempt+1);
return;
+1 -9
View File
@@ -11,7 +11,6 @@
#include "../lib/gui.h"
#include "../lib/random.h"
#include "../lib/kfont.h"
#include "../lib/fs.h"
#include "../lib/obj/libimg.h"
#include "../lib/obj/libini.h"
@@ -416,7 +415,6 @@ void EventStopPlaying()
void EventStartPlaying()
{
word i;
BDVK CopyFile_atr;
char item_path[4096];
char notify_message[512];
EventStopPlaying();
@@ -435,13 +433,7 @@ void EventStartPlaying()
DrawPlayList();
DrawTopPanel();
//start_playing_time =
player_run_id = RunProgram("/sys/media/ac97snd", #item_path);
if (player_run_id < 0) {
RunProgram("/sys/network/dl", "-e http://builds.kolibrios.org/en_US/data/programs/media/ac97snd/ac97snd.bin|/sys/media/ac97snd");
pause(100);
player_run_id = RunProgram("/sys/media/ac97snd", #item_path);
if (player_run_id < 0) notify("'AC97SND backend not found and its download failed :('-E");
}
player_run_id = RunProgram("/sys/media/ac97snd", #item_path);
//player_run_id = RunProgram("/kolibrios/media/minimp3", #item_path);
sprintf(#notify_message,"'Now playing:\n%s' -St",#current_filename);
if (!repeat) && (window_mode==WINDOW_MODE_SMALL)
+2 -3
View File
@@ -128,8 +128,7 @@ void main()
break;
case SCAN_CODE_TAB:
show_system.checked ^= 1;
SelectList_LineChanged();
break;
goto _DRAW_WINDOW;
default:
if (select_list.ProcessKey(key_scancode)) {
SelectList_LineChanged();
@@ -157,6 +156,7 @@ void main()
case evReDraw:
sc.get();
DefineAndDrawWindow(Form.left, Form.top, Form.width, Form.height, 0x33, sc.work, T_APP_TITLE, 0);
WriteText(GAP+5, WIN_CONTENT_Y-20, 0x90, sc.work_text, T_PROC_HEADER);
_DRAW_WINDOW:
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window&ROLLED_UP) break;
@@ -168,7 +168,6 @@ void main()
}
right_w = Form.cwidth - RIGHT_X - GAP;
right_w &= ~1; // make sure the number is even
WriteText(GAP+5, WIN_CONTENT_Y-20, 0x90, sc.work_text, T_PROC_HEADER);
DefineButton(RIGHT_X-38,WIN_CONTENT_Y-25,18,18,BTN_SHOWHIDE_SENSORS,sc.button);
DrawRectangle3D(RIGHT_X-38,WIN_CONTENT_Y-25,19,18,sc.line,sc.light);