From 1d3e5422e855cc5bf9cbd072e235b2ec070ff8ad Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Tue, 5 May 2020 21:42:00 +0000 Subject: [PATCH] move eskin.ini settings into system.ini git-svn-id: svn://kolibrios.org@7870 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/common/settings/eskin.ini | 12 ------------ data/common/settings/system.ini | 8 +++++++- data/rus/settings/lang.ini | 1 - programs/cmm/appearance/appearance.c | 2 +- programs/media/kiv/trunk/kiv.asm | 8 ++++---- programs/media/palitra/trunk/palitra.asm | 8 ++++---- programs/system/eskin/trunk/eskin.asm | 2 +- programs/system/skincfg/trunk/idata.inc | 6 +++--- 8 files changed, 20 insertions(+), 27 deletions(-) delete mode 100644 data/common/settings/eskin.ini diff --git a/data/common/settings/eskin.ini b/data/common/settings/eskin.ini deleted file mode 100644 index e3a8f80fe6..0000000000 --- a/data/common/settings/eskin.ini +++ /dev/null @@ -1,12 +0,0 @@ -[bg] -active=1 -;program=/sys/media/fillscr -;param=105,145,200, 105,145,200, 105,145,200, 60,60,128, 82,102,164, 60,60,128, 60,60,128, 60,60,128, 60,60,128 - -program=/rd/1/media/kiv -param=\T__/rd/1/home.png -;T=tiled, S=stretched - -[skin] -3d=1 -file=/rd1/1/default.skn diff --git a/data/common/settings/system.ini b/data/common/settings/system.ini index b9621020e5..112f5fcec7 100644 --- a/data/common/settings/system.ini +++ b/data/common/settings/system.ini @@ -16,4 +16,10 @@ PCI=on [screensaver] timeout=10 ;in minutes -program=/sys/demos/spiral \ No newline at end of file +program=/sys/demos/spiral + +[style] +buttons_gradient=1 +skin=/rd1/1/default.skn +bg_program=/rd/1/media/kiv +bg_param=\T__/rd/1/home.png diff --git a/data/rus/settings/lang.ini b/data/rus/settings/lang.ini index 3de01818a2..30f7f76ae6 100644 --- a/data/rus/settings/lang.ini +++ b/data/rus/settings/lang.ini @@ -4,7 +4,6 @@ startlng = 1 [comkey] ccomkey1 = 1 ccomkey2 = 4 -ccomkey3 = 7 [altkey] altkey1 = 1 diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index fb7762d72a..4317730a39 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -398,7 +398,7 @@ void EventOpenFile() if (tabs.active_tab==WALLPAPERS) RunProgram("/sys/media/kiv", #cur_file_path); } -_ini ini = { "/sys/settings/eskin.ini", "main" }; +_ini ini = { "/sys/settings/system.ini", "style" }; void EventExit() { if (cur_skin_path) ini.SetString("skin", #cur_skin_path, strlen(#cur_skin_path)); diff --git a/programs/media/kiv/trunk/kiv.asm b/programs/media/kiv/trunk/kiv.asm index fd2b7bc9b6..0b2c303276 100644 --- a/programs/media/kiv/trunk/kiv.asm +++ b/programs/media/kiv/trunk/kiv.asm @@ -2396,10 +2396,10 @@ aPrev db 'Prev',0 aSlide db 'SlideShow',0 aTglbar db 'ToggleBar',0 -inifileeskin db '/sys/settings/eskin.ini',0 -amain db 'bg',0 -aprogram db 'program',0 -aparam db 'param',0 +inifileeskin db '/sys/settings/system.ini',0 +amain db 'style',0 +aprogram db 'bg_program',0 +aparam db 'bg_param',0 align 4 check_modifier_table: diff --git a/programs/media/palitra/trunk/palitra.asm b/programs/media/palitra/trunk/palitra.asm index ca227ce213..a951ea6865 100644 --- a/programs/media/palitra/trunk/palitra.asm +++ b/programs/media/palitra/trunk/palitra.asm @@ -1252,10 +1252,10 @@ circle: runmode dd 1 ; режим запуска (1-normal, 2-hidden, 3-colordialog) color2 dd 00FFFFFFh ; хранит значение второго выбранного цвета - inifileeskin db '/sys/settings/eskin.ini',0 - amain db 'main',0 - aprogram db 'program',0 - aparam db 'param',0 + inifileeskin db '/sys/settings/system.ini',0 + amain db 'style',0 + aprogram db 'bg_program',0 + aparam db 'bg_param',0 align 16 @IMPORT: diff --git a/programs/system/eskin/trunk/eskin.asm b/programs/system/eskin/trunk/eskin.asm index 43fdd2282e..707731be71 100644 --- a/programs/system/eskin/trunk/eskin.asm +++ b/programs/system/eskin/trunk/eskin.asm @@ -1 +1 @@ - use32 org 0x0 db 'MENUET01' ; 8 byte id dd 38 ; required os dd STARTAPP ; program start dd I_END ; program image size dd 0x1000000 ; required amount of memory dd 0x1000000 ; stack heap dd 0x0 dd 0x0 include '../../../proc32.inc' include '../../../macros.inc' include '../../../dll.inc' PATH_MAX equ 255 STARTAPP: ; Initialize memory mcall 68, 11 ; Import libraries stdcall dll.Load,importTable ; Set button style: flat or gradient (3D) invoke ini_get_int, aIni, aSectionSkn, aButtonStyle, 0 mov ecx, eax mcall 48, 1 ; Set bg or not? invoke ini_get_int, aIni, aSectionBg, aBgActive, 0 cmp eax, 1 jne set_skin set_bg: invoke ini_get_str, aIni, aSectionBg, aBgProgram, sz_buffer, PATH_MAX, 0 invoke ini_get_str, aIni, aSectionBg, aBgParam, sz_param, PATH_MAX, 0 m2m dword [InfoStructure+8], sz_param ; pointer to the parametrs m2m dword [InfoStructure+21], sz_buffer ; pointer to the file name mcall 70, InfoStructure set_skin: invoke ini_get_str, aIni, aSectionSkn, aSkinPath, sz_param, PATH_MAX, 0 mcall 48, 8, sz_param mcall -1 proc RunProgram stdcall, app_path:dword, app_param:dword m2m dword [InfoStructure+8], [app_param] ; pointer to the parametrs m2m dword [InfoStructure+21], [app_path] ; pointer to the file name mcall 70, InfoStructure ret endp importTable: library \ libini, 'libini.obj' import libini, \ ini_get_str ,'ini_get_str', \ ini_get_int ,'ini_get_int' InfoStructure: dd 7 ; subfunction number dd 0 ; position in the file in bytes dd ? ; upper part of the position address dd 0 ; number of bytes to read dd 0 ; pointer to the buffer to write data db 0 dd ? ; pointer to the filename aIni db '/sys/settings/eskin.ini',0 aSectionBg db 'bg',0 aBgActive db 'active',0 aBgProgram db 'program',0 aBgParam db 'param',0 aSectionSkn db 'skin',0 aButtonStyle db '3d',0 aSkinPath db 'file',0 sz_buffer: rb PATH_MAX sz_param: rb PATH_MAX I_END: ; End of application code and data marker \ No newline at end of file + use32 org 0x0 db 'MENUET01' ; 8 byte id dd 38 ; required os dd STARTAPP ; program start dd I_END ; program image size dd 0x1000000 ; required amount of memory dd 0x1000000 ; stack heap dd 0x0 dd 0x0 include '../../../proc32.inc' include '../../../macros.inc' include '../../../dll.inc' PATH_MAX equ 255 STARTAPP: ; Initialize memory mcall 68, 11 ; Import libraries stdcall dll.Load,importTable ; Set button style: flat or gradient (3D) invoke ini_get_int, aIni, aSection, aButtonStyle, 0 mov ecx, eax mcall 48, 1 set_bg: invoke ini_get_str, aIni, aSection, aBgProgram, sz_buffer, PATH_MAX, 0 invoke ini_get_str, aIni, aSection, aBgParam, sz_param, PATH_MAX, 0 m2m dword [InfoStructure+8], sz_param ; pointer to the parametrs m2m dword [InfoStructure+21], sz_buffer ; pointer to the file name mcall 70, InfoStructure set_skin: invoke ini_get_str, aIni, aSection, aSkinPath, sz_param, PATH_MAX, 0 mcall 48, 8, sz_param mcall -1 proc RunProgram stdcall, app_path:dword, app_param:dword m2m dword [InfoStructure+8], [app_param] ; pointer to the parametrs m2m dword [InfoStructure+21], [app_path] ; pointer to the file name mcall 70, InfoStructure ret endp importTable: library \ libini, 'libini.obj' import libini, \ ini_get_str ,'ini_get_str', \ ini_get_int ,'ini_get_int' InfoStructure: dd 7 ; subfunction number dd 0 ; position in the file in bytes dd ? ; upper part of the position address dd 0 ; number of bytes to read dd 0 ; pointer to the buffer to write data db 0 dd ? ; pointer to the filename aIni db '/sys/settings/system.ini',0 aSection db 'style',0 aBgProgram db 'bg_program',0 aBgParam db 'bg_param',0 aButtonStyle db 'buttons_gradient',0 aSkinPath db 'skin',0 sz_buffer: rb PATH_MAX sz_param: rb PATH_MAX I_END: ; End of application code and data marker \ No newline at end of file diff --git a/programs/system/skincfg/trunk/idata.inc b/programs/system/skincfg/trunk/idata.inc index 2e4288a535..1b8b1ec35e 100644 --- a/programs/system/skincfg/trunk/idata.inc +++ b/programs/system/skincfg/trunk/idata.inc @@ -115,9 +115,9 @@ library \ import libini, \ ini_set_int ,'ini_set_int' -aIni db '/sys/settings/eskin.ini',0 -aSectionSkn db 'skin',0 -aButtonStyle db '3d',0 +aIni db '/sys/settings/system.ini',0 +aSectionSkn db 'style',0 +aButtonStyle db 'buttons_gradient',0 ;--------------------------------------------------------------------- l_libs_start: