diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index 924ed41014..208188d54e 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -1,14 +1,29 @@ //11.03.12 - start! +#ifndef AUTOBUILD + ?include "lang.h--" +#endif + #define MEMSIZE 0xFE800 -#include "..\lib\kolibri.h" +#include "..\lib\kolibri.h" #include "..\lib\mem.h" -#include "..\lib\file_system.h" #include "..\lib\strings.h" +#include "..\lib\dll.h" +#include "..\lib\file_system.h" #include "..\lib\list_box.h" #include "..\lib\figures.h" +#include "..\lib\lib.obj\box_lib.h" + +#ifdef LANG_RUS + ?define WINDOW_HEADER "Усправление темой" + ?define T_SKINS "Окна" + ?define T_WALLPAPERS "Обои рабочего стола" +#else + ?define WINDOW_HEADER "Appearance" + ?define T_SKINS "Skins" + ?define T_WALLPAPERS "Wallpappers" +#endif -#define WINDOW_HEADER "Appearance" #define PANEL_H 30 #define SKINS_STANDART_PATH "/sys/skins/" @@ -29,12 +44,12 @@ int cur; system_colors sc; proc_info Form; +scroll_bar scroll1 = { 18,200,398, 44,18,0,115,15,0,0xeeeeee,0xD2CED0,0x555555,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; + #include "other.h" -//ADD PaNEL - - -//skins direktory, configurate, delete from list, delete from disk, make default +//icons configurate, delete from list, delete from disk, make default +//remember current void Open_Dir() { @@ -61,8 +76,8 @@ void Open_Dir() void Draw_List() { int i; - list[SKINS].SetSizes(0, PANEL_H, Form.cwidth, Form.cheight-PANEL_H, 40, 20); - list[WALLPAPERS].SetSizes(0, PANEL_H, Form.cwidth, Form.cheight-PANEL_H, 40, 20); + list[SKINS].SetSizes(0, PANEL_H, Form.cwidth-scroll1.size_x-1, Form.cheight-PANEL_H, 40, 20); + list[WALLPAPERS].SetSizes(0, PANEL_H, Form.cwidth-scroll1.size_x-1, Form.cheight-PANEL_H, 40, 20); for (i=0; i scroll1.position) + { + list[active].first = scroll1.position; + Draw_List(); + break; + } + mm.get(); if (mm.vert) && (list[active].MouseScroll(mm.vert)) Draw_List(); if (mouse_clicked) @@ -209,10 +234,10 @@ void DrawTabs() if (active==SKINS) {col_bg=sc.work_button; col_text=sc.work_button_text;} else {col_bg=sc.work; col_text=sc.work_text;} DrawRectangle(10-1,7-1, 65+2, 21+2, sc.work_graph); - DrawCaptButton(10,7, 65, 21, 2, col_bg, col_text, "Skins"); //╨▓╨╛╨║╤А╤Г╨│ ╤А╨╕╤Б╨╛╨▓╨░╤В╤М ╨┐╨╝╤П╤В╨╛╤Г╨│ + DrawCaptButton(10,7, 65, 21, 2, col_bg, col_text, T_SKINS); //вокруг рисовать пмятоуг if (active==WALLPAPERS) {col_bg=sc.work_button; col_text=sc.work_button_text;} else {col_bg=sc.work; col_text=sc.work_text;} - DrawRectangle(90-1,7-1, 95+2, 21+2, sc.work_graph); - DrawCaptButton(90,7, 95, 21, 3, col_bg, col_text, "Wallpappers"); + DrawRectangle(90-1,7-1, strlen(T_WALLPAPERS)*6+16+2, 21+2, sc.work_graph); + DrawCaptButton(90,7, strlen(T_WALLPAPERS)*6+16, 21, 3, col_bg, col_text, T_WALLPAPERS); DrawBar(0,PANEL_H-2, Form.cwidth, 1, sc.work_graph); DrawBar(0,PANEL_H-1, Form.cwidth, 1, 0xEEEeee); @@ -226,6 +251,23 @@ void TabClick(int N) } +void DrawScroller() +{ + scroll1.bckg_col = 0xBBBbbb; + scroll1.frnt_col = sc.work; + scroll1.line_col = sc.work_graph; + + scroll1.max_area = list[active].count; + scroll1.cur_area = list[active].visible; + scroll1.position = list[active].first; + + scroll1.all_redraw=1; + scroll1.start_x = list[active].x + list[active].w; + scroll1.start_y = list[active].y-2; + scroll1.size_y = list[active].h+2; + + scrollbar_v_draw(#scroll1); +} stop: diff --git a/programs/cmm/appearance/compile.bat b/programs/cmm/appearance/compile_en.bat similarity index 55% rename from programs/cmm/appearance/compile.bat rename to programs/cmm/appearance/compile_en.bat index 25c4202299..1addfc677d 100644 --- a/programs/cmm/appearance/compile.bat +++ b/programs/cmm/appearance/compile_en.bat @@ -1,5 +1,9 @@ +@del lang.h-- +@echo #define LANG_ENG 1 >lang.h-- + ..\C--\C-- appearance.c @del appearance.kex @rename appearance.com appearance.kex @del warning.txt +@del lang.h-- @pause \ No newline at end of file diff --git a/programs/cmm/appearance/compile_ru.bat b/programs/cmm/appearance/compile_ru.bat new file mode 100644 index 0000000000..1737853904 --- /dev/null +++ b/programs/cmm/appearance/compile_ru.bat @@ -0,0 +1,9 @@ +@del lang.h-- +@echo #define LANG_RUS 1 >lang.h-- + +..\C--\C-- appearance.c +@del appearance.kex +@rename appearance.com appearance.kex +@del warning.txt +@del lang.h-- +@pause \ No newline at end of file diff --git a/programs/cmm/browser/HTMLv.c b/programs/cmm/browser/HTMLv.c index 760528e2f4..ee22eedf9a 100644 --- a/programs/cmm/browser/HTMLv.c +++ b/programs/cmm/browser/HTMLv.c @@ -3,6 +3,10 @@ //Asper, lev, Lrz, Barsuk, Nable... //home icon - rachel fu, GPL licence +#ifndef AUTOBUILD + #include "lang.h--" +#endif + //libraries #define MEMSIZE 0x100000 #include "..\lib\kolibri.h" @@ -21,10 +25,6 @@ #include "img\toolbar_icons.c" #include "img\URLgoto.txt"; -#ifndef AUTOBUILD - #include "lang.h--" -#endif - #ifdef LANG_RUS char version[]=" Текстовый браузер 0.99.09"; ?define IMAGES_CACHE_CLEARED "Кэш картинок очищен"