diff --git a/data/Tupfile.lua b/data/Tupfile.lua index a743af5e80..803735292a 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -172,6 +172,7 @@ extra_files = { {"kolibrios/utils/cnc_editor/kolibri.NC", PROGS .. "/other/cnc_editor/kolibri.NC"}, {"kolibrios/emul/dosbox/", "common/emul/DosBox/*"}, {"kolibrios/emul/e80/readme.txt", PROGS .. "/emulator/e80/trunk/readme.txt"}, + {"kolibrios/emul/e80/keyboard.png", PROGS .. "/emulator/e80/trunk/keyboard.png"}, {"kolibrios/emul/fceu/fceu", PROGS .. "/emulator/fceu/fceu"}, {"kolibrios/emul/fceu/FCEU ReadMe.txt", PROGS .. "/emulator/fceu/FCEU ReadMe.txt"}, {"kolibrios/emul/", "common/emul/gameboy"}, diff --git a/data/common/File Managers/icons.ini b/data/common/File Managers/icons.ini index d5a8690a40..1953971b53 100644 --- a/data/common/File Managers/icons.ini +++ b/data/common/File Managers/icons.ini @@ -174,25 +174,21 @@ mgb=47 =45 =45 =60 -txt=9 -png=70 -jpg=70 -jpeg=70 -bmp=70 -gif=70 -pcx=70 -log=55 -zip=89 -7z=89 +com=1 +bat=1 +sh=1 +exe=2 img=3 -3ds=78 +ini=5 +txt=9 +lif=13 +csv=28 xls=28 xlsx=28 -pdf=73 -wav=64 -mp3=64 -midi=74 -mnt=90 +vox=30 +htm=31 +html=31 +sys=38 avi=40 mpg=40 mpe=40 @@ -206,25 +202,31 @@ mp4=40 vob=40 webm=40 fb2=44 -xm=65 -ini=5 +asm=55 +log=55 +wav=64 +mp3=64 +xm=64 +png=70 +jpg=70 +jpeg=70 +bmp=70 +gif=70 +pcx=70 +pdf=73 +mid=74 +midi=74 +mid=74 +midi=74 +3ds=78 +stl=78 +zip=89 +7z=89 +mnt=90 obj=92 dll=92 skn=80 -mid=74 -midi=74 -asm=55 kex=88 -sys=38 -exe=2 -com=1 -bat=1 -sh=1 -vox=30 rft=85 -mobi=85 -djvu=85 -csv=28 rft=85 -lif=13 -stl=78 \ No newline at end of file +kf=118 diff --git a/data/common/icons32.png b/data/common/icons32.png index 172f0dd950..04135b28f4 100644 Binary files a/data/common/icons32.png and b/data/common/icons32.png differ diff --git a/programs/cmm/barscfg/barscfg.c b/programs/cmm/barscfg/barscfg.c index 960df86e9d..7ab9373a60 100644 --- a/programs/cmm/barscfg/barscfg.c +++ b/programs/cmm/barscfg/barscfg.c @@ -18,8 +18,8 @@ #ifdef LANG_RUS ?define WINDOW_TITLE "Настройки панели задач и Дока" - ?define TASK_FRAME_T " Панель задач " - ?define DOCK_FRAME_T " Док " + ?define TASK_FRAME_T " Панель задач " + ?define DOCK_FRAME_T " Док " ?define MIN_LEFT_BUTTON "Кнопка скрытия слева" ?define MIN_RIGHT_BUTTON "Кнопка скрытия справа" ?define SOFTEN_UP "Сглаживание сверху" @@ -36,8 +36,8 @@ ?define CHANGE_POS "Нажмите на изображение для смены позиции" #else ?define WINDOW_TITLE "Taskbar and Docky configuration" - ?define TASK_FRAME_T " Taskbar " - ?define DOCK_FRAME_T " Docky " + ?define TASK_FRAME_T " Taskbar " + ?define DOCK_FRAME_T " Docky " ?define MIN_LEFT_BUTTON "Min Left Button" ?define MIN_RIGHT_BUTTON "Min Right Button" ?define SOFTEN_UP "Soften Up" @@ -73,6 +73,9 @@ more_less_box tbPanelHeight = { NULL, 6, 99, PANEL_HEIGHT }; more_less_box tbSoftenHeight = { NULL, 0, 99, SOFTEN_HEIGHT }; more_less_box tbButtonOffset = { NULL, 0, 99, BUTTON_OFFSET }; +checkbox taskbar_on = 0; +checkbox docky_on = 0; + int tbAttachment; checkbox tbSoftenUp = { SOFTEN_UP }; checkbox tbClock = { CLOCK }; @@ -104,34 +107,37 @@ void main() case evButton: id=GetButtonID(); if (1==id) ExitProcess(); - //taskbar buttons - if (BTN_TB_ATTACHEMENT == id) { - tbAttachment ^= 1; - DrawWindowContent(); - SaveSettingsAndRestartProcess(TASKBAR); - } - if (tbSoftenUp.click(id)) || (tbSoftenDown.click(id)) - || (tbMinLeftButton.click(id)) || (tbMinRightButton.click(id)) - || (tbRunApplButton.click(id)) || (tbClnDeskButton.click(id)) { - SaveSettingsAndRestartProcess(TASKBAR); - } + if (taskbar_on.checked) EventTaskbarProcessButton(id); + if (docky_on.checked) EventDockyProcessButton(id); - if (tbClock.click(id)) || (tbCpuUsage.click(id)) - || (tbChangeLang.click(id)) || (tbMenuButton.click(id)) - || (tbPanelHeight.click(id)) || (tbSoftenHeight.click(id)) - || (tbButtonOffset.click(id)) { - SaveSettingsAndRestartProcess(TASKBAR); + if (taskbar_on.click(id)) { + IF (taskbar_on.checked == true) RunProgram("/sys/@taskbar", 0); + ELSE KillProcessByName("@TASKBAR", SINGLE); + EAX = taskbar_on.checked ^ 1; + tbSoftenUp.disabled = EAX; + tbSoftenDown.disabled = EAX; + tbMinLeftButton.disabled = EAX; + tbMinRightButton.disabled = EAX; + tbRunApplButton.disabled = EAX; + tbClnDeskButton.disabled = EAX; + tbClock.disabled = EAX; + tbCpuUsage.disabled = EAX; + tbChangeLang.disabled = EAX; + tbMenuButton.disabled = EAX; + tbPanelHeight.disabled = EAX; + tbSoftenHeight.disabled = EAX; + tbButtonOffset.disabled = EAX; + tbButtonOffset.disabled = EAX; + DrawWindowContent(); } - //docky buttons - if (id==200) { - dkLocation++; - if (dkLocation>3) dkLocation=1; - DrawWindowContent(); - SaveSettingsAndRestartProcess(DOCKY); + if (docky_on.click(id)) { + IF (docky_on.checked == true) RunProgram("/sys/@docky", 0); + ELSE KillProcessByName("@DOCKY", SINGLE); + dkFsize.disabled = docky_on.checked ^ 1; + dkAshow.disabled = docky_on.checked ^ 1; + DrawWindowContent(); } - if (dkFsize.click(id)) SaveSettingsAndRestartProcess(DOCKY); - if (dkAshow.click(id)) SaveSettingsAndRestartProcess(DOCKY); break; case evKey: @@ -164,7 +170,7 @@ void DrawWindowContent() y.n = frame_y; DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 100 + BT_HIDE, 0); DrawPanelsImage(y.n, tbAttachment); - WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS); + WriteTextWithBg(68, y.inc(7), 0xD0, system.color.work_text, CHANGE_POS, system.color.work); tbSoftenUp.draw(22, y.inc(35)); tbClock.draw(win_center_x, y.n); tbSoftenDown.draw(22, y.inc(24)); @@ -177,14 +183,16 @@ void DrawWindowContent() tbSoftenHeight.draw(22, y.inc(32)); tbButtonOffset.draw(22, y.inc(32)); DrawFrame(PD, frame_y, Form.cwidth-PD-PD, y.inc(32)-frame_y, TASK_FRAME_T); + taskbar_on.draw(22, frame_y-7); //DOCKY frame_y = calc(y.inc(20)); DefineButton(22, y.inc(18), PIMG_W-1, PIMG_H-1, 200 + BT_HIDE, 0); DrawPanelsImage(y.n, dkLocation+1); - WriteText(68, y.inc(7), 0x90, system.color.work_text, CHANGE_POS); + WriteTextWithBg(68, y.inc(7), 0xD0, system.color.work_text, CHANGE_POS, system.color.work); dkFsize.draw(22, y.inc(35)); dkAshow.draw(win_center_x, y.n); DrawFrame(PD, frame_y, Form.cwidth-PD-PD, Form.cheight-frame_y-PD, DOCK_FRAME_T); + docky_on.draw(22, frame_y-7); } void LoadCfg() @@ -205,7 +213,10 @@ void LoadCfg() dkLocation = docky_ini.GetInt("location", 0); dkFsize.checked = docky_ini.GetInt("fsize", 0); - dkAshow.checked = docky_ini.GetInt("ashow", 0); + dkAshow.checked = docky_ini.GetInt("ashow", 0); + + taskbar_on.checked = CheckProcessExists("@TASKBAR"); + docky_on.checked = CheckProcessExists("@DOCKY"); } void SaveSettingsAndRestartProcess(byte panel_type) @@ -252,6 +263,38 @@ void RestartProcess(byte panel_type) ActivateWindow(GetProcessSlot(Form.ID)); } +void EventTaskbarProcessButton(dword id) +{ + if (BTN_TB_ATTACHEMENT == id) { + tbAttachment ^= 1; + DrawWindowContent(); + SaveSettingsAndRestartProcess(TASKBAR); + } + if (tbSoftenUp.click(id)) || (tbSoftenDown.click(id)) + || (tbMinLeftButton.click(id)) || (tbMinRightButton.click(id)) + || (tbRunApplButton.click(id)) || (tbClnDeskButton.click(id)) { + SaveSettingsAndRestartProcess(TASKBAR); + } + if (tbClock.click(id)) || (tbCpuUsage.click(id)) + || (tbChangeLang.click(id)) || (tbMenuButton.click(id)) + || (tbPanelHeight.click(id)) || (tbSoftenHeight.click(id)) + || (tbButtonOffset.click(id)) { + SaveSettingsAndRestartProcess(TASKBAR); + } +} + +void EventDockyProcessButton(dword id) +{ + if (BTN_DOCKY_ATTACHEMENT == id) { + dkLocation++; + if (dkLocation>3) dkLocation=1; + DrawWindowContent(); + SaveSettingsAndRestartProcess(DOCKY); + } + if (dkFsize.click(id)) || (dkAshow.click(id)) { + SaveSettingsAndRestartProcess(DOCKY); + } +} stop: \ No newline at end of file diff --git a/programs/cmm/lib/gui/checkbox.h b/programs/cmm/lib/gui/checkbox.h index 8989a97d72..73740f05c7 100644 --- a/programs/cmm/lib/gui/checkbox.h +++ b/programs/cmm/lib/gui/checkbox.h @@ -61,26 +61,28 @@ struct checkbox :void checkbox::draw(dword _x,_y) { #define SIZE 14 + dword text_col = system.color.work_text; if (!id) id = GetFreeButtonId(); x=_x; y=_y; DefineButton(x-1, y-1, strlen(text)*8 + SIZE + 17, SIZE+2, id+BT_HIDE+BT_NOFRAME, 0); - WriteTextWithBg(x+SIZE+8, SIZE / 2 + y -7, 0xD0, system.color.work_text, text, system.color.work); DrawRectangle(x, y, SIZE, SIZE, system.color.work_graph); if (disabled) { DrawRectangle(x+1, y+1, SIZE-2, SIZE-2, 0xffffff); DrawBar(x+2, y+2, SIZE-3, SIZE-3, 0xCCCccc); + text_col = MixColors(system.color.work, system.color.work_text, 128); } - else if (checked == 0) + else if (checked == false) { DrawRectangle3D(x+1, y+1, SIZE-2, SIZE-2, 0xDDDddd, 0xffffff); DrawBar(x+2, y+2, SIZE-3, SIZE-3, 0xffffff); } - else if (checked == 1) + else if (checked == true) { _PutImage(x+1, y+1, 13, 13, #checkbox_flag); } + if (text) WriteTextWithBg(x+SIZE+8, SIZE / 2 + y -7, 0xD0, text_col, text, system.color.work); DrawRectangle3D(x-1,y-1,SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light); } diff --git a/programs/cmm/lib/gui/more_less_box.h b/programs/cmm/lib/gui/more_less_box.h index cc68aca2be..9912f57a1a 100644 --- a/programs/cmm/lib/gui/more_less_box.h +++ b/programs/cmm/lib/gui/more_less_box.h @@ -5,6 +5,7 @@ int click_delta; int x,y; unsigned id_inc, id_dec; + bool disabled; void check_values(); bool click(); bool inc(); @@ -41,6 +42,7 @@ { #define VALUE_FIELD_W 34 #define SIZE 18 + dword text_col = system.color.work_text; dword value_text = itoa(value); check_values(); @@ -48,12 +50,23 @@ DrawRectangle(x, y, VALUE_FIELD_W+1, SIZE, system.color.work_graph); DrawRectangle3D(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xDDDddd, 0xffffff); - DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff); + + if (disabled) + { + DrawRectangle(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xffffff); + DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xCCCccc); + text_col = MixColors(system.color.work, system.color.work_text, 128); + } + else + { + DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff); + } + WriteText( -strlen(value_text)+3*8 + x+6, SIZE / 2 + y -6, 0x90, 0x333333, value_text); DrawCaptButton(VALUE_FIELD_W + x + 1, y, SIZE, SIZE, id_inc, system.color.work_button, system.color.work_button_text, "+"); DrawCaptButton(VALUE_FIELD_W + x + SIZE, y, SIZE, SIZE, id_dec, system.color.work_button, system.color.work_button_text, "-"); - WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, system.color.work_text, text, system.color.work); + WriteTextWithBg(x+VALUE_FIELD_W+SIZE+SIZE+10, SIZE / 2 + y -7, 0xD0, text_col, text, system.color.work); DrawRectangle3D(x-1,y-1,VALUE_FIELD_W+SIZE+SIZE+2,SIZE+2,system.color.work_dark,system.color.work_light); }