Rev 4136 | Rev 4394 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4136 | Rev 4225 | ||
---|---|---|---|
Line 77... | Line 77... | ||
77 | ?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file" |
77 | ?define T_SELECT_APP_TO_OPEN_WITH "Select application to open file" |
78 | #endif |
78 | #endif |
Line 79... | Line 79... | ||
79 | 79 | ||
Line 80... | Line 80... | ||
80 | enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir |
80 | enum {ONLY_SHOW, WITH_REDRAW, ONLY_OPEN}; //OpenDir |
81 | 81 | ||
82 | #define TITLE "Eolite File Manager v2.0.4" |
82 | #define TITLE "Eolite File Manager v2.15" |
Line 83... | Line 83... | ||
83 | #define ABOUT_TITLE "Eolite v2.0.4" |
83 | #define ABOUT_TITLE "Eolite v2.15" |
84 | dword col_padding, col_selec, col_lpanel; |
84 | dword col_padding, col_selec, col_lpanel; |
85 | 85 | ||
Line 101... | Line 101... | ||
101 | temp[4096]; |
101 | temp[4096]; |
102 | byte |
102 | byte |
103 | rename_active=0, |
103 | rename_active=0, |
104 | del_active=0, |
104 | del_active=0, |
105 | show_dev_name=1, |
105 | show_dev_name=1, |
- | 106 | real_files_names_case=0, |
|
106 | sort_num=2, |
107 | sort_num=2, |
107 | itdir; |
108 | itdir; |
Line 108... | Line 109... | ||
108 | 109 | ||
109 | proc_info Form; |
110 | proc_info Form; |
Line 308... | Line 309... | ||
308 | Copy(#file_path, NOCUT); |
309 | Copy(#file_path, NOCUT); |
309 | break; |
310 | break; |
310 | case 26: //paste |
311 | case 26: //paste |
311 | CreateThread(#Paste,#copy_stak+4092); |
312 | CreateThread(#Paste,#copy_stak+4092); |
312 | break; |
313 | break; |
- | 314 | case 27: |
|
- | 315 | strcpy(#temp, "Ram Disk free space: "); |
|
- | 316 | i = GetFreeRamDiskClusters() / 2; |
|
- | 317 | itoa_(#temp+21, i); |
|
- | 318 | strcat(#temp, "Kb"); |
|
- | 319 | notify(#temp); |
|
- | 320 | break; |
|
313 | case 31...33: //sort |
321 | case 31...33: //sort |
314 | IF(sort_num==1) DrawFilledBar(sorting_arrow_x,42,6,10); |
322 | IF(sort_num==1) DrawFilledBar(sorting_arrow_x,42,6,10); |
315 | IF(sort_num==2) DrawFilledBar(sorting_arrow_x,42,6,10); |
323 | IF(sort_num==2) DrawFilledBar(sorting_arrow_x,42,6,10); |
316 | IF(sort_num==3) DrawFilledBar(sorting_arrow_x,42,6,10); |
324 | IF(sort_num==3) DrawFilledBar(sorting_arrow_x,42,6,10); |
317 | sort_num=id-30; |
325 | sort_num=id-30; |
Line 394... | Line 402... | ||
394 | menu_call_mouse=0; |
402 | menu_call_mouse=0; |
395 | SwitchToAnotherThread(); |
403 | SwitchToAnotherThread(); |
396 | CreateThread(#FileMenu,#menu_stak+4092); |
404 | CreateThread(#FileMenu,#menu_stak+4092); |
397 | break; |
405 | break; |
398 | case 173: //Ctrl+Enter |
406 | case 173: //Ctrl+Enter |
399 | if (!itdir) |
- | |
400 | { |
- | |
401 | SwitchToAnotherThread(); |
407 | if (!itdir) ShowOpenWithDialog(); |
402 | CreateThread(#OpenWith,#open_with_stak+4092); |
- | |
403 | } |
- | |
404 | break; |
408 | break; |
405 | case 178: //up |
409 | case 178: //up |
406 | List_Current(-1); |
410 | List_Current(-1); |
407 | break; |
411 | break; |
408 | case 177: //down |
412 | case 177: //down |
Line 442... | Line 446... | ||
442 | draw_window(); |
446 | draw_window(); |
443 | if (action_buf) { menu_action(action_buf); action_buf=0;} |
447 | if (action_buf) { menu_action(action_buf); action_buf=0;} |
444 | } |
448 | } |
445 | } |
449 | } |
Line -... | Line 450... | ||
- | 450 | ||
- | 451 | ||
446 | 452 | ||
447 | void menu_action(dword id) |
453 | void menu_action(dword id) |
448 | { |
454 | { |
449 | if (id==COPY_PASTE_END) |
455 | if (id==COPY_PASTE_END) |
450 | { |
456 | { |
451 | FnProcess(5); |
457 | FnProcess(5); |
452 | SelectFile(#copy_to+strrchr(#copy_to,'/')); |
458 | SelectFile(#copy_to+strrchr(#copy_to,'/')); |
453 | } |
459 | } |
454 | if (id==100) Open(); |
- | |
455 | if (id==201) |
- | |
456 | { |
460 | if (id==100) Open(); |
457 | SwitchToAnotherThread(); |
- | |
458 | CreateThread(#OpenWith,#open_with_stak+4092); |
- | |
459 | } |
461 | if (id==201) ShowOpenWithDialog(); |
460 | if (id==202) FnProcess(3); //F3 |
462 | if (id==202) FnProcess(3); //F3 |
461 | if (id==203) FnProcess(4); //F4 |
463 | if (id==203) FnProcess(4); //F4 |
462 | if (id==104) Copy(#file_path, NOCUT); |
464 | if (id==104) Copy(#file_path, NOCUT); |
463 | if (id==105) Copy(#file_path, CUT); |
465 | if (id==105) Copy(#file_path, CUT); |
Line 468... | Line 470... | ||
468 | } |
470 | } |
Line 469... | Line 471... | ||
469 | 471 | ||
470 | 472 | ||
471 | void draw_window() |
473 | void draw_window() |
472 | { |
474 | { |
473 | DefineAndDrawWindow(40,20,550,500,0x73,sc.work,TITLE); |
475 | DefineAndDrawWindow(40,20,550,500,0x73,sc.work,TITLE,0); |
474 | GetProcessInfo(#Form, SelfInfo); |
476 | GetProcessInfo(#Form, SelfInfo); |
475 | if (Form.status_window>2) return; |
477 | if (Form.status_window>2) return; |
476 | files.SetSizes(192, 57, onLeft(192,27), onTop(57,6), disc_num*16+195,files.line_h); |
478 | files.SetSizes(192, 57, onLeft(192,27), onTop(57,6), disc_num*16+195,files.line_h); |
Line 649... | Line 651... | ||
649 | Write_Error(errornum); |
651 | Write_Error(errornum); |
650 | return; |
652 | return; |
651 | } |
653 | } |
652 | maxcount = sizeof(file_mas)/sizeof(dword)-1; |
654 | maxcount = sizeof(file_mas)/sizeof(dword)-1; |
653 | if (files.count>maxcount) files.count = maxcount; |
655 | if (files.count>maxcount) files.count = maxcount; |
- | 656 | DrawRamDiskSpace(); |
|
654 | } |
657 | } |
655 | if (files.count!=-1) |
658 | if (files.count!=-1) |
656 | { |
659 | { |
657 | KEdit(); |
660 | KEdit(); |
658 | HistoryPath(ADD_NEW_PATH); |
661 | HistoryPath(ADD_NEW_PATH); |
Line 678... | Line 681... | ||
678 | FOR(k=1;k |
681 | FOR(k=1;k |
679 | return; |
682 | return; |
680 | } |
683 | } |
681 | FOR (j=files.count-1, off=files.count-1*304+buf+32; j>=0; j--, off-=304;) //files | folders |
684 | FOR (j=files.count-1, off=files.count-1*304+buf+32; j>=0; j--, off-=304;) //files | folders |
682 | { |
685 | { |
683 | strttl(off+40); |
686 | if (!real_files_names_case) strttl(off+40); |
684 | if (TestBit(ESDWORD[off],4)) //directory? |
687 | if (TestBit(ESDWORD[off],4)) //directory? |
685 | { |
688 | { |
686 | file_mas[k]=j; |
689 | file_mas[k]=j; |
687 | k++; |
690 | k++; |
688 | } |
691 | } |
Line 821... | Line 824... | ||
821 | 824 | ||
822 | void SelectFile(dword that_file) |
825 | void SelectFile(dword that_file) |
823 | { |
826 | { |
824 | files.first=files.current=0; |
827 | files.first=files.current=0; |
825 | Open_Dir(#path,ONLY_OPEN); |
828 | Open_Dir(#path,ONLY_OPEN); |
826 | strttl(that_file); |
829 | if (!real_files_names_case) strttl(that_file); |
827 | for (i=files.count-1; i>=0; i--;) |
830 | for (i=files.count-1; i>=0; i--;) |
828 | if (!strcmp(file_mas[i]*304+buf+72,that_file)) break; |
831 | if (!strcmp(file_mas[i]*304+buf+72,that_file)) break; |
829 | List_Current(i); |
832 | List_Current(i); |
830 | List_ReDraw(); |
833 | List_ReDraw(); |