From 11b7b3cd30d378247104a5950e53c15316658346 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" <lipatov.kiril@gmail.com> Date: Wed, 23 Apr 2014 16:30:49 +0000 Subject: [PATCH] CMM: lots of fixes git-svn-id: svn://kolibrios.org@4885 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/appearance/appearance.c | 18 +++++----- programs/cmm/end/end.c | 50 ++++++++++++---------------- programs/cmm/installer/installer.c | 1 - programs/cmm/kolibrin/kolibrin.c | 2 +- 4 files changed, 33 insertions(+), 38 deletions(-) diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index fce4be8b76..b056ecffe4 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -28,8 +28,8 @@ unsigned char icons[]= FROM "icons.raw"; #define PANEL_H 30 -#define SKINS_STANDART_PATH "/kolibrios/res/skins/" -#define WALP_STANDART_PATH "/kolibrios/res/wallpapers/" +#define SKINS_STANDART_PATH "/kolibrios/res/skins" +#define WALP_STANDART_PATH "/kolibrios/res/wallpapers" llist list[2]; int active; @@ -65,11 +65,11 @@ void Open_Dir() { strcpy(#temp_filename, j*304 + buf+72); strlwr(#temp_filename); - if (active==SKINS) if (strcmp(#temp_filename+strlen(#temp_filename)-4,".skn")!=0) continue; - if (active==WALLPAPERS) if (strcmp(#temp_filename+strlen(#temp_filename)-4,".txt")==0) continue; + if (active==SKINS) if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".skn")!=0) continue; + if (active==WALLPAPERS) if (strcmpi(#temp_filename+strlen(#temp_filename)-4,".txt")==0) continue; cur = list[active].count; files_mas[cur]=j; - if (!strcmp("default.skn",#temp_filename)) files_mas[0]><files_mas[list[active].count]; + if (!strcmpi("default.skn",#temp_filename)) files_mas[0]><files_mas[list[active].count]; list[active].count++; } Sort_by_Name(0, list[active].count-1); @@ -118,13 +118,13 @@ void GetFiles() { strcpy(#folder_path, SKINS_STANDART_PATH); Open_Dir(); - if (!list[active].count) notify("No skins were found"); + if (!list[active].count) notify("'No skins were found' -E"); } if (list[WALLPAPERS].active) { strcpy(#folder_path, WALP_STANDART_PATH); Open_Dir(); - if (!list[active].count) notify("No wallpapers were found"); + if (!list[active].count) notify("'No wallpapers were found' -E"); } } @@ -134,6 +134,7 @@ void Apply() { strcpy(#cur_file_path, #folder_path); cur = list[SKINS].current; + chrcat(#cur_file_path, '/'); strcat(#cur_file_path, files_mas[cur]*304 + buf+72); SetSystemSkin(#cur_file_path); //Draw_List(); @@ -143,6 +144,7 @@ void Apply() strcpy(#cur_file_path, "\\S__"); strcat(#cur_file_path, #folder_path); cur = list[WALLPAPERS].current; + chrcat(#cur_file_path, '/'); strcat(#cur_file_path, files_mas[cur]*304 + buf+72); RunProgram("/sys/media/kiv", #cur_file_path); Draw_List(); @@ -163,7 +165,7 @@ void main() mem_Init(); SetEventMask(0x27); - if (load_dll2(boxlib, #box_lib_init,0)!=0) {notify("Fatal Error: library doesn't exists /rd/1/lib/box_lib.obj"); ExitProcess();} + if (load_dll2(boxlib, #box_lib_init,0)!=0) notify("'Fatal Error: library doesn't exists /rd/1/lib/box_lib.obj' -E"); list[SKINS].current = list[WALLPAPERS].current = -1; list[SKINS].first = list[WALLPAPERS].first = 0; TabClick(WALLPAPERS); diff --git a/programs/cmm/end/end.c b/programs/cmm/end/end.c index d24c2243c8..4af0eadecc 100644 --- a/programs/cmm/end/end.c +++ b/programs/cmm/end/end.c @@ -10,14 +10,14 @@ char *BUTTONS_CAPTIONS[]={ "������������ [Enter]"w, 13, "���������� [End]"w, 181, - "���� [Home]"w, 180, + //"���� [Home]"w, 180, "������ [Esc]"w, 27, 0}; #else char *BUTTONS_CAPTIONS[]={ " Reboot [Enter]",13, " Power off [End]",181, - " Kernel [Home]",180, + //" Kernel [Home]",180, " Close [Esc]",27, 0}; #endif @@ -29,15 +29,11 @@ unsigned char moon[6*6] = FROM "moon.raw"; int WIN_SIZE_X, WIN_SIZE_Y; int PANEL_X, PANEL_Y; -#define NIGHT_PALEL_HEIGHT 45 -#define STARS_COUNT 30 +#define NIGHT_PALEL_HEIGHT 50 +#define STARS_COUNT 25 #define PANEL_SIZE_X 260 -#define PANEL_SIZE_Y 165 - -dword stars_col[4]={0xD2CF19, 0x716900, 0x002041}; //0x005BFF - �������, ����� - - +#define PANEL_SIZE_Y 148 :void ShadowScreen(dword img, w, h) { @@ -84,7 +80,7 @@ void main() goto _DRAW; loop() { - WaitEventTimeout(130); + WaitEventTimeout(330); switch(EAX & 0xFF) { case evButton: @@ -130,7 +126,7 @@ void draw_main_area() DrawRectangle(PANEL_X, PANEL_Y, PANEL_SIZE_X, PANEL_SIZE_Y, 0); DrawBar(PANEL_X+1, PANEL_Y+NIGHT_PALEL_HEIGHT+1, PANEL_SIZE_X-1, PANEL_SIZE_Y-NIGHT_PALEL_HEIGHT-1, sc.work); - for (i=0; i<4; i++) + for (i=0; i<3; i++) { DefineButton(PANEL_X+33, i*23 + PANEL_Y+NIGHT_PALEL_HEIGHT+16, 190,19, BUTTONS_CAPTIONS[i*2+1],sc.work_button); WriteText(PANEL_X+59, i*23 + PANEL_Y+NIGHT_PALEL_HEIGHT+22, 0x80,sc.work_button_text, BUTTONS_CAPTIONS[i*2]); @@ -139,6 +135,8 @@ void draw_main_area() draw_stars(); } +dword stars_col[4]={0xD2CF19, 0x716900, 0x002041, 0xEAE0DE}; //0x005BFF - �������, ����� + void draw_stars() { @@ -148,24 +146,20 @@ void draw_stars() for (i=0; i<STARS_COUNT; i++) { - x_pic = random(PANEL_SIZE_X-1); - y_pic = random(NIGHT_PALEL_HEIGHT-1); - col = random(3); - PutPixel(PANEL_X+1 +x_pic, PANEL_Y+1 +y_pic, stars_col[col]); + x_pic = random(PANEL_SIZE_X-2); + y_pic = random(NIGHT_PALEL_HEIGHT-2); + col = random(4); + PutPixel(PANEL_X+2 +x_pic, PANEL_Y+2 +y_pic, stars_col[col]); + if (stars_col[col]==0xD2CF19) + { + PutPixel(PANEL_X+2 +x_pic+1, PANEL_Y+2 +y_pic, stars_col[col+1]); + PutPixel(PANEL_X+2 +x_pic-1, PANEL_Y+2 +y_pic, stars_col[col+1]); + PutPixel(PANEL_X+2 +x_pic, PANEL_Y+2 +y_pic-1, stars_col[col+1]); + PutPixel(PANEL_X+2 +x_pic, PANEL_Y+2 +y_pic+1, stars_col[col+1]); + } + } - /*for (i=0; i<3; i++) - { - x_pic = random(PANEL_SIZE_X-8)+4; - y_pic = random(NIGHT_PALEL_HEIGHT-8)+4; - - PutPixel(PANEL_X +x_pic, PANEL_Y +y_pic, stars_col[0]); - PutPixel(PANEL_X+1 +x_pic, PANEL_Y +y_pic, stars_col[1]); - PutPixel(PANEL_X-1 +x_pic, PANEL_Y +y_pic, stars_col[1]); - PutPixel(PANEL_X +x_pic, PANEL_Y +y_pic+1, stars_col[1]); - PutPixel(PANEL_X +x_pic, PANEL_Y +y_pic-1, stars_col[1]); - }*/ - - _PutImage(PANEL_X+PANEL_SIZE_X-60,PANEL_Y+10, 6,6, #moon); + _PutImage(PANEL_X+PANEL_SIZE_X-60+random(3),PANEL_Y+10+random(3), 6,6, #moon); } diff --git a/programs/cmm/installer/installer.c b/programs/cmm/installer/installer.c index 7d67597975..bfdac6f2f8 100644 --- a/programs/cmm/installer/installer.c +++ b/programs/cmm/installer/installer.c @@ -29,7 +29,6 @@ void main() { GetProcessInfo(#Process, i); if (strcmpi(#Process.name, "@icon")==0) KillProcess(Process.ID); - if (strcmpi(#Process.name, "@panel")==0) KillProcess(Process.ID); if (strcmpi(#Process.name, "@docky")==0) KillProcess(Process.ID); } SetAddApplDir("kolibrios", abspath("kolibrios")+1); diff --git a/programs/cmm/kolibrin/kolibrin.c b/programs/cmm/kolibrin/kolibrin.c index f5e78cf916..0796e66b36 100644 --- a/programs/cmm/kolibrin/kolibrin.c +++ b/programs/cmm/kolibrin/kolibrin.c @@ -38,7 +38,7 @@ void main() } } } - notify("'�� ���� ���� installer.kex �� � ����� �� ��᪠!\n����� ���� � �������� ��� ������.' -dE"); + notify("'KolibriN\n�� ���� ���� installer.kex �� � ����� �� ��᪠!\n����� ���� � �������� ��� ������.' -dtE"); ExitProcess(); }