git-svn-id: svn://kolibrios.org@6930 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2017-07-04 15:14:51 +00:00
parent 8b1036ed49
commit 00b4e63b4e
5 changed files with 19 additions and 16 deletions

View File

@ -145,9 +145,17 @@ void main()
SystemDiscs.Get();
SetAppColors();
if (param)
{
if (param[strlen(#param)-1]=='/') param[strlen(#param)-1]=NULL; //no "/" in the end
if (dir_exists(#param)==true)
{
strcpy(#path, #param);
if (path[strlen(#path)-1]=='/') path[strlen(#path)-1]=NULL; //no "/" in the end
}
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)

View File

@ -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

View File

@ -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;
}

View File

@ -16,6 +16,7 @@
?define FS_ITEM_ALREADY_EXISTS "'<27>«¥¬¥­â á â ª¨¬ ¨¬¥­¥¬ 㦥 áãé¥áâ¢ã¥â' -E"
?define NOT_CREATE_FOLDER "'<27>¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã.' -E"
?define NOT_CREATE_FILE "'<27>¥ 㤠«®áì ᮧ¤ âì ä ©«.' -E"
?define T_NOTIFY_APP_PARAM_WRONG "'<27> à ¬¥âà ¤«ï § ¯ã᪠ Eolite ­¥ ¢¥à¥­: ¯ ¯ª  ­¥ á㦥áâ¢ã¥â!' -E"
?define T_COPY_WINDOW_TITLE "Š®¯¨àãî..."
?define T_COPY_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:"
?define T_MOVE_WINDOW_TITLE "<EFBFBD>¥à¥¬¥é î..."
@ -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..."

View File

@ -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)