diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index f7c2c06017..cf367ba067 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -146,8 +146,16 @@ void main() SetAppColors(); if (param) { - strcpy(#path, #param); - if (path[strlen(#path)-1]=='/') path[strlen(#path)-1]=NULL; //no "/" in the end + if (param[strlen(#param)-1]=='/') param[strlen(#param)-1]=NULL; //no "/" in the end + + if (dir_exists(#param)==true) + { + strcpy(#path, #param); + } + else + { + notify(T_NOTIFY_APP_PARAM_WRONG); + } } Open_Dir(#path,ONLY_OPEN); @@ -214,7 +222,7 @@ void main() if (mouse.key&MOUSE_LEFT) && (mouse.up) { if (files.ProcessMouse(mouse.x, mouse.y)) List_ReDraw(); - else if (mouse.dblclick)) Open(0); + else if (mouse.dblclick) Open(0); } //file menu if (mouse.key&MOUSE_RIGHT) @@ -909,9 +917,9 @@ inline fastcall void GoBack() void ShowOpenWithDialog() { - byte param[4097]; - sprintf(#param,"~%s",#file_path); - RunProgram("/sys/@open", #param); + byte open_param[4097]; + sprintf(#open_param,"~%s",#file_path); + RunProgram("/sys/@open", #open_param); } void NewElement(byte newf) diff --git a/programs/cmm/eolite/include/about.h b/programs/cmm/eolite/include/about.h index 780a6eb6ce..24e0f4fcd5 100644 --- a/programs/cmm/eolite/include/about.h +++ b/programs/cmm/eolite/include/about.h @@ -43,7 +43,7 @@ void about_dialog() WriteTextB(about_x+2,107,0x82,0xD49CD2,ABOUT_TITLE); WriteTextB(about_x,105,0x82,0x9D129D,ABOUT_TITLE); DrawRectangle3D(0,154,about_form.cwidth,1,system.color.work_dark,system.color.work_light); - WriteTextLines(7,163,0x90,system.color.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunk_Joker, Pavelyakov\n(c) 2008 - 2016",20); + WriteTextLines(7,163,0x90,system.color.work_text,"KolibriOS File Manager\nAuthors: Leency, Veliant\nPunk_Joker, Pavelyakov\n(c) 2008 - 2017",20); #ifdef LANG_RUS DrawFlatButton(60,about_form.cheight-38,11,"История разработки"); #endif diff --git a/programs/cmm/eolite/include/gui.h b/programs/cmm/eolite/include/gui.h index fae3419def..5889598d30 100644 --- a/programs/cmm/eolite/include/gui.h +++ b/programs/cmm/eolite/include/gui.h @@ -57,14 +57,7 @@ int DrawFlatButton(dword x, y, id, text) int padding_w = 15; int width = strlen(text) * 8 + padding_w + padding_w; int height = 25; - dword border_3d_light = MixColors(system.color.work_button,0xFFFfff,140); - dword border_3d_dark = MixColors(system.color.work_button,0x111111,220); - dword border_light = MixColors(system.color.work_button,0x111111,140); - dword border_dark = MixColors(system.color.work_button,0x111111,100); - DrawRectangle3D(x,y,width,height,border_light, border_dark); - DrawRectangle3D(x+1,y+1,width-2,height-2, border_3d_light, border_3d_dark); - DrawBar(x+2, y+2, width-3, height-3, system.color.work_button); - if (id) DefineButton(x+1,y+1,width-2,height-2,id+BT_HIDE,0xEFEBEF); + if (id) DefineButton(x+1,y+1,width-2,height-2,id,system.color.work_button); WriteText(x+padding_w,height/2+y-6,0x90,system.color.work_button_text,text); return width + padding_w; } diff --git a/programs/cmm/eolite/include/translations.h b/programs/cmm/eolite/include/translations.h index 1b453e04d6..5f43e00e43 100644 --- a/programs/cmm/eolite/include/translations.h +++ b/programs/cmm/eolite/include/translations.h @@ -16,6 +16,7 @@ ?define FS_ITEM_ALREADY_EXISTS "'Элемент с таким именем уже существует' -E" ?define NOT_CREATE_FOLDER "'Не удалось создать папку.' -E" ?define NOT_CREATE_FILE "'Не удалось создать файл.' -E" + ?define T_NOTIFY_APP_PARAM_WRONG "'Параметр для запуска Eolite не верен: папка не сужествует!' -E" ?define T_COPY_WINDOW_TITLE "Копирую..." ?define T_COPY_WINDOW_TEXT "Копируется файл:" ?define T_MOVE_WINDOW_TITLE "Перемещаю..." @@ -45,6 +46,7 @@ ?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..." ?define NOT_CREATE_FOLDER "'Folder can not be created.' -E" ?define NOT_CREATE_FILE "'File can not be created.' -E" + ?define T_NOTIFY_APP_PARAM_WRONG "'Eolite param is wrong: directory does not exists!' -E" ?define T_COPY_WINDOW_TITLE "Copying..." ?define T_COPY_WINDOW_TEXT "Copying file:" ?define T_MOVE_WINDOW_TITLE "Moving..." diff --git a/programs/cmm/lib/file_system.h b/programs/cmm/lib/file_system.h index f19696869b..ba526098ed 100644 --- a/programs/cmm/lib/file_system.h +++ b/programs/cmm/lib/file_system.h @@ -200,7 +200,7 @@ :char dir_exists(dword fpath) { BDVK fpath_atr; - GetFileInfo(fpath, #fpath_atr); + if (GetFileInfo(fpath, #fpath_atr) != 0) return false; return fpath_atr.isfolder; } :char file_exists(dword fpath)