Eolite 1.89: bugfix in Paste(), much more movable files list

git-svn-id: svn://kolibrios.org@3447 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2013-04-05 00:26:21 +00:00
parent a598984f07
commit 1f0b08d588
6 changed files with 23 additions and 23 deletions

View File

@ -22,8 +22,8 @@
enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir
#define TITLE "Eolite File Manager v1.88"
#define ABOUT_TITLE "Eolite v1.88"
#define TITLE "Eolite File Manager v1.89"
#define ABOUT_TITLE "Eolite v1.89"
dword col_work = 0xE4DFE1;
dword col_border = 0x9098B0; //A0A0B8; //0x819FC5;
dword col_padding = 0xC8C9C9;
@ -307,8 +307,8 @@ void main()
List_ReDraw();
break;
case 181: //end
files.first=files.count-files.visible;
files.current=files.visible-1;
files.first = files.count - files.visible;
files.current = files.visible - 1;
List_ReDraw();
break;
case 183: //Page Down
@ -453,25 +453,25 @@ void List_ReDraw()
//in the bottom
paint_y = j * files.line_h + files.y;
DrawBar(files.x,paint_y,files.w,onTop(paint_y,6),0xFFFFFF);
DrawBar(onLeft(168,0),paint_y,1,onTop(paint_y,6),col_work);
DrawBar(onLeft(95,0),paint_y,1,onTop(paint_y,6),col_work);
DrawBar(Form.cwidth-159,paint_y,1,onTop(paint_y,6),col_work);
DrawBar(Form.cwidth-86,paint_y,1,onTop(paint_y,6),col_work);
Scroll();
}
void Line_ReDraw(dword color, filenum){
dword text_col=0, name_len=0, y=filenum*files.line_h+57;
DrawBar(192,y,3,files.line_h,color);
DrawBar(192+19,y,onLeft(46,192),files.line_h,color); DrawBar(195,y+17,16,1,color);
if (files.line_h>18) DrawBar(195,y+18,16,files.line_h-18,color);
if (files.line_h>15) DrawBar(195,y,16,files.line_h-15,color);
DrawBar(files.x,y,3,files.line_h,color);
DrawBar(files.x+19,y,files.w-19,files.line_h,color);
DrawBar(files.x+3,y+17,16,1,color);
if (files.line_h>18) DrawBar(files.x+3,y+18,16,files.line_h-18,color);
if (files.line_h>15) DrawBar(files.x+3,y,16,files.line_h-15,color);
off=file_mas[filenum+files.first]*304 + buf+72;
if (!TestBit(ESDWORD[off-40], 4)) //file or folder?
{
strcpy(#temp, off);
Put_icon(#temp+_strrchr(#temp,'.'), files.line_h/2-7+y, color);
Put_icon(off+_strrchr(off,'.'), files.line_h/2-7+y, color);
WriteText(7-strlen(ConvertMemSize(ESDWORD[off-8]))*6+onLeft(75,0),files.line_h-6/2+y,0x80,0,ConvertMemSize(ESDWORD[off-8])); //size
}
else
@ -490,6 +490,7 @@ void Line_ReDraw(dword color, filenum){
}
if (Form.width>=480)
{
FileShow.start_x = files.x + 23;
FileShow.font_color = text_col;
FileShow.area_size_x = Form.width - 380;
FileShow.text_pointer = off;
@ -497,8 +498,8 @@ void Line_ReDraw(dword color, filenum){
PathShow_prepare stdcall(#FileShow);
PathShow_draw stdcall(#FileShow);
}
DrawBar(onLeft(168,0),y,1,files.line_h,col_work); //gray line 1
DrawBar(onLeft(95,0),y,1,files.line_h,col_work); //gray line 2
DrawBar(Form.cwidth-159,y,1,files.line_h,col_work); //gray line 1
DrawBar(Form.cwidth-86,y,1,files.line_h,col_work); //gray line 2
}
@ -708,12 +709,13 @@ void FnProcess(char N)
break;
case 2:
if (!files.count) break;
edit2.flags=100000000000010b; //set active
edit2.width=onLeft(24,217);
edit2.flags = 100000000000010b; //set active
edit2.left = files.x + 21;
edit2.width = files.w - 26;
edit2.top=files.current*files.line_h+59;
edit2.size=edit2.pos=strlen(#file_name);
edit_box_draw stdcall (#edit2);
DrawBar(213,files.current*files.line_h+58,edit2.width+1,1,0xFFFFCC); //bg
DrawBar(edit2.left,files.current*files.line_h+58,edit2.width+1,1,0xFFFFCC); //bg
rename_active=1;
break;
case 3:

Binary file not shown.

View File

@ -2,6 +2,6 @@
//Èêîíêè ïàïîê è ôàéëîâ//
/////////////////////////
dword ficons_pal[] = {0x00FFFFFF,0x00606078,0x00D0D0D8,0x008888A8,0x00F8F8F8,0x009098B0,0x00E0E0E0,0x00A0A0B8,0x00F0F0F8,0x00A8A8C0,0x007880A0,0x00E8E8F0,0x00C8C8D0,0x00C8C8C8,0x00F0F8FF,0x00E0E0E8,0x00D8D8E0,0x00F8F8FF,0x00C8C8D8,0x00FFB898,0x008080A0,0x00C0C0C8,0x00FFA078,0x00586080,0x005878A8,0x006880A0,0x00D0D8E0,0x0080A0C0,0x00586078,0x00E0E8F0,0x008898B8,0x00B8C0D8,0x00D8E8F0,0x00D8F0FF,0x007088A8,0x00A8B0C0,0x007890B0,0x00C8E8F8,0x00F8F8F0,0x00E0E8E8,0x00D0D8D8,0x00C0C8E0,0x0080A0E0,0x007098C8,0x006090C8,0x005888C0,0x00A8B0C8,0x00A87868,0x00604840,0x00786038,0x00705028,0x00685048,0x00FFF8B8,0x00B89848,0x00F8E070,0x00C0A850,0x00F8D858,0x00A09880,0x00F8C050,0x00F0B848,0x00E0A850,0x00986860,0x00583830,0x00707898,0x0068C0D8,0x00B0E0F8,0x0070B8E0,0x00F8FFFF,0x00A0C8F0,0x00000000,0x00F84050,0x0048D040,0x000078B8,0x00F8C048,0x00A06858,0x00FFE898,0x00989070,0x00F8B840,0x00FFF8F0,0x00C0B8A8,0x00D8B040,0x00788088,0x00E8F0F0,0x00C08830,0x00584840,0x00A85800,0x00FFE8A8,0x00A86818,0x00F0F0D8,0x00F8C830,0x00F0B828,0x00381010,0x00D8A028,0x00B0C8E0,0x0078A0D0,0x0098B8E8,0x0088A8D0,0x0098B8E0,0x003070B8,0x00A0C8E8,0x005090C8,0x004888C0,0x003078C0,0x00B8D0E8,0x002068A8,0x0088B0E0,0x0080B0D8,0x0090B8E0,0x002068B0,0x00B8D0F0,0x002060A8,0x0070A0C8,0x002868B0,0x002870B0,0x002868A8,0x00687088,0x00E89090,0x00D09898,0x00909088,0x00C88080,0x00B87820,0x00B86818,0x00E8C068,0x00885810,0x00D09850,0x00B07028,0x00F0D8B0,0x00A87028,0x00B05800,0x00885028,0x00C89048,0x00C89038,0x00985000,0x00E8D8B0,0x00C89810,0x00FFF8D8,0x00FFFFC8,0x00F8E8A8,0x00F8E098,0x00FFE8C0,0x00F8D888,0x00F8D880,0x00F0D078,0x00D8A020,0x0088E068,0x00209018,0x00A87800,0x00188000,0x00A0D868,0x00309018,0x00C8F8A0,0x00289018,0x00608818,0x0050A830,0x0030A028,0x00A8F068,0x00808000,0x0088C840,0x0070C848,0x00D8C070,0x0080C840,0x00C0B850,0x00F8E0A0,0x00F8E090,0x00D8E0F8,0x0098D0D0,0x0038A878,0x0058A890,0x00309068,0x00308880,0x00105870,0x002890B8,0x00186880,0x00105058,0x0048A8C8,0x001098D8,0x0078B8E0,0x002098C8,0x002898C8,0x0058C8FF,0x002088B8,0x0030A0D8,0x00C84048,0x002078B0,0x0030A8D8,0x00808080,0x00407888,0x0040A060,0x0080B820,0x00A02828,0x00F86068,0x00E02040,0x00E01828,0x00A8A8A8,0x00B8B8C0,0x00787878,0x00407828,0x00406040,0x007898C8,0x00E85878,0x00E04870,0x000098E0,0x0008A8F8,0x00D85868,0x00E86080,0x00E88098,0x00E888A0,0x00888888,0x00E8E8E8,0x00A0A0A0,0x00F0E0B8,0x00FFD850,0x00B8B8C8,0x00606080,0x00FFC818,0x00505870,0x00D8D0D8,0x0098C8F0,0x00606880,0x00405068,0x00303840,0x00FF0000,0x00F8C8C8};
dword ficons_pal[] = {0xFCFEFC,0x5C627C,0xCCCCD0,0x848AA4,0xFCF2F5,0xF4F4FA,0x9498AF,0xE4DEEC,0x9CA4B6,0xE4E2E4,0xF4EDFB,0xACABAC,0x74799A,0xECEDEE,0xC4C2C9,0xE4E5EC,0xECF2F3,0xDBDCE4,0xD4CEDC,0x00D4D3DA,0xC6CBE2,0x5C6684,0x5C568C,0xFCB694,0xC4C6D4,0x7C829C,0xBCBECC,0xFC9D73,0xBBBCC3,0xC4BEC7,0xD7E2EF,0x515870,0x5C7AA4,0x647EA4,0xA4A3AC,0x8CA2BC,0xE4EBF0,0xCCD5D9,0x7896B8,0xBCC2D4,0xDCF0FC,0xD4EAFC,0x6C86A7,0xC4CBD1,0x9CADC4,0x748EAC,0xB5E2FC,0xC4DEFC,0x00B9CDE4,0x7CAADA,0xABAEBC,0xCCDBE4,0x578FC4,0x5484B8,0x6482A4,0xABB2C4,0x5C89BC,0xA47868,0x644A44,0x7C603C,0x6C4F26,0xFCFD9F,0xBA9D40,0xFCE274,0xFCDE60,0xC4A650,0x644E44,0xF4D27C,0xA29880,0xFCDA84,0xFCC354,0xECB847,0xFCC24C,0x9C8E74,0xE4AA54,0xDCA24C,0x9B6A55,0x543A34,0x6EBEE0,0x64BEDC,0xB4DEF4,0x7CBAE4,0xECFEFC,0xA4CAF4,0x99C5F1,0xA4C6EA,0x040204,0x94BAE4,0x64718B,0xB4B2B4,0xF43E4C,0x44CE3C,0x4CDA44,0x047CBC,0xFCBB3C,0x1C62AC,0x00FBD65C,0xC4B6A4,0xD59A52,0x7B7C7E,0x7B828A,0xC48A34,0x54463C,0xAB5A04,0xFCDE98,0xAC6A14,0xF4EED4,0xFCE8A1,0xFCCA34,0xECB624,0x34120C,0xD2A226,0xAEC5DA,0x7C9DCC,0x5C7A9C,0x84AAD4,0x2C72BD,0x518AC2,0x447EBC,0x3C7AB4,0x247AB4,0x2669B1,0x8BB5E0,0xBCD2EC,0x6C9CC9,0x008496BC,0xEC8D99,0xD49694,0x8C8C8C,0x949392,0xCC8387,0xFCFBD3,0xE4FED4,0xBC7A24,0xA47A04,0xE7C267,0x8C5A14,0xDCBA54,0xBC6A1C,0xCC923F,0xB0722C,0xF0DAB4,0x8C522C,0x9C5204,0x945204,0xC49204,0xCC9A14,0xFCF6BC,0xFCEAC4,0xF8E4B4,0xF4D67C,0xECD274,0x7CBE7C,0x1C8E1C,0x00A98D04,0x1C8204,0x90D280,0x2C9018,0xBCFAAC,0x3CC234,0x488404,0x54AE4C,0xC8F7A4,0x84F26C,0x5CE64C,0x24AE1C,0xB4D6A4,0x49A939,0xA8F694,0x44E63C,0x149E0C,0x848204,0x97B951,0x5C9D2F,0x6FCB4C,0x8CE264,0x4C9A24,0x509224,0x749224,0xECCA7C,0xDCBE74,0x349E2C,0x5CAE3C,0x84B64C,0xD0EC90,0x9CDA64,0x70B63C,0xBCE274,0xC4BA4C,0xDCB23C,0xC4E6F4,0x94CDC6,0x3CA674,0x51A389,0x74BAAC,0x2C8E64,0x3C8E94,0x1C6E5C,0x84AEA4,0x2489B9,0x1C6A84,0x145A6C,0x0064827C,0xACBEA4,0x0C4E5C,0x4CA6CC,0x84BAB4,0xB4CEA4,0xA4CEAC,0x0796D9,0x1C96CC,0x2496CC,0x54CAFC,0x30A6D8,0xBC2E34,0x946684,0x447684,0x34867C,0x449664,0xA4CA94,0xF46264,0x8C6E34,0xACEE64,0x9C2624,0xE42A3C,0xDC1A2C,0x846224,0x84C73F,0x8C4644,0x3C7A24,0x547A44,0x00E15671,0x6492CC,0x5C8614,0xC44244,0xDC4A6C,0x84BA1C,0x04A6F4,0xE4627C,0xEC7E94,0xB45A04,0x848387,0x9C9D9E,0xFCD94A,0xC9FEA4,0xFCCE1C,0xFCC514,0x464F6A,0x343644,0xFC0204,0xFCCBCC};
unsigned char ficons[6240] = FROM "imgs\icons.raw";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -41,13 +41,11 @@ void Paste()
notify("Copy directory into itself is a bad idea...");
ExitProcess();
}
copy_rezult = copyf(#copy_from,#copy_to);
if (copy_rezult)
if (copy_rezult = copyf(#copy_from,#copy_to))
{
Write_Error(copy_rezult);
ExitProcess();
}
if (cut_active)
else if (cut_active)
{
strcpy(#file_path, #copy_from);
Del_File(true);

View File

@ -36,7 +36,7 @@ void Put_icon(dword extension, yy, fairing_color)
int icon_n=0, i;
for (i=0; ext[i]!=0; i+=2;) if (!strcmp(extension, ext[i])) { icon_n = ext[i+1]; break; }
PutPaletteImage(icon_n*16*15+#ficons,16,15,195,yy,8,#ficons_pal);
PutPaletteImage(icon_n*16*15+#ficons,16,15,files.x+3,yy,8,#ficons_pal);
if (icon_n<>17) && (strlen(extension)<9) WriteText(-strlen(extension)*3+Form.cwidth-120,yy+4,0x80,0,extension);
if (fairing_color<>0xFFFfff) IconFairing(icon_n, yy, fairing_color); //çàêðàøèâàåì èêîíêó
}