icons16.png: new icon for .pal and .dtp files

skincfg: support of .dtp file open

git-svn-id: svn://kolibrios.org@7937 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-05-17 13:31:17 +00:00
parent 6c633e78a7
commit bb77db0f44
6 changed files with 63 additions and 38 deletions

View File

@ -172,6 +172,8 @@ cpp=28
c=28 c=28
fb2=29 fb2=29
mgb=47 mgb=47
dtp=52
pal=52
[icons32] [icons32]
<dir>=45 <dir>=45

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -338,7 +338,7 @@ void TWebBrowser::SetStyle() {
if (value = tag.get_value_of("bglink=")) link_bg=GetColor(value); if (value = tag.get_value_of("bglink=")) link_bg=GetColor(value);
if (value = tag.get_value_of("text=")) text_colors[0]=GetColor(value); if (value = tag.get_value_of("text=")) text_colors[0]=GetColor(value);
if (value = tag.get_value_of("bgcolor=")) { if (value = tag.get_value_of("bgcolor=")) {
style.bg_color = page_bg = GetColor(value); style.bg_color = page_bg = link_bg = GetColor(value);
DrawBuf.Fill(0, page_bg); DrawBuf.Fill(0, page_bg);
} }
// Autodetecting encoding if no encoding was set // Autodetecting encoding if no encoding was set

View File

@ -263,7 +263,7 @@ PathShow_data_1:
.background_flag dd 0 ;+16 .background_flag dd 0 ;+16
.font_color dd 0x0 ;+20 .font_color dd 0x0 ;+20
.background_color dd 0x0 ;+24 .background_color dd 0x0 ;+24
.text_pointer dd fname ;+28 .text_pointer dd dtp_name ;+28
.work_area_pointer dd text_work_area ;+32 .work_area_pointer dd text_work_area ;+32
.temp_text_length dd 0 ;+36 .temp_text_length dd 0 ;+36
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
@ -291,7 +291,7 @@ OpenDialog_data:
.start_path dd open_dialog_path ;+24 .start_path dd open_dialog_path ;+24
.draw_window dd draw_window ;+28 .draw_window dd draw_window ;+28
.status dd 0 ;+32 .status dd 0 ;+32
.openfile_pach dd fname ;+36 .openfile_pach dd dtp_name ;+36
.filename_area dd filename_area ;+40 .filename_area dd filename_area ;+40
.filter_area dd Filter .filter_area dd Filter
.x: .x:
@ -349,9 +349,6 @@ Filter2:
.end: .end:
db 0 db 0
start_temp_file_name:
db 'default.dtp',0
default_skin: default_skin:
db '/sys/default.skn',0 db '/sys/default.skn',0
default_dtp: default_dtp:

View File

@ -23,13 +23,14 @@
dd IM_END ; file size dd IM_END ; file size
dd I_END ; memory dd I_END ; memory
dd stacktop ; stack pointer dd stacktop ; stack pointer
dd skin_info ; parameters dd app_param ; parameters
dd cur_dir_path ; path to file dd cur_dir_path ; path to file
include 'lang.inc' include 'lang.inc'
include '../../../proc32.inc' include '../../../proc32.inc'
include '../../../config.inc' ;for nightbuild include '../../../config.inc' ;for nightbuild
include '../../../macros.inc' include '../../../macros.inc'
include '../../../string.inc'
include '../../../dll.inc' include '../../../dll.inc'
include 'kglobals.inc' include 'kglobals.inc'
include 'unpacker.inc' include 'unpacker.inc'
@ -104,31 +105,8 @@ load_libraries l_libs_start,end_l_libs
test eax,eax test eax,eax
jz close jz close
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
mov edi,filename_area ; set default pathes
mov esi,start_temp_file_name
xor eax,eax
cld
@@:
lodsb
stosb
test eax,eax
jnz @b
mov edi,fname
mov esi,default_dtp
xor eax,eax
cld
@@:
lodsb
stosb
test eax,eax
jnz @b
;---------------------------------------------------------------------
mov edi,skin_info mov edi,skin_info
cmp byte [edi], 0
jne skin_path_ready
mov esi,default_skin mov esi,default_skin
xor eax,eax xor eax,eax
cld cld
@ -137,6 +115,56 @@ load_libraries l_libs_start,end_l_libs
stosb stosb
test eax,eax test eax,eax
jnz @b jnz @b
mov edi,dtp_name
mov esi,default_dtp
xor eax,eax
cld
@@:
lodsb
stosb
test eax,eax
jnz @b
;---------------------------------------------------------------------
; check app param
stdcall string.length, app_param
add eax, app_param
mov ecx, [eax-4]
cmp ecx, '.skn'
je load_skin_from_param
cmp ecx, '.dtp'
jne no_param
load_dtp_from_param:
mov edi,dtp_name
mov esi,app_param
xor eax,eax
cld
@@:
lodsb
stosb
test eax,eax
jnz @b
call load_dtp_file.1
jmp skin_path_ready
load_skin_from_param:
mov edi,skin_info
mov esi,app_param
xor eax,eax
cld
@@:
lodsb
stosb
test eax,eax
jnz @b
call load_skin_file.2
jmp skin_path_ready
no_param:
mcall 48,3,color_table,4*10 ; get current colors
call load_skin_file.2
skin_path_ready: skin_path_ready:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;OpenDialog initialisation ;OpenDialog initialisation
@ -156,9 +184,6 @@ skin_path_ready:
push dword PathShow_data_2 push dword PathShow_data_2
call [PathShow_prepare] call [PathShow_prepare]
;---------------------------------------------------------------------
mcall 48,3,color_table,4*10 ; get current colors
call load_skin_file.2
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
red: red:
call draw_window ; at first, draw the window call draw_window ; at first, draw the window
@ -187,7 +212,7 @@ button: ; button
cmp ah,12 ; load file cmp ah,12 ; load file
jne no_load jne no_load
call load_file call load_dtp_file
call draw_window call draw_window
jmp still jmp still
;-------------------------------------- ;--------------------------------------
@ -291,7 +316,7 @@ close:
noid1: noid1:
jmp still jmp still
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
load_file: load_dtp_file:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
; invoke OpenDialog ; invoke OpenDialog
mov [OpenDialog_data.type],dword 0 mov [OpenDialog_data.type],dword 0
@ -307,6 +332,7 @@ load_file:
call draw_PathShow call draw_PathShow
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
.2:
xor eax, eax xor eax, eax
mov ebx, read_info mov ebx, read_info
mov dword [ebx], eax ; subfunction: read mov dword [ebx], eax ; subfunction: read

View File

@ -7,7 +7,7 @@ read_info:
.blocks dd ? ; 512 bytes .blocks dd ? ; 512 bytes
.address dd ? .address dd ?
.workarea dd ? .workarea dd ?
fname rb 4096 ; filename dtp_name rb 4096
virtual at read_info virtual at read_info
write_info: write_info:
@ -26,7 +26,7 @@ read_info2:
.workarea dd ? .workarea dd ?
skin_info rb 4096 skin_info rb 4096
;param rb 257 app_param rb 257
align 4 align 4
app_colours: app_colours: