forked from KolibriOS/kolibrios
various bugfixes
git-svn-id: svn://kolibrios.org@8996 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
27a31fa094
commit
861d24c21a
@ -20,6 +20,7 @@ ShowHistory()
|
|||||||
strcat(history_pointer, "</a><br>");
|
strcat(history_pointer, "</a><br>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
strcat(history_pointer, "<br><b>Cached images</b><br>");
|
strcat(history_pointer, "<br><b>Cached images</b><br>");
|
||||||
for (i=1; i<cache.url.count; i++) if (cache.type.get(i) == IMG)
|
for (i=1; i<cache.url.count; i++) if (cache.type.get(i) == IMG)
|
||||||
{
|
{
|
||||||
@ -28,6 +29,7 @@ ShowHistory()
|
|||||||
strcat(history_pointer, cache.url.get(i));
|
strcat(history_pointer, cache.url.get(i));
|
||||||
strcat(history_pointer, "'><br>");
|
strcat(history_pointer, "'><br>");
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
LoadInternalPage(history_pointer, strlen(history_pointer));
|
LoadInternalPage(history_pointer, strlen(history_pointer));
|
||||||
free(history_pointer);
|
free(history_pointer);
|
||||||
|
@ -8,9 +8,9 @@ TODO:
|
|||||||
- 70.5 - get volume info and label
|
- 70.5 - get volume info and label
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define ABOUT_TITLE "EOLITE 5.01 Gold"
|
#define ABOUT_TITLE "EOLITE 5.02 Gold"
|
||||||
#define TITLE_EOLITE "Eolite File Manager 5.01 Gold"
|
#define TITLE_EOLITE "Eolite File Manager 5.02 Gold"
|
||||||
#define TITLE_KFM "Kolibri File Manager 2.01 Gold";
|
#define TITLE_KFM "Kolibri File Manager 2.02 Gold";
|
||||||
|
|
||||||
#define MEMSIZE 1024 * 250
|
#define MEMSIZE 1024 * 250
|
||||||
#include "../lib/clipboard.h"
|
#include "../lib/clipboard.h"
|
||||||
|
@ -136,7 +136,7 @@ void _SystemDiscs::DrawOptions(int draw_x)
|
|||||||
int optionsy = SELECTY+KFM2_DEVH+1;
|
int optionsy = SELECTY+KFM2_DEVH+1;
|
||||||
char dev_name[15], disc_name[100], i, dev_icon, is_active=0;
|
char dev_name[15], disc_name[100], i, dev_icon, is_active=0;
|
||||||
|
|
||||||
for (i=0; i<30; i++) DeleteButton(100+i);
|
SystemDiscs.Get();
|
||||||
|
|
||||||
DrawPopup(draw_x, optionsy, DDW, list.count*KFM2_DEVH, 1, -1, sc.work_graph);
|
DrawPopup(draw_x, optionsy, DDW, list.count*KFM2_DEVH, 1, -1, sc.work_graph);
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ TODO: scroll
|
|||||||
{
|
{
|
||||||
dword write_start;
|
dword write_start;
|
||||||
dword buf_end;
|
dword buf_end;
|
||||||
int line_h = 15;
|
#define LINE_H 17
|
||||||
int label_length_max;
|
int label_length_max;
|
||||||
int write_length;
|
int write_length;
|
||||||
bool end_found;
|
bool end_found;
|
||||||
@ -19,9 +19,9 @@ TODO: scroll
|
|||||||
|
|
||||||
loop()
|
loop()
|
||||||
{
|
{
|
||||||
if (bg_col!=-1) DrawBar(x, y, w+1, line_h, bg_col);
|
if (bg_col!=-1) DrawBar(x, y, w+1, LINE_H, bg_col);
|
||||||
end_found = false;
|
end_found = false;
|
||||||
write_length = strchr(write_start, '\n') - write_start; //search normal line break
|
write_length = strchr(write_start, '\n') - write_start +1; //search normal line break
|
||||||
if (write_length > label_length_max) || (write_length<=0) //check its position: exceeds maximum line length or not found
|
if (write_length > label_length_max) || (write_length<=0) //check its position: exceeds maximum line length or not found
|
||||||
{
|
{
|
||||||
if (buf_end - write_start < label_length_max) //check does current line the last
|
if (buf_end - write_start < label_length_max) //check does current line the last
|
||||||
@ -46,9 +46,9 @@ TODO: scroll
|
|||||||
// WriteTextB(-write_start+buf_start+editpos * 8 + x - 5 +1, y, 0x90, 0xFF0000, "|");
|
// WriteTextB(-write_start+buf_start+editpos * 8 + x - 5 +1, y, 0x90, 0xFF0000, "|");
|
||||||
// }
|
// }
|
||||||
write_start += write_length + 1;
|
write_start += write_length + 1;
|
||||||
y += line_h;
|
y += LINE_H;
|
||||||
if (write_start >= buf_end) break;
|
if (write_start >= buf_end) break;
|
||||||
}
|
}
|
||||||
if (bg_col!=-1) DrawBar(x,y,w+1,h-y+line_h-4,bg_col);
|
if (bg_col!=-1) DrawBar(x,y,w+1,h-y+LINE_H-4,bg_col);
|
||||||
return y+line_h;
|
return y+LINE_H;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,6 @@ _http http;
|
|||||||
#define T_EXIT "‚ë室"
|
#define T_EXIT "‚ë室"
|
||||||
#define IMG_URL "http://builds.kolibrios.org/rus/data/data/kolibri.img"
|
#define IMG_URL "http://builds.kolibrios.org/rus/data/data/kolibri.img"
|
||||||
#define KS "‘®åà ¨âì áâனª¨"
|
#define KS "‘®åà ¨âì áâனª¨"
|
||||||
#define RA "<22>¥à¥§ ¯ãáâ¨âì ¢á¥ ¯à®£à ¬¬ë"
|
|
||||||
#else
|
#else
|
||||||
#define T_WINDOW_TITLE "KolibriOS Online Updater"
|
#define T_WINDOW_TITLE "KolibriOS Online Updater"
|
||||||
#define T_TITLE_H1 "ONLINE UPDATE"
|
#define T_TITLE_H1 "ONLINE UPDATE"
|
||||||
@ -40,20 +39,18 @@ Note that all changes on RAM-disk will be lost.";
|
|||||||
#define T_EXIT "Exit"
|
#define T_EXIT "Exit"
|
||||||
#define IMG_URL "http://builds.kolibrios.org/eng/data/data/kolibri.img"
|
#define IMG_URL "http://builds.kolibrios.org/eng/data/data/kolibri.img"
|
||||||
#define KS "Keep settings folder"
|
#define KS "Keep settings folder"
|
||||||
#define RA "Restart all apps"
|
|
||||||
#endif
|
#endif
|
||||||
char accept_language[]="en"; //not used, necessary for http.get()
|
char accept_language[]="en"; //not used, necessary for http.get()
|
||||||
void Operation_Draw_Progress(dword f) {} //not used, necessary for copyf()
|
void Operation_Draw_Progress(dword f) {} //not used, necessary for copyf()
|
||||||
|
|
||||||
checkbox keep_settings = { KS, true };
|
checkbox keep_settings = { KS, true };
|
||||||
checkbox restart_apps = { RA, true };
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
int btn;
|
int btn;
|
||||||
sensor progress;
|
sensor progress;
|
||||||
load_dll(libimg, #libimg_init,1);
|
load_dll(libimg, #libimg_init,1);
|
||||||
load_dll(libHTTP, #http_lib_init,1);
|
load_dll(libHTTP, #http_lib_init,1);
|
||||||
@SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_STACK);
|
@SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_STACK);
|
||||||
loop() switch(@WaitEventTimeout(300))
|
loop() switch(@WaitEventTimeout(300))
|
||||||
{
|
{
|
||||||
@ -62,7 +59,6 @@ void main()
|
|||||||
if (btn<=2) ExitProcess();
|
if (btn<=2) ExitProcess();
|
||||||
if (btn==9) goto _INSTALL;
|
if (btn==9) goto _INSTALL;
|
||||||
keep_settings.click(btn);
|
keep_settings.click(btn);
|
||||||
restart_apps.click(btn);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case evKey:
|
case evKey:
|
||||||
@ -90,7 +86,6 @@ void main()
|
|||||||
if (http.transfer<=0) {
|
if (http.transfer<=0) {
|
||||||
DrawCaptButton(WINW-110/2, WINH-70, 110, 28, 9, 0x0092D8, 0xFFFfff, T_INSTALL);
|
DrawCaptButton(WINW-110/2, WINH-70, 110, 28, 9, 0x0092D8, 0xFFFfff, T_INSTALL);
|
||||||
keep_settings.draw(30, WINH - 210);
|
keep_settings.draw(30, WINH - 210);
|
||||||
restart_apps.draw(30, WINH - 185);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DrawIcon32(WINW-32/2, 140, sc.work, 49);
|
DrawIcon32(WINW-32/2, 140, sc.work, 49);
|
||||||
@ -181,7 +176,6 @@ void EventDownloadComplete()
|
|||||||
copyf("/sys", #backup);
|
copyf("/sys", #backup);
|
||||||
copyf(#latest, "/sys");
|
copyf(#latest, "/sys");
|
||||||
if (keep_settings.checked) copyf(#backup_settings, "/sys/settings");
|
if (keep_settings.checked) copyf(#backup_settings, "/sys/settings");
|
||||||
if (restart_apps.checked) RestartAllProcess();
|
|
||||||
install_complete = true;
|
install_complete = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,8 +156,6 @@ load_libraries l_libs_start,end_l_libs
|
|||||||
align 4
|
align 4
|
||||||
red:
|
red:
|
||||||
call draw_window
|
call draw_window
|
||||||
;mov ah,0
|
|
||||||
;jmp button.history_click
|
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
still:
|
still:
|
||||||
@ -198,7 +196,7 @@ button:
|
|||||||
|
|
||||||
sub ah,30
|
sub ah,30
|
||||||
|
|
||||||
.history_click:
|
;click on a colors History
|
||||||
movzx eax,ah
|
movzx eax,ah
|
||||||
shl eax,2
|
shl eax,2
|
||||||
add eax,[communication_area]
|
add eax,[communication_area]
|
||||||
@ -656,7 +654,7 @@ popad
|
|||||||
endp
|
endp
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
;input:
|
;input:
|
||||||
; buf - pointer hexadecimal string
|
; buf - pointer to a hexadecimal string
|
||||||
;output:
|
;output:
|
||||||
; eax - number
|
; eax - number
|
||||||
align 4
|
align 4
|
||||||
@ -665,7 +663,7 @@ proc conv_str_to_int uses ebx ecx esi, buf:dword
|
|||||||
xor ebx,ebx
|
xor ebx,ebx
|
||||||
mov esi,[buf]
|
mov esi,[buf]
|
||||||
|
|
||||||
.cycle_16: ;считывание 16-ричных цифр
|
.cycle_16:
|
||||||
mov bl,byte[esi]
|
mov bl,byte[esi]
|
||||||
cmp bl,'0'
|
cmp bl,'0'
|
||||||
jl @f
|
jl @f
|
||||||
@ -674,13 +672,13 @@ proc conv_str_to_int uses ebx ecx esi, buf:dword
|
|||||||
cmp bl,'9'
|
cmp bl,'9'
|
||||||
jle .us1
|
jle .us1
|
||||||
cmp bl,'A'
|
cmp bl,'A'
|
||||||
jl @f ;отсеиваем символы >'9' и <'A'
|
jl @f ;skip the chars not in between '9' and 'A'
|
||||||
.us1: ;составное условие
|
.us1: ;составное условие
|
||||||
cmp bl,'F'
|
cmp bl,'F'
|
||||||
jle .us2
|
jle .us2
|
||||||
cmp bl,'a'
|
cmp bl,'a'
|
||||||
jl @f ;отсеиваем символы >'F' и <'a'
|
jl @f ;skip the chars not in between 'F' and 'a'
|
||||||
sub bl,32 ;переводим символы в верхний регистр, для упрощения их последущей обработки
|
sub bl,32 ;convert symbols to uppercase for convenience
|
||||||
.us2: ;составное условие
|
.us2: ;составное условие
|
||||||
sub bl,'0'
|
sub bl,'0'
|
||||||
cmp bl,9
|
cmp bl,9
|
||||||
@ -692,7 +690,7 @@ proc conv_str_to_int uses ebx ecx esi, buf:dword
|
|||||||
inc esi
|
inc esi
|
||||||
jmp .cycle_16
|
jmp .cycle_16
|
||||||
@@:
|
@@:
|
||||||
cmp ecx,0 ;если число отрицательное
|
cmp ecx,0 ;if the number is negative
|
||||||
jne @f
|
jne @f
|
||||||
sub ecx,eax
|
sub ecx,eax
|
||||||
mov eax,ecx
|
mov eax,ecx
|
||||||
|
Loading…
Reference in New Issue
Block a user