Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3996 → Rev 3997

/programs/cmm/eolite/Eolite.c
31,7 → 31,7
?define T_YES "„ "
?define T_NO "¥â"
?define T_DEL_ERROR_1 "Žè¨¡ª .  ¯ª  ­¥ ¯ãáâ ï."
?define T_DEL_ERROR_2 "Žè¨¡ª . ” ©«®¢ ï á¨á⥬  ⮫쪮 ¤«ï ç⥭¨ï."
?define WAIT_DELETING_FOLDER "“¤ «ï¥âáï ¯ ¯ª . ®¤®¦¨â¥..."
?define NOT_CREATE_FOLDER "¥ 㤠«®áì ᮧ¤ âì ¯ ¯ªã."
?define NOT_CREATE_FILE "¥ 㤠«®áì ᮧ¤ âì ä ©«."
?define ERROR_1 "Žè¨¡ª  ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj"
47,7 → 47,7
?define T_YES "Jah"
?define T_NO "Ei"
?define T_DEL_ERROR_1 "Viga. Kataloog ei ole tühi."
?define T_DEL_ERROR_2 "Viga. Failisüsteem ainult loetav."
?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
?define NOT_CREATE_FOLDER "Kataloogi ei saa luua."
?define NOT_CREATE_FILE "Faili ei saa luua."
?define ERROR_1 "Viga teegi laadimisel /rd/1/lib/box_lib.obj"
63,7 → 63,7
?define T_YES "Yes"
?define T_NO "No"
?define T_DEL_ERROR_1 "Error. Folder isn't empty."
?define T_DEL_ERROR_2 "Error. Filesystem read-only."
?define WAIT_DELETING_FOLDER "Deleting folder. Please, wait..."
?define NOT_CREATE_FOLDER "Folder can not be created."
?define NOT_CREATE_FILE "File can not be created."
?define ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj"
73,8 → 73,8
 
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
 
#define TITLE "Eolite File Manager v1.97.2"
#define ABOUT_TITLE "Eolite v1.97.2"
#define TITLE "Eolite File Manager v1.97.7"
#define ABOUT_TITLE "Eolite v1.97.7"
dword col_work = 0xE4DFE1;
dword col_border = 0x9098B0; //A0A0B8; //0x819FC5;
dword col_padding = 0xC8C9C9;
640,14 → 640,14
 
void Del_Form()
{
int dform_x = files.w - 200 / 2 + files.x-3;
int dform_x = Form.width/2-13;
if (!files.count) return;
DrawPopup(dform_x,160,213,80,1,col_work,col_border);
WriteText(-strlen(T_DELETE_FILE)*3+107+dform_x,175,0x80,0,T_DELETE_FILE);
DrawPopup(dform_x,160,220,80,1,col_work,col_border);
WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,0,T_DELETE_FILE);
IF (strlen(#file_name)<28)
{
WriteText(strlen(#file_name)*3+107+dform_x+2,190,0x80,0,"?");
WriteText(-strlen(#file_name)*3+107+dform_x,190,0x80,0,#file_name);
WriteText(strlen(#file_name)*3+110+dform_x+2,190,0x80,0,"?");
WriteText(-strlen(#file_name)*3+110+dform_x,190,0x80,0,#file_name);
}
else
{
655,8 → 655,8
ESI = 24;
WriteText(dform_x+20,190,0,0,#file_name);
}
DrawFlatButton(dform_x+26,208,70,20,301,0xFFB6B5,T_YES);
DrawFlatButton(dform_x+119,208,70,20,302,0xC6DFC6,T_NO);
DrawFlatButton(dform_x+27,208,70,20,301,0xFFB6B5,T_YES);
DrawFlatButton(dform_x+120,208,70,20,302,0xC6DFC6,T_NO);
del_active=1;
}
 
663,15 → 663,17
void Del_File2(dword way)
{
int del_rezult;
dword dirbuf, fcount, i, filename;
char del_from[4096], error;
del_rezult = DeleteFile(way);
if (del_rezult)
if (DeleteFile(way))
{
error = GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
for (i=0; i<fcount; i++)
{
//need redraw window during this process
//like this:
//if CheckEvent()==Redraw DrawWindow();
//i'm too tired to code now...
filename = i*304+dirbuf+72;
strcpy(#del_from, way);
chrcat(#del_from, '/');
688,13 → 690,15
 
void Del_File(byte dodel)
{
int del_rezult;
if (dodel==true)
{
List_ReDraw();
if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0);
Del_File2(#file_path);
}
del_active=0;
DeleteButton(301); DeleteButton(302);
DeleteButton(301);
DeleteButton(302);
Open_Dir(#path,WITH_REDRAW);
}
 
717,7 → 721,7
if (del_rezult!=0)
{
Write_Error(del_rezult);
ShowMessage(T_DEL_ERROR_1);
ShowMessage(T_DEL_ERROR_1, 150);
return;
}
ELSE CreateDir(#temp);
828,7 → 832,7
else
{
Write_Error(EAX);
ShowMessage(NOT_CREATE_FOLDER);
ShowMessage(NOT_CREATE_FOLDER, 150);
}
break;
case 7:
842,7 → 846,7
else
{
Write_Error(EAX);
ShowMessage(NOT_CREATE_FILE);
ShowMessage(NOT_CREATE_FILE, 150);
}
break;
case 10: //F10
/programs/cmm/eolite/include/file_menu.h
1,60 → 1,59
//Leency 2008-2013
 
//pay attension: >200 this is only file actions, not supported by folders
#ifdef LANG_RUS
char *captions[] = {
"Žâªàëâì", "Enter",
"Žâªàëâì á ¯®¬®éìî...", "CrlEnt",
"Žâªàëâì ª ª ⥪áâ", "F3",
"Žâªàëâì ª ª HEX", "F4",
//
"Š®¯¨à®¢ âì", "Crl+C",
"‚ë१ âì", "Crl+X",
"‚áâ ¢¨âì", "Crl+V",
"¥à¥¨¬¥­®¢ âì", "F2",
"“¤ «¨âì", "Del",
"Ž¡­®¢¨âì", "F5",
0, 0};
char *file_captions[] = {
"Žâªàëâì", "Enter",100,
"Žâªàëâì á ¯®¬®éìî...", "CrlEnt",201,
"Žâªàëâì ª ª ⥪áâ", "F3",202,
"Žâªàëâì ª ª HEX", "F4",203,
"Š®¯¨à®¢ âì", "Crl+C",104,
"‚ë१ âì", "Crl+X",105,
"‚áâ ¢¨âì", "Crl+V",106,
"¥à¥¨¬¥­®¢ âì", "F2",107,
"“¤ «¨âì", "Del",108,
"Ž¡­®¢¨âì", "F5",109,
0, 0, 0};
#elif LANG_EST
char *captions[] = {
"Ava", "Enter",
"Ava ...", "CrlEnt",
"Vaata tekstina", "F3",
"Vaata HEX", "F4",
//
"Kopeeri", "Crl+C",
"Lõika", "Crl+X",
"Aseta", "Crl+V",
"Nimeta ümber", "F2",
"Kustuta", "Del",
"Värskenda", "F5",
0, 0};
char *file_captions[] = {
"Ava", "Enter",100,
"Ava ...", "CrlEnt",201,
"Vaata tekstina", "F3",202,
"Vaata HEX", "F4",203,
"Kopeeri", "Crl+C",104,
"Lõika", "Crl+X",105,
"Aseta", "Crl+V",106,
"Nimeta ümber", "F2",107,
"Kustuta", "Del",108,
"Värskenda", "F5",109,
0, 0, 0};
#else
char *captions[] = {
"Open", "Enter",
"Open with...", "CrlEnt",
"View as text", "F3",
"View as HEX", "F4",
//
"Copy", "Crl+C",
"Cut", "Crl+X",
"Paste", "Crl+V",
"Rename", "F2",
"Delete", "Del",
"Refresh", "F5",
0, 0};
char *file_captions[] = {
"Open", "Enter",100,
"Open with...", "CrlEnt",201,
"View as text", "F3",202,
"View as HEX", "F4",203,
"Copy", "Crl+C",104,
"Cut", "Crl+X",105,
"Paste", "Crl+V",106,
"Rename", "F2",107,
"Delete", "Del",108,
"Refresh", "F5",109,
0, 0, 0};
#endif
 
proc_info MenuForm;
 
void FileMenu()
{
mouse mm;
word id, key, slot, index;
int ccount=0, cur, newi, linew=10, lineh=18, texty;
for (index=0; captions[index]!=0; index+=2)
word id, key, slot, index, start_y;
proc_info MenuForm;
int ccount=0, cur=0, newi, linew=10, lineh=18, texty;
for (index=0; file_captions[index]!=0; index+=3)
{
if (itdir) && (file_captions[index+2]>=200) continue;
if (strlen(file_captions[index])>linew) linew = strlen(file_captions[index]);
ccount++;
if (strlen(captions[index])>linew) linew = strlen(captions[index]);
}
linew = linew + 3 * 6 + 50;
texty = lineh/2-4;
79,9 → 78,9
case evButton:
id=GetButtonID();
if (id==100) Open();
if (id==101) notify("Not compleated yet");
if (id==102) FnProcess(3); //F3
if (id==103) FnProcess(4); //F4
if (id==201) notify("Not compleated yet");
if (id==202) FnProcess(3); //F3
if (id==203) FnProcess(4); //F4
if (id==104) Copy(#file_path, NOCUT);
if (id==105) Copy(#file_path, CUT);
if (id==106) CreateThread(#Paste,#copy_stak);
103,21 → 102,23
DrawPopupShadow(1,1,linew,ccount*lineh,0);
 
_ITEMS_DRAW:
for (index=0; captions[index*2]!=0; index++)
for (index=0, start_y=0; file_captions[index*3]!=0; index++)
{
DefineButton(1,index*lineh+1,linew,lineh-1,index+100+BT_HIDE+BT_NOFRAME,0xFFFFFF);
DrawBar(1,index*lineh+2,1,lineh,0xFFFfff);
if (index==cur)
DefineButton(1,start_y+1,linew,lineh-1,file_captions[index*3+2]+BT_HIDE+BT_NOFRAME,0xFFFFFF);
if ((itdir) && (file_captions[index*3+2]>=200)) continue;
DrawBar(1,start_y+2,1,lineh,0xFFFfff);
if (start_y/lineh==cur)
{
DrawBar(2,index*lineh+2,linew-1,lineh,0xFFFfff);
DrawBar(2,start_y+2,linew-1,lineh,0xFFFfff);
}
else
{
DrawBar(2,index*lineh+2,linew-1,lineh,col_work);
WriteText(8,index*lineh+texty+3,0x80,0xf2f2f2,captions[index*2]);
DrawBar(2,start_y+2,linew-1,lineh,col_work);
WriteText(8,start_y+texty+3,0x80,0xf2f2f2,file_captions[index*3]);
}
WriteText(7,index*lineh+texty+2,0x80,0x000000,captions[index*2]);
WriteText(-strlen(captions[index*2+1])*6-6+linew,index*lineh+texty+2,0x80,0x888888,captions[index*2+1]);
WriteText(7,start_y+texty+2,0x80,0x000000,file_captions[index*3]);
WriteText(-strlen(file_captions[index*3+1])*6-6+linew,start_y+texty+2,0x80,0x888888,file_captions[index*3+1]);
start_y+=lineh;
}
}
}
/programs/cmm/eolite/include/some_code.h
5,11 → 5,14
dword onTop(dword down,up) {EAX=Form.height-GetSkinHeight()-down-up;}
 
 
void ShowMessage(dword message)
void ShowMessage(dword message, pause_duration)
{
DrawFlatButton(Form.width/2-13,160,220,80,0,0xFFB6B5, message);
pause(150);
List_ReDraw();
int form_x=Form.width/2-13;
int form_y=160;
DrawPopup(form_x,form_y,220,80,1,col_work,col_border);
WriteText(-strlen(message)*3+110+form_x,80/2-4+form_y,0x80,0,message);
pause(pause_duration);
if (pause_duration) List_ReDraw();
}
 
inline fastcall signed int _strrchr( ESI,BL)