Rev 3440 | Rev 3444 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3440 | Rev 3441 | ||
---|---|---|---|
Line 48... | Line 48... | ||
48 | cut_active=0, |
48 | cut_active=0, |
49 | rename_active=0, |
49 | rename_active=0, |
50 | del_active=0, |
50 | del_active=0, |
51 | show_dev_name=1, |
51 | show_dev_name=1, |
52 | sort_num=2, |
52 | sort_num=2, |
53 | isdir; |
53 | itdir; |
Line 54... | Line 54... | ||
54 | 54 | ||
55 | proc_info Form; |
55 | proc_info Form; |
56 | mouse m; |
56 | mouse m; |
57 | int mouse_dd, scroll_used, scroll_size; |
57 | int mouse_dd, scroll_used, scroll_size; |
Line 279... | Line 279... | ||
279 | RunProgram("/sys/File Managers/Eolite", #path); |
279 | RunProgram("/sys/File Managers/Eolite", #path); |
280 | break; |
280 | break; |
281 | case 024: //Ctrl+X |
281 | case 024: //Ctrl+X |
282 | case 003: //Ctrl+C |
282 | case 003: //Ctrl+C |
283 | CTRLC_MARK: |
283 | CTRLC_MARK: |
284 | IF (isdir) break; |
284 | IF (itdir) break; |
285 | strcpy(#copy_file, #file_path); |
285 | strcpy(#copy_file, #file_path); |
286 | IF (key==24) cut_active=1; ELSE cut_active=0; |
286 | IF (key==24) cut_active=1; ELSE cut_active=0; |
287 | break; |
287 | break; |
288 | case 022: //Ctrl+V |
288 | case 022: //Ctrl+V |
289 | Paste(); |
289 | Paste(); |
Line 480... | Line 480... | ||
480 | else |
480 | else |
481 | Put_icon(" |
481 | Put_icon(" |
482 | if (TestBit(ESDWORD[off-40],1)) || (TestBit(ESDWORD[off-40],2)) text_col=0xA6A6B7; //system or hiden? |
482 | if (TestBit(ESDWORD[off-40],1)) || (TestBit(ESDWORD[off-40],2)) text_col=0xA6A6B7; //system or hiden? |
483 | if (color<>0xFFFfff) |
483 | if (color<>0xFFFfff) |
484 | { |
484 | { |
485 | isdir=TestBit(ESDWORD[off-40], 4); |
485 | itdir=TestBit(ESDWORD[off-40], 4); |
486 | strcpy(#file_name, off); |
486 | strcpy(#file_name, off); |
487 | strcpy(#file_path, #path); |
487 | strcpy(#file_path, #path); |
488 | strcat(#file_path, #file_name); |
488 | strcat(#file_path, #file_name); |
489 | if (text_col==0xA6A6B7) text_col=0xFFFFFF; |
489 | if (text_col==0xA6A6B7) text_col=0xFFFFFF; |
490 | } |
490 | } |
Line 558... | Line 558... | ||
558 | return; |
558 | return; |
559 | } |
559 | } |
560 | FOR (j=files.count-1, off=files.count-1*304+buf+32; j>=0; j--, off-=304;) //files | folders |
560 | FOR (j=files.count-1, off=files.count-1*304+buf+32; j>=0; j--, off-=304;) //files | folders |
561 | { |
561 | { |
562 | strttl(off+40); |
562 | strttl(off+40); |
563 | if (TestBit(ESDWORD[off],4)) //isdir? |
563 | if (TestBit(ESDWORD[off],4)) //directory? |
564 | { |
564 | { |
565 | file_mas[k]=j; |
565 | file_mas[k]=j; |
566 | k++; |
566 | k++; |
567 | } |
567 | } |
568 | else |
568 | else |
Line 613... | Line 613... | ||
613 | { |
613 | { |
614 | del_rezult = DeleteFile(#file_path); |
614 | del_rezult = DeleteFile(#file_path); |
615 | IF (del_rezult<>0) |
615 | IF (del_rezult<>0) |
616 | { |
616 | { |
617 | Write_Error(del_rezult); |
617 | Write_Error(del_rezult); |
618 | IF ( isdir) ShowMessage("Error. Folder isn't empty."); |
618 | IF ( itdir) ShowMessage("Error. Folder isn't empty."); |
619 | IF (!isdir) ShowMessage("Error. Filesystem read-only."); |
619 | IF (!itdir) ShowMessage("Error. Filesystem read-only."); |
620 | } |
620 | } |
621 | } |
621 | } |
622 | del_active=0; |
622 | del_active=0; |
623 | DeleteButton(301); DeleteButton(302); |
623 | DeleteButton(301); DeleteButton(302); |
624 | Open_Dir(#path,1); |
624 | Open_Dir(#path,1); |
Line 665... | Line 665... | ||
665 | { |
665 | { |
666 | strcpy(#temp, #path); |
666 | strcpy(#temp, #path); |
667 | strcpy(#edit_name, #file_name); //save edit name to select it later |
667 | strcpy(#edit_name, #file_name); //save edit name to select it later |
668 | strcat(#temp, #file_name); |
668 | strcat(#temp, #file_name); |
669 | if (strcmp(#file_path,#temp)<>0) && (file_name) |
669 | if (strcmp(#file_path,#temp)<>0) && (file_name) |
670 | IF (isdir) |
670 | IF (itdir) |
671 | { |
671 | { |
672 | del_rezult = DeleteFile(#file_path); |
672 | del_rezult = DeleteFile(#file_path); |
673 | IF (del_rezult!=0) |
673 | IF (del_rezult!=0) |
674 | { |
674 | { |
675 | Write_Error(del_rezult); |
675 | Write_Error(del_rezult); |
Line 714... | Line 714... | ||
714 | SelectFile(#cur_folder); |
714 | SelectFile(#cur_folder); |
715 | } |
715 | } |
Line 716... | Line 716... | ||
716 | 716 | ||
717 | void Open() |
717 | void Open() |
718 | { |
718 | { |
719 | if (!isdir) |
719 | if (!itdir) |
720 | { |
720 | { |
721 | GetIni(0); |
721 | GetIni(0); |
722 | } |
722 | } |
723 | else |
723 | else |
Line 755... | Line 755... | ||
755 | edit_box_draw stdcall (#edit2); |
755 | edit_box_draw stdcall (#edit2); |
756 | DrawBar(213,files.current*files.line_h+58,edit2.width+1,1,0xFFFFCC); //bg |
756 | DrawBar(213,files.current*files.line_h+58,edit2.width+1,1,0xFFFFCC); //bg |
757 | rename_active=1; |
757 | rename_active=1; |
758 | break; |
758 | break; |
759 | case 3: |
759 | case 3: |
760 | IF (!isdir) RunProgram("/sys/tinypad", #file_path); |
760 | IF (!itdir) RunProgram("/sys/tinypad", #file_path); |
761 | break; |
761 | break; |
762 | case 4: |
762 | case 4: |
763 | IF (!isdir) RunProgram("/sys/develop/heed", #file_path); |
763 | IF (!itdir) RunProgram("/sys/develop/heed", #file_path); |
764 | break; |
764 | break; |
765 | case 5: //refresh cur dir & devs |
765 | case 5: //refresh cur dir & devs |
766 | Tip(56, "Devices", 55, "-"); |
766 | Tip(56, "Devices", 55, "-"); |
767 | Open_Dir(#path,WITH_REDRAW); |
767 | Open_Dir(#path,WITH_REDRAW); |
768 | pause(10); |
768 | pause(10); |