forked from KolibriOS/kolibrios
Eolite 2.63: optimize GUI; small change;
git-svn-id: svn://kolibrios.org@5512 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a54d49b216
commit
3d6423b368
@ -43,6 +43,8 @@
|
|||||||
?define T_PASTE_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:"
|
?define T_PASTE_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:"
|
||||||
?define T_CANCEL_PASTE "Š®¯¨à®¢ ¨¥ ¯à¥ªà 饮. <20> ¯ª ᪮¯¨à®¢ ¥ ¯®«®áâìî."
|
?define T_CANCEL_PASTE "Š®¯¨à®¢ ¨¥ ¯à¥ªà 饮. <20> ¯ª ᪮¯¨à®¢ ¥ ¯®«®áâìî."
|
||||||
?define T_SELECT_APP_TO_OPEN_WITH "‚ë¡¥à¨â¥ ¯à®£à ¬¬ã ¤«ï ®âªàëâ¨ï ä ©« "
|
?define T_SELECT_APP_TO_OPEN_WITH "‚ë¡¥à¨â¥ ¯à®£à ¬¬ã ¤«ï ®âªàëâ¨ï ä ©« "
|
||||||
|
?define DEL_MORE_FILES_1 "íâ¨ í«¥¬¥âë ("
|
||||||
|
?define DEL_MORE_FILES_2 " èâ.)?"
|
||||||
#elif LANG_EST
|
#elif LANG_EST
|
||||||
?define T_FILE "Fail"
|
?define T_FILE "Fail"
|
||||||
?define T_TYPE "Tüüp"
|
?define T_TYPE "Tüüp"
|
||||||
@ -61,6 +63,8 @@
|
|||||||
?define T_PASTE_WINDOW_TEXT "Kopeerin faili:"
|
?define T_PASTE_WINDOW_TEXT "Kopeerin faili:"
|
||||||
?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
|
?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
|
||||||
?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file"
|
?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file"
|
||||||
|
?define DEL_MORE_FILES_1 "íâ¨ í«¥¬¥âë ("
|
||||||
|
?define DEL_MORE_FILES_2 " èâ.)?"
|
||||||
#else
|
#else
|
||||||
?define T_FILE "File"
|
?define T_FILE "File"
|
||||||
?define T_TYPE "Type"
|
?define T_TYPE "Type"
|
||||||
@ -79,12 +83,14 @@
|
|||||||
?define T_PASTE_WINDOW_TEXT "Copying file:"
|
?define T_PASTE_WINDOW_TEXT "Copying file:"
|
||||||
?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
|
?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
|
||||||
?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file"
|
?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file"
|
||||||
|
?define DEL_MORE_FILES_1 "íâ¨ í«¥¬¥âë ("
|
||||||
|
?define DEL_MORE_FILES_2 " èâ.)?"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
|
||||||
|
|
||||||
#define TITLE "Eolite File Manager v2.62"
|
#define TITLE "Eolite File Manager v2.63"
|
||||||
#define ABOUT_TITLE "Eolite v2.62"
|
#define ABOUT_TITLE "Eolite v2.63"
|
||||||
dword col_padding, col_selec, col_lpanel;
|
dword col_padding, col_selec, col_lpanel;
|
||||||
|
|
||||||
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
int toolbar_buttons_x[7]={9,46,85,134,167,203};
|
||||||
@ -380,6 +386,24 @@ void main()
|
|||||||
case 022: //Ctrl+V
|
case 022: //Ctrl+V
|
||||||
CreateThread(#Paste,#copy_stak+4092);
|
CreateThread(#Paste,#copy_stak+4092);
|
||||||
break;
|
break;
|
||||||
|
case 001: //Ctrl+A
|
||||||
|
debugln("press Ctrl+A");
|
||||||
|
for (i=0; i<files.count; i++)
|
||||||
|
{
|
||||||
|
selected_offset = file_mas[i]*304 + buf+32 + 7;
|
||||||
|
ESBYTE[selected_offset] = 1;
|
||||||
|
}
|
||||||
|
List_ReDraw();
|
||||||
|
break;
|
||||||
|
case 021: //Ctrl+U
|
||||||
|
debugln("press Ctrl+A");
|
||||||
|
for (i=0; i<files.count; i++)
|
||||||
|
{
|
||||||
|
selected_offset = file_mas[i]*304 + buf+32 + 7;
|
||||||
|
ESBYTE[selected_offset] = 0;
|
||||||
|
}
|
||||||
|
List_ReDraw();
|
||||||
|
break;
|
||||||
case ASCII_KEY_ESC:
|
case ASCII_KEY_ESC:
|
||||||
IF (rename_active==1) ReName(false);
|
IF (rename_active==1) ReName(false);
|
||||||
break;
|
break;
|
||||||
@ -728,6 +752,9 @@ inline Sorting()
|
|||||||
|
|
||||||
void Del_Form()
|
void Del_Form()
|
||||||
{
|
{
|
||||||
|
dword selected_offset2;
|
||||||
|
int cont = 0;
|
||||||
|
byte f_count[128];
|
||||||
int dform_x=files.w-220/2+files.x;
|
int dform_x=files.w-220/2+files.x;
|
||||||
if (strcmp(#file_name,".")==0) || (strcmp(#file_name,"..")==0) return;
|
if (strcmp(#file_name,".")==0) || (strcmp(#file_name,"..")==0) return;
|
||||||
if (del_active==2)
|
if (del_active==2)
|
||||||
@ -739,6 +766,20 @@ void Del_Form()
|
|||||||
if (!files.count) return;
|
if (!files.count) return;
|
||||||
DrawPopup(dform_x,160,220,80,1,sc.work,sc.work_graph);
|
DrawPopup(dform_x,160,220,80,1,sc.work,sc.work_graph);
|
||||||
WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,sc.work_text,T_DELETE_FILE);
|
WriteText(-strlen(T_DELETE_FILE)*3+110+dform_x,175,0x80,sc.work_text,T_DELETE_FILE);
|
||||||
|
for (i=0; i<files.count; i++)
|
||||||
|
{
|
||||||
|
selected_offset2 = file_mas[i]*304 + buf+32 + 7;
|
||||||
|
if (ESBYTE[selected_offset2]) cont++;
|
||||||
|
}
|
||||||
|
if (cont)
|
||||||
|
{
|
||||||
|
strcpy(#f_count, DEL_MORE_FILES_1);
|
||||||
|
strcat(#f_count, itoa(cont));
|
||||||
|
strcat(#f_count, DEL_MORE_FILES_2);
|
||||||
|
WriteText(-strlen(#f_count)*3+110+dform_x,190,0x80,sc.work_text,#f_count);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
IF (strlen(#file_name)<28)
|
IF (strlen(#file_name)<28)
|
||||||
{
|
{
|
||||||
WriteText(strlen(#file_name)*3+110+dform_x+2,190,0x80,sc.work_text,"?");
|
WriteText(strlen(#file_name)*3+110+dform_x+2,190,0x80,sc.work_text,"?");
|
||||||
@ -750,6 +791,7 @@ void Del_Form()
|
|||||||
ESI = 24;
|
ESI = 24;
|
||||||
WriteText(dform_x+20,190,0,0,#file_name);
|
WriteText(dform_x+20,190,0,0,#file_name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
DrawFlatButton(dform_x+27,208,70,20,301,0xFFB6B5,T_YES);
|
DrawFlatButton(dform_x+27,208,70,20,301,0xFFB6B5,T_YES);
|
||||||
DrawFlatButton(dform_x+120,208,70,20,302,0xC6DFC6,T_NO);
|
DrawFlatButton(dform_x+120,208,70,20,302,0xC6DFC6,T_NO);
|
||||||
del_active=1;
|
del_active=1;
|
||||||
|
@ -61,17 +61,10 @@ void Copy(dword pcth, char cut)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void copyf_Draw_Progress(dword filename) {
|
void copyf_Draw_Progress(dword filename) {
|
||||||
#define WIN_W 300
|
DrawRectangle(0,0,WIN_COPY_W-5, 15,sc.work);
|
||||||
#define WIN_H 50
|
|
||||||
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_W,GetSkinHeight()+WIN_H-1,0x34,sc.work,T_PASTE_WINDOW);
|
|
||||||
WriteText(5,8, 0x80, sc.work_text, T_PASTE_WINDOW_TEXT);
|
WriteText(5,8, 0x80, sc.work_text, T_PASTE_WINDOW_TEXT);
|
||||||
DrawBar(5, 26, WIN_W-10, 10, sc.work);
|
DrawBar(5, 26, WIN_COPY_W-10, 10, sc.work);
|
||||||
WriteText(5,26, 0x80, sc.work_text, filename);
|
WriteText(5,26, 0x80, sc.work_text, filename);
|
||||||
if (CheckEvent()==evButton)
|
|
||||||
{
|
|
||||||
notify(T_CANCEL_PASTE);
|
|
||||||
CopyExit();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Paste()
|
void Paste()
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
//copyf - copy file or folder with content
|
//copyf - copy file or folder with content
|
||||||
|
#define WIN_COPY_W 300
|
||||||
|
#define WIN_COPY_H 50
|
||||||
:int copyf(dword from1, in1)
|
:int copyf(dword from1, in1)
|
||||||
{
|
{
|
||||||
dword error;
|
dword error;
|
||||||
BDVK CopyFile_atr1;
|
BDVK CopyFile_atr1;
|
||||||
|
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_COPY_W,GetSkinHeight()+WIN_COPY_H-1,0x34,sc.work,T_PASTE_WINDOW);
|
||||||
if (!from1) || (!in1)
|
if (!from1) || (!in1)
|
||||||
{
|
{
|
||||||
notify("Error: too less copyf params!");
|
notify("Error: too less copyf params!");
|
||||||
@ -22,6 +25,11 @@
|
|||||||
copyf_Draw_Progress(from1+strchr(from1, '/'));
|
copyf_Draw_Progress(from1+strchr(from1, '/'));
|
||||||
return CopyFile(from1, in1);
|
return CopyFile(from1, in1);
|
||||||
}
|
}
|
||||||
|
if (CheckEvent()==evButton)
|
||||||
|
{
|
||||||
|
notify(T_CANCEL_PASTE);
|
||||||
|
CopyExit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:int CopyFile(dword copy_from3, copy_in3)
|
:int CopyFile(dword copy_from3, copy_in3)
|
||||||
|
Loading…
Reference in New Issue
Block a user