@taskbar: remove set ButtonStyle feature as duplication of eskin

KolibriN Install update

git-svn-id: svn://kolibrios.org@7660 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2019-05-20 10:40:10 +00:00
parent 3defe609b4
commit e1a32382fd
10 changed files with 88 additions and 33 deletions

View File

@ -421,7 +421,6 @@ tup.append_table(img_files, {
{"GAMES/15", PROGS .. "/games/15/trunk/15"}, {"GAMES/15", PROGS .. "/games/15/trunk/15"},
{"GAMES/FREECELL", PROGS .. "/games/freecell/freecell"}, {"GAMES/FREECELL", PROGS .. "/games/freecell/freecell"},
{"GAMES/GOMOKU", PROGS .. "/games/gomoku/trunk/gomoku"}, {"GAMES/GOMOKU", PROGS .. "/games/gomoku/trunk/gomoku"},
{"GAMES/KLAVISHA", PROGS .. "/games/klavisha/trunk/klavisha"},
{"GAMES/LIGHTS", PROGS .. "/games/sq_game/trunk/SQ_GAME"}, {"GAMES/LIGHTS", PROGS .. "/games/sq_game/trunk/SQ_GAME"},
{"GAMES/LINES", PROGS .. "/games/lines/lines"}, {"GAMES/LINES", PROGS .. "/games/lines/lines"},
{"GAMES/MSQUARE", PROGS .. "/games/MSquare/trunk/MSquare"}, {"GAMES/MSQUARE", PROGS .. "/games/MSquare/trunk/MSquare"},
@ -554,6 +553,7 @@ tup.append_table(extra_files, {
-- For russian build, add russian-only programs. -- For russian build, add russian-only programs.
if build_type == "rus" then tup.append_table(img_files, { if build_type == "rus" then tup.append_table(img_files, {
{"PERIOD", PROGS .. "/other/period/trunk/period"}, {"PERIOD", PROGS .. "/other/period/trunk/period"},
{"GAMES/KLAVISHA", PROGS .. "/games/klavisha/trunk/klavisha"},
{"DEVELOP/TESTCON2", PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"}, {"DEVELOP/TESTCON2", PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"},
}) else tup.append_table(img_files, { }) else tup.append_table(img_files, {
{"DEVELOP/TESTCON2", PROGS .. "/develop/libraries/console_coff/examples/testcon2_eng"}, {"DEVELOP/TESTCON2", PROGS .. "/develop/libraries/console_coff/examples/testcon2_eng"},

View File

@ -17,7 +17,6 @@ Clock=1
CpuUsage=1 CpuUsage=1
ChangeLang=1 ChangeLang=1
Attachment=1 Attachment=1
ButtonsStyle=0
[Colors] [Colors]
MenuButton=0,100,0 MenuButton=0,100,0

View File

@ -5,7 +5,7 @@
?include "lang.h--" ?include "lang.h--"
#endif #endif
#define MEMSIZE 0xFE800 #define MEMSIZE 200*1024
#include "..\lib\mem.h" #include "..\lib\mem.h"
#include "..\lib\strings.h" #include "..\lib\strings.h"
#include "..\lib\io.h" #include "..\lib\io.h"

View File

@ -1,30 +1,97 @@
#define MEMSIZE 4096*15 #define MEMSIZE 1024*160
#include "..\lib\strings.h"
#include "..\lib\mem.h"
#include "..\lib\copyf.h"
#include "..\lib\obj\libini.h" #include "../lib/io.h"
#include "../lib/gui.h"
#include "../lib/copyf.h"
#include "../lib/obj/libini.h"
#include "../lib/patterns/restart_process.h"
#include "..\lib\patterns\restart_process.h" char logo[] = "
ÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛÛÛÛÛ
ÛÛÛÛ ÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛ ÛÛÛ ÛÛ
ÛÛÛÛÛ ÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛ ÛÛÛ ÛÛ
ÛÛ ÛÛÛ ÛÛ ÛÛÛÛÛÛÛ ÛÛÛ ÛÛÛ
ÛÛ ÛÛÛÛÛ ÛÛÛ ÛÛÛÛÛ ÛÛÛ
ÛÛ ÛÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ ÛÛÛ
ÛÛÛÛ ÛÛÛ ÛÛÛÛÛÛÛÛÛÛ ÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ
";
char intro[] = "<EFBFBD>®¯à®¡ã©â¥ ­®¢®¥ ¢¨§ã «ì­®¥ ®ä®à¬«¥­¨¥ Š®«¨¡à¨, ª®â®à®¥ à ­ìè¥ ¡ë«® ¤®áâ㯭® ⮫쪮 ¢ KolibriNext.";
#define B_INSTALL 10
void main() void main()
{
word btn;
load_dll(libini, #lib_init,1);
loop() switch(WaitEventTimeout(300) & 0xFF)
{
case evButton:
btn = GetButtonID();
if (btn == 1) ExitProcess();
if (btn == B_INSTALL) EventInstall();
break;
case evKey:
GetKeys();
if (key_scancode == SCAN_CODE_ESC) ExitProcess();
break;
case evReDraw:
draw_window();
break;
default:
DrawLogo();
DrawLogo();
}
}
#define WINW 400
#define WINH 300
void draw_window()
{
system.color.get();
DefineAndDrawWindow(screen.width-WINW/2,screen.height-WINH/2,
WINW+9,WINH+skin_height,0x34,system.color.work,"KolibriN10",0);
DrawLogo();
DrawTextViewArea(30, 140, WINW-60, WINH-80,
#intro, -1, system.color.work_text);
DrawCaptButton(WINW-110/2, WINH-70, 110, 28, B_INSTALL,
0x0092D8, 0xFFFfff, "“áâ ­®¢¨âì");
}
void DrawLogo()
{
#define LX -46*6+WINW/2
#define LY 25
WriteTextLines(LX-1, LY, 0x80, 0x9F87B8, #logo, 9);
WriteTextLines(LX+3, LY, 0x80, 0x7ED1E3, #logo, 9);
pause(1);
WriteTextLines(LX+1, LY, 0x80, 0xEC008C, #logo, 9);
WriteTextLines(LX, LY, 0x80, 0xEC008C, #logo, 9);
}
void EventInstall()
{ {
//#include "..\lib\added_sysdir.c"; //#include "..\lib\added_sysdir.c";
//SetAdditionalSystemDirectory("kolibrios", abspath("install/kolibrios")+1); //SetAdditionalSystemDirectory("kolibrios", abspath("install/kolibrios")+1);
load_dll(libini, #lib_init,1);
ini_set_int stdcall ("/sys/settings/taskbar.ini", "Flags", "Attachment", 0); ini_set_int stdcall ("/sys/settings/taskbar.ini", "Flags", "Attachment", 0);
copyf(abspath("settings"), "/sys/settings"); copyf("/kolibrios/KolibriNext/settings", "/sys/settings");
RestartProcessByName("/sys/@icon", MULTIPLE); RestartProcessByName("/sys/@icon", MULTIPLE);
RestartProcessByName("/sys/@taskbar", SINGLE); RestartProcessByName("/sys/@taskbar", SINGLE);
RestartProcessByName("/sys/@docky", SINGLE); RestartProcessByName("/sys/@docky", SINGLE);
RunProgram("/sys/media/kiv", "\\S__/kolibrios/res/Wallpapers/Free yourself.jpg"); RunProgram("/sys/media/kiv", "\\S__/kolibrios/res/Wallpapers/Free yourself.jpg");
ExitProcess();
} }
void Operation_Draw_Progress(dword filename) { debug("copying: "); debugln(filename); } void Operation_Draw_Progress(dword filename) { debug("copying: "); debugln(filename); }
stop:

View File

@ -69,7 +69,7 @@
dword ty = h/2-7+y; dword ty = h/2-7+y;
if (id>0) DefineButton(x,y,w,h,id,color_b); if (id>0) DefineButton(x,y,w,h,id,color_b);
WriteText(tx+1,ty+1,0x90,LightenDarkenColor(color_b, -40),text); WriteText(tx+1,ty+1,0x90,MixColors(color_b,0,230),text);
WriteText(tx,ty,0x90,color_t,text); WriteText(tx,ty,0x90,color_t,text);
} }
@ -84,7 +84,7 @@
int ty = y + padding_v+1; int ty = y + padding_v+1;
int tw = strlen(text)*8; int tw = strlen(text)*8;
int w = tw + padding_h + padding_h; int w = tw + padding_h + padding_h;
unsigned darker_color = LightenDarkenColor(system.color.work_button, -40); unsigned darker_color = MixColors(system.color.work_button,0,230);
if (id>0) DefineButton(x,y,w,h,id,system.color.work_button); if (id>0) DefineButton(x,y,w,h,id,system.color.work_button);
@ -100,12 +100,14 @@
return w + right_margin; return w + right_margin;
} }
/* UNSTABLE
:unsigned LightenDarkenColor(dword color, amt) { :unsigned LightenDarkenColor(dword color, amt) {
dword r = color >> 16 + amt << 16; dword r = color >> 16 + amt << 16;
dword b = color >> 8 & 0x00FF + amt << 8; dword b = color >> 8 & 0x00FF + amt << 8;
dword g = color & 0x0000FF + amt; dword g = color & 0x0000FF + amt;
return g | b | r ; return g | b | r ;
} }
*/
:void ActiveButtonSwitch(int min, max) :void ActiveButtonSwitch(int min, max)
{ {

View File

@ -2391,7 +2391,7 @@ aSlide db 'SlideShow',0
aTglbar db 'ToggleBar',0 aTglbar db 'ToggleBar',0
inifileeskin db '/sys/settings/eskin.ini',0 inifileeskin db '/sys/settings/eskin.ini',0
amain db 'main',0 amain db 'bg',0
aprogram db 'program',0 aprogram db 'program',0
aparam db 'param',0 aparam db 'param',0

View File

@ -585,8 +585,6 @@ load_libraries l_libs_start,end_l_libs
call Get_ini call Get_ini
mcall 48,1,[button_style]
mcall 66,4,0,2 ; LShift+RShift mcall 66,4,0,2 ; LShift+RShift
mcall 66,,,33h ; LCtrl+LShift mcall 66,,,33h ; LCtrl+LShift
mcall 66,,88,110h ; Alt+Ctrl+F12 mcall 66,,88,110h ; Alt+Ctrl+F12

View File

@ -93,7 +93,6 @@ clock_enable: dd 1
cpu_usage_enable: dd 1 cpu_usage_enable: dd 1
chlang_enable: dd 1 chlang_enable: dd 1
place_attachment dd 1 place_attachment dd 1
button_style dd 1
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
page_list_enable: dd 0 page_list_enable: dd 0
redraw_window_flag dd 0 redraw_window_flag dd 0
@ -129,7 +128,6 @@ aCpuUsage db 'CpuUsage',0
aChangeLang db 'ChangeLang',0 aChangeLang db 'ChangeLang',0
aPageList db 'PageList',0 aPageList db 'PageList',0
aAttachment db 'Attachment',0 aAttachment db 'Attachment',0
aButtonsStyle db 'ButtonsStyle',0
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
aColors db 'Colors',0 aColors db 'Colors',0
aCpuUsageBckgr db 'CpuUsageBckgr',0 aCpuUsageBckgr db 'CpuUsageBckgr',0

View File

@ -150,14 +150,6 @@ Get_ini:
mov eax,1 mov eax,1
@@: @@:
mov [place_attachment],eax mov [place_attachment],eax
;--------------------------------------
invoke ini_get_int,library_path,aFlags,aButtonsStyle,1
cmp eax,2
jb @f
mov eax,1
@@:
mov [button_style],eax
;-------------------------------------- ;--------------------------------------
invoke ini_get_color,library_path,aColors,aMenuButton,0x44aa44 invoke ini_get_color,library_path,aColors,aMenuButton,0x44aa44
mov [MenuButton_color],eax mov [MenuButton_color],eax

View File

@ -17,7 +17,6 @@ Clock=1
CpuUsage=1 CpuUsage=1
ChangeLang=1 ChangeLang=1
Attachment=1 Attachment=1
ButtonsStyle=1
[Colors] [Colors]
MenuButton=0,100,0 MenuButton=0,100,0