Rev 4896 | Rev 5149 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4896 | Rev 4897 | ||
---|---|---|---|
Line 80... | Line 80... | ||
80 | ?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file" |
80 | ?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file" |
81 | #endif |
81 | #endif |
Line 82... | Line 82... | ||
82 | 82 | ||
Line 83... | Line 83... | ||
83 | enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir |
83 | enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir |
84 | 84 | ||
85 | #define TITLE "Eolite File Manager v2.31" |
85 | #define TITLE "Eolite File Manager v2.35" |
Line 86... | Line 86... | ||
86 | #define ABOUT_TITLE "Eolite v2.31" |
86 | #define ABOUT_TITLE "Eolite v2.35" |
87 | dword col_padding, col_selec, col_lpanel; |
87 | dword col_padding, col_selec, col_lpanel; |
88 | 88 | ||
Line 113... | Line 113... | ||
113 | 113 | ||
114 | proc_info Form; |
114 | proc_info Form; |
115 | system_colors sc; |
115 | system_colors sc; |
116 | mouse m; |
116 | mouse m; |
117 | int mouse_dd, scroll_used, scroll_size, sorting_arrow_x, kolibrios_drive; |
117 | int mouse_dd, scroll_used, scroll_size, sorting_arrow_x, kolibrios_drive; |
118 | dword buf, off; |
118 | dword buf; |
119 | dword file_mas[6898]; |
119 | dword file_mas[6898]; |
120 | int j, i; |
120 | int j, i; |
121 | int action_buf; |
121 | int action_buf; |
Line 156... | Line 156... | ||
156 | } |
156 | } |
Line 157... | Line 157... | ||
157 | 157 | ||
158 | void main() |
158 | void main() |
159 | { |
159 | { |
- | 160 | word key, id, can_show, can_select, m_selected; |
|
160 | word key, id, can_show, can_select, m_selected; |
161 | dword selected_offset; |
161 | randomize(); |
162 | randomize(); |
Line 162... | Line 163... | ||
162 | rand_n = random(40); |
163 | rand_n = random(40); |
163 | 164 | ||
Line 428... | Line 429... | ||
428 | break; |
429 | break; |
429 | case 182: //del |
430 | case 182: //del |
430 | Del_Form(); |
431 | Del_Form(); |
431 | break; |
432 | break; |
432 | case 185: //ins |
433 | case 185: //ins |
433 | add_to_mark(#file_path); |
434 | //add_to_mark(#file_path); |
434 | //notify("'Eolite\nFile was added to copy queue' -tI"); |
435 | selected_offset = file_mas[files.current+files.first]*304 + buf+32 + 7; |
- | 436 | if (ESBYTE[selected_offset]) ESBYTE[selected_offset]=0; else ESBYTE[selected_offset] = 1; |
|
- | 437 | List_Current(1); |
|
435 | break; |
438 | break; |
436 | case 050...059: //F1-F10 |
439 | case 050...059: //F1-F10 |
437 | FnProcess(key-49); |
440 | FnProcess(key-49); |
438 | break; |
441 | break; |
439 | default: |
442 | default: |
Line 593... | Line 596... | ||
593 | } |
596 | } |
Line 594... | Line 597... | ||
594 | 597 | ||
595 | 598 | ||
596 | void Line_ReDraw(dword color, filenum){ |
- | |
597 | dword text_col=0, |
- | |
598 | name_len=0, |
599 | void Line_ReDraw(dword color, filenum){ |
- | 600 | dword text_col=0, |
|
- | 601 | ext1, |
|
599 | attr, |
602 | file_offet, |
- | 603 | file_name_off, |
|
600 | ext1, |
604 | y=filenum*files.line_h+files.y; |
601 | y=filenum*files.line_h+files.y; |
605 | BDVK file; |
602 | if (filenum==-1) return; |
606 | if (filenum==-1) return; |
603 | DrawBar(files.x,y,3,files.line_h,color); |
607 | DrawBar(files.x,y,3,files.line_h,color); |
604 | DrawBar(files.x+19,y,files.w-19,files.line_h,color); |
608 | DrawBar(files.x+19,y,files.w-19,files.line_h,color); |
605 | DrawBar(files.x+3,y+17,16,1,color); |
609 | DrawBar(files.x+3,y+17,16,1,color); |
Line 606... | Line 610... | ||
606 | if (files.line_h>18) DrawBar(files.x+3,y+18,16,files.line_h-18,color); |
610 | if (files.line_h>18) DrawBar(files.x+3,y+18,16,files.line_h-18,color); |
607 | if (files.line_h>15) DrawBar(files.x+3,y,16,files.line_h-15,color); |
611 | if (files.line_h>15) DrawBar(files.x+3,y,16,files.line_h-15,color); |
- | 612 | ||
- | 613 | file_offet = file_mas[filenum+files.first]*304 + buf+32; |
|
- | 614 | file.attr = ESDWORD[file_offet]; |
|
Line 608... | Line 615... | ||
608 | 615 | file.selected = ESBYTE[file_offet+7]; |
|
609 | off=file_mas[filenum+files.first]*304 + buf+72; |
616 | file.sizelo = ESDWORD[file_offet+32]; |
610 | attr = ESDWORD[off - 40]; |
617 | file_name_off = file_offet+40; |
611 | 618 | ||
612 | if (! TestBit(attr, 4) ) //file or folder? |
619 | if (! TestBit(file.attr, 4) ) //file or folder? |
613 | { |
620 | { |
614 | Put_icon(off+_strrchr(off,'.'), files.x+3, files.line_h/2-7+y, color, 0); |
621 | Put_icon(file_name_off+_strrchr(file_name_off,'.'), files.x+3, files.line_h/2-7+y, color, 0); |
615 | WriteText(7-strlen(ConvertSize(ESDWORD[off-8]))*6+onLeft(75,0),files.line_h-6/2+y,0x80,0,ConvertSize(ESDWORD[off-8])); //size |
622 | WriteText(7-strlen(ConvertSize(file.sizelo))*6+onLeft(75,0),files.line_h-6/2+y,0x80,0,ConvertSize(file.sizelo)); |
616 | } |
623 | } |
617 | else |
624 | else |
Line 618... | Line 625... | ||
618 | { |
625 | { |
619 | if (strcmp("..",off)==0) ext1=".."; else ext1=" |
626 | if (strcmp("..",file_name_off)==0) ext1=".."; else ext1=" |
620 | Put_icon(ext1, files.x+3, files.line_h/2-7+y, color, 0); |
627 | Put_icon(ext1, files.x+3, files.line_h/2-7+y, color, 0); |
621 | } |
628 | } |
622 | 629 | ||
623 | if ( TestBit(attr, 1) ) || ( TestBit(attr, 2) ) text_col=0xA6A6B7; //system or hiden? |
630 | if (TestBit(file.attr, 1)) || (TestBit(file.attr, 2)) text_col=0xA6A6B7; //system or hiden? |
624 | if (color!=0xFFFfff) |
631 | if (color!=0xFFFfff) |
625 | { |
632 | { |
626 | itdir = TestBit(attr, 4); |
633 | itdir = TestBit(file.attr, 4); |
- | 634 | strcpy(#file_name, file_name_off); |
|
627 | strcpy(#file_name, off); |
635 | strcpy(#file_path, #path); |
628 | strcpy(#file_path, #path); |
636 | strcat(#file_path, #file_name); |
629 | strcat(#file_path, #file_name); |
637 | if (text_col==0xA6A6B7) text_col=0xFFFFFF; |
630 | if (text_col==0xA6A6B7) text_col=0xFFFFFF; |
638 | } |
631 | } |
639 | if (file.selected) text_col=0xFF0000; |
632 | if (Form.width>=480) |
640 | if (Form.width>=480) |
633 | { |
641 | { |
634 | FileShow.start_x = files.x + 23; |
642 | FileShow.start_x = files.x + 23; |
635 | FileShow.font_color = text_col; |
643 | FileShow.font_color = text_col; |
636 | FileShow.area_size_x = Form.width - 380; |
644 | FileShow.area_size_x = Form.width - 380; |
637 | FileShow.text_pointer = off; |
645 | FileShow.text_pointer = file_name_off; |
638 | FileShow.start_y = files.line_h/2-3+y; |
646 | FileShow.start_y = files.text_y+y; |
Line 683... | Line 691... | ||
683 | 691 | ||
684 | 692 | ||
685 | inline Sorting() |
693 | inline Sorting() |
- | 694 | { |
|
686 | { |
695 | dword k=0, l=1; |
687 | dword k=0, l=1; |
696 | dword file_off; |
688 | int i; |
697 | int i; |
689 | if (!strcmp(#path,"/")) //do not sort |
698 | if (!strcmp(#path,"/")) //do not sort |
690 | { |
699 | { |
691 | FOR(k=1;k |
700 | FOR(k=1;k |
692 | return; |
701 | return; |
693 | } |
702 | } |
694 | FOR (j=files.count-1, off=files.count-1*304+buf+32; j>=0; j--, off-=304;) //files | folders |
703 | FOR (j=files.count-1, file_off=files.count-1*304+buf+32; j>=0; j--, file_off-=304;) //files | folders |
695 | { |
704 | { |
696 | if (!real_files_names_case) strttl(off+40); |
705 | if (!real_files_names_case) strttl(file_off+40); |
697 | if (TestBit(ESDWORD[off],4)) //directory? |
706 | if (TestBit(ESDWORD[file_off],4)) //directory? |
698 | { |
707 | { |
699 | file_mas[k]=j; |
708 | file_mas[k]=j; |
700 | k++; |
709 | k++; |