Eolite 1.98.3: cancel copy, show delete errors, translate errors to ru, fixes

git-svn-id: svn://kolibrios.org@4022 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2013-10-13 22:18:41 +00:00
parent 8fe83f0f69
commit 44a79ff624
3 changed files with 44 additions and 24 deletions

View File

@ -1,6 +1,10 @@
//Leency & Veliant 2008-2013 //Leency & Veliant 2008-2013
//GNU GPL licence. //GNU GPL licence.
#ifndef AUTOBUILD
#include "lang.h--"
#endif
//libraries //libraries
#define MEMSIZE 0xA0000 #define MEMSIZE 0xA0000
#include "..\lib\kolibri.h" #include "..\lib\kolibri.h"
@ -17,10 +21,6 @@
#include "imgs\toolbar.txt" #include "imgs\toolbar.txt"
#include "imgs\left_p.txt" #include "imgs\left_p.txt"
#ifndef AUTOBUILD
#include "lang.h--"
#endif
#ifdef LANG_RUS #ifdef LANG_RUS
?define T_FILE "” ©«" ?define T_FILE "” ©«"
?define T_TYPE "’¨¯" ?define T_TYPE "’¨¯"
@ -37,6 +37,7 @@
?define ERROR_1 "Žè¨¡ª  ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj" ?define ERROR_1 "Žè¨¡ª  ¯à¨ § £à㧪¥ ¡¨¡«¨®â¥ª¨ /rd/1/lib/box_lib.obj"
?define T_PASTE_WINDOW "Š®¯¨àãî..." ?define T_PASTE_WINDOW "Š®¯¨àãî..."
?define T_PASTE_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:" ?define T_PASTE_WINDOW_TEXT "Š®¯¨àã¥âáï ä ©«:"
?define T_CANCEL_PASTE "Š®¯¨à®¢ ­¨¥ ¯à¥ªà é¥­®. <20> ¯ª  ᪮¯¨à®¢ ­  ­¥ ¯®«­®áâìî."
#elif LANG_EST #elif LANG_EST
?define T_FILE "Fail" ?define T_FILE "Fail"
?define T_TYPE "Tüüp" ?define T_TYPE "Tüüp"
@ -53,6 +54,7 @@
?define ERROR_1 "Viga teegi laadimisel /rd/1/lib/box_lib.obj" ?define ERROR_1 "Viga teegi laadimisel /rd/1/lib/box_lib.obj"
?define T_PASTE_WINDOW "Kopeerin..." ?define T_PASTE_WINDOW "Kopeerin..."
?define T_PASTE_WINDOW_TEXT "Kopeerin faili:" ?define T_PASTE_WINDOW_TEXT "Kopeerin faili:"
?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
#else #else
?define T_FILE "File" ?define T_FILE "File"
?define T_TYPE "Type" ?define T_TYPE "Type"
@ -69,12 +71,13 @@
?define ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj" ?define ERROR_1 "Error while loading library /rd/1/lib/box_lib.obj"
?define T_PASTE_WINDOW "Copying..." ?define T_PASTE_WINDOW "Copying..."
?define T_PASTE_WINDOW_TEXT "Copying file:" ?define T_PASTE_WINDOW_TEXT "Copying file:"
?define T_CANCEL_PASTE "Copy process terminated. Folder copied incompletely."
#endif #endif
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
#define TITLE "Eolite File Manager v1.98" #define TITLE "Eolite File Manager v1.98.3"
#define ABOUT_TITLE "Eolite v1.98" #define ABOUT_TITLE "Eolite v1.98.3"
dword col_work = 0xE4DFE1; dword col_work = 0xE4DFE1;
dword col_border = 0x9098B0; //A0A0B8; //0x819FC5; dword col_border = 0x9098B0; //A0A0B8; //0x819FC5;
dword col_padding = 0xC8C9C9; dword col_padding = 0xC8C9C9;
@ -101,7 +104,7 @@ byte
proc_info Form; proc_info Form;
mouse m; mouse m;
int mouse_dd, scroll_used, scroll_size; int mouse_dd, scroll_used, scroll_size, sorting_arrow_x;
dword buf, off; dword buf, off;
dword file_mas[6898]; dword file_mas[6898];
int j, i; int j, i;
@ -280,9 +283,9 @@ void main()
CreateThread(#Paste,#copy_stak); CreateThread(#Paste,#copy_stak);
break; break;
case 31...33: //sort case 31...33: //sort
IF(sort_num==1) DrawFilledBar(onLeft(192,168)/2+210,42,6,10); IF(sort_num==1) DrawFilledBar(sorting_arrow_x,42,6,10);
IF(sort_num==2) DrawFilledBar(onLeft(115,0),42,6,10); IF(sort_num==2) DrawFilledBar(sorting_arrow_x,42,6,10);
IF(sort_num==3) DrawFilledBar(onLeft(44,0),42,6,10); IF(sort_num==3) DrawFilledBar(sorting_arrow_x,42,6,10);
sort_num=id-30; sort_num=id-30;
Open_Dir(#path,WITH_REDRAW); Open_Dir(#path,WITH_REDRAW);
break; break;
@ -595,9 +598,10 @@ void Open_Dir(dword dir_path, redraw){
HistoryPath(ADD_NEW_PATH); HistoryPath(ADD_NEW_PATH);
files.visible = files.h / files.line_h; files.visible = files.h / files.line_h;
IF (files.count < files.visible) files.visible = files.count; IF (files.count < files.visible) files.visible = files.count;
IF (sort_num==1) WriteText(Form.width+60/2,45,0x80,col_border,"\x19"); IF (sort_num==1) sorting_arrow_x = Form.width+60/2;
IF (sort_num==2) WriteText(Form.width-115,45,0x80,col_border,"\x19"); IF (sort_num==2) sorting_arrow_x = Form.width-115;
IF (sort_num==3) WriteText(Form.width-44,45,0x80,col_border,"\x19"); IF (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w;
WriteText(sorting_arrow_x,45,0x80,col_border,"\x19");
IF (redraw!=ONLY_SHOW) Sorting(); IF (redraw!=ONLY_SHOW) Sorting();
IF (redraw!=ONLY_OPEN) List_ReDraw(); IF (redraw!=ONLY_OPEN) List_ReDraw();
} }
@ -642,6 +646,7 @@ inline Sorting()
void Del_Form() void Del_Form()
{ {
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 (del_active==2) if (del_active==2)
{ {
if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0); if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0);
@ -668,14 +673,15 @@ void Del_Form()
} }
} }
int del_error;
void Del_File2(dword way) int Del_File2(dword way)
{ {
dword dirbuf, fcount, i, filename; dword dirbuf, fcount, i, filename;
char del_from[4096], error; int error;
if (DeleteFile(way)) char del_from[4096];
if (isdir(way))
{ {
error = GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); if (error = GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL)) del_error = error;
for (i=0; i<fcount; i++) for (i=0; i<fcount; i++)
{ {
if (CheckEvent()==evReDraw) draw_window(); if (CheckEvent()==evReDraw) draw_window();
@ -686,10 +692,12 @@ void Del_File2(dword way)
if ( TestBit(ESDWORD[filename-40], 4) ) if ( TestBit(ESDWORD[filename-40], 4) )
Del_File2(#del_from); Del_File2(#del_from);
else else
DeleteFile(#del_from); {
if (error = DeleteFile(#del_from)) del_error = error;
} }
DeleteFile(way);
} }
}
if (error = DeleteFile(way)) del_error = error;
} }
@ -698,9 +706,10 @@ void Del_File(byte dodel)
if (dodel==true) if (dodel==true)
{ {
del_active=2; del_active=2;
List_ReDraw();
if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0); if (itdir) ShowMessage(WAIT_DELETING_FOLDER, 0);
del_error = 0;
Del_File2(#file_path); Del_File2(#file_path);
if (del_error) Write_Error(del_error);
} }
del_active=0; del_active=0;
DeleteButton(301); DeleteButton(301);

View File

@ -13,12 +13,16 @@ void Copy(dword pcth, char cut)
cut_active = cut; cut_active = cut;
} }
void copyf_Action(dword filename) { void copyf_Draw_Progress(dword filename) {
DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_W,GetSkinHeight()+WIN_H-1,0x34,col_work,T_PASTE_WINDOW); DefineAndDrawWindow(Form.left+Form.width-200,Form.top+90,WIN_W,GetSkinHeight()+WIN_H-1,0x34,col_work,T_PASTE_WINDOW);
WriteText(5,8, 0x80, 0, T_PASTE_WINDOW_TEXT); WriteText(5,8, 0x80, 0, T_PASTE_WINDOW_TEXT);
DrawBar(5, 26, WIN_W-10, 10, col_work); DrawBar(5, 26, WIN_W-10, 10, col_work);
WriteText(5,26, 0x80, 0, filename); WriteText(5,26, 0x80, 0, filename);
//pause(20); if (CheckEvent()==evButton)
{
notify(T_CANCEL_PASTE);
ExitProcess();
}
} }

View File

@ -1,3 +1,10 @@
14.10.13 -- 1.98.3
- исправление зависания программы во время вставки некоторовых вырезанных папок
- возможность закрыть диалог копирования
- отображение ошибок удаления
- перевод ошибок ФС на русский язык
- исправление положения стрелки для столбика сортировки по размеру
10.10.13 -- 1.98 10.10.13 -- 1.98
- удаление папок (punk_joker) - удаление папок (punk_joker)
- редизайн сообщений - редизайн сообщений