Subversion Repositories Kolibri OS

Rev

Rev 180 | Rev 205 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 180 Rev 183
Line 576... Line 576...
576
        xor     eax, eax
576
        xor     eax, eax
577
@@:
577
@@:
578
        mov     [ebp + panel1_start - panel1_data], eax
578
        mov     [ebp + panel1_start - panel1_data], eax
579
        jmp     .done_redraw
579
        jmp     .done_redraw
580
.enter:
580
.enter:
581
        mov     eax, [ebp + panel1_files - panel1_data]
-
 
582
        mov     ecx, [eax+ecx*4]
581
        call    get_curfile_folder_entry
583
        mov     eax, [ebp + panel1_nfa - panel1_data]
-
 
584
        lea     ecx, [ecx+eax*4+32]
-
 
585
        add     ecx, [ebp + panel1_files - panel1_data]
-
 
586
        test    byte [ecx], 10h
582
        test    byte [ecx], 10h
587
        jnz     .enter_folder
583
        jnz     .enter_folder
588
; find extension
584
; find extension
589
        lea     esi, [ecx+40]
585
        lea     esi, [ecx+40]
590
        push    esi
586
        push    esi
Line 887... Line 883...
887
.f3:
883
.f3:
888
        call    view_file
884
        call    view_file
889
.ret2:
885
.ret2:
890
        ret
886
        ret
891
.f8:
887
.f8:
-
 
888
        call    get_curfile_folder_entry
-
 
889
        cmp     [bConfirmDelete], 0
-
 
890
        jz      .f8_allowed
892
        mov     eax, [ebp + panel1_files - panel1_data]
891
        mov     ebx, f8_confirm_dlgdata
-
 
892
        mov     esi, aConfirmDeleteText
-
 
893
        mov     edi, aConfirmDeleteTextBuf
-
 
894
@@:
-
 
895
        lodsb
-
 
896
        stosb
-
 
897
        test    al, al
-
 
898
        jnz     @b
-
 
899
        dec     edi
893
        mov     ecx, [eax+ecx*4]
900
        mov     esi, aDeleteFolder
-
 
901
        test    byte [ecx], 10h
-
 
902
        jnz     @f
894
        mov     eax, [ebp + panel1_nfa - panel1_data]
903
        mov     esi, aDeleteFile
-
 
904
@@:
-
 
905
        lodsb
-
 
906
        stosb
-
 
907
        test    al, al
-
 
908
        jnz     @b
895
        lea     ecx, [ecx+eax*4+32]
909
        lea     esi, [ecx+40]
-
 
910
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.name], esi
-
 
911
        or      eax, -1
-
 
912
@@:
-
 
913
        inc     eax
-
 
914
        cmp     byte [eax+esi], 0
-
 
915
        jnz     @b
-
 
916
        sub     edi, aConfirmDeleteTextBuf+1
-
 
917
        cmp     eax, edi
-
 
918
        jae     @f
-
 
919
        mov     eax, edi
-
 
920
@@:
-
 
921
        inc     eax
-
 
922
        inc     eax
-
 
923
        mov     edx, [cur_width]
-
 
924
        sub     edx, 8
-
 
925
        cmp     eax, edx
-
 
926
        jbe     @f
-
 
927
        mov     eax, edx
-
 
928
@@:
-
 
929
        mov     [ebx + dlgtemplate.width], eax
-
 
930
        dec     eax
-
 
931
        dec     eax
-
 
932
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.width2], eax
-
 
933
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.width3], eax
-
 
934
        shr     eax, 1
-
 
935
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.del_x2], eax
-
 
936
        sub     eax, aDeleteLength-1
-
 
937
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.del_x1], eax
-
 
938
        add     eax, aDeleteLength
-
 
939
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.cnl_x1], eax
896
        add     ecx, [ebp + panel1_files - panel1_data]
940
        add     eax, aCancelLength - 1
-
 
941
        mov     [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.cnl_x2], eax
-
 
942
        mov     al, [dialog_border_color]
-
 
943
        mov     [ebx + dlgtemplate.border_color], al
-
 
944
        mov     al, [dialog_header_color]
-
 
945
        mov     [ebx + dlgtemplate.header_color], al
-
 
946
        mov     al, [dialog_main_color]
-
 
947
        mov     [ebx + dlgtemplate.main_color], al
-
 
948
        or      byte [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.flags1], 4
-
 
949
        and     byte [ebx - f8_confirm_dlgdata + f8_confirm_dlgdata.flags2], not 4
-
 
950
        push    ebx
-
 
951
        call    DialogBox
-
 
952
        cmp     eax, f8_confirm_dlgdata.del_btn
-
 
953
        jnz     .ret2
-
 
954
.f8_allowed:
897
        lea     esi, [ebp + panel1_dir - panel1_data]
955
        lea     esi, [ebp + panel1_dir - panel1_data]
898
        mov     edi, execdata
956
        mov     edi, execdata
899
@@:
957
@@:
900
        lodsb
958
        lodsb
901
        test    al, al
959
        test    al, al
Line 919... Line 977...
919
; Rescan panel
977
; Rescan panel
920
;       call    read_folder
978
;       call    read_folder
921
;       jmp     .done_redraw
979
;       jmp     .done_redraw
922
        mov     eax, [ebp + panel1_index - panel1_data]
980
        mov     eax, [ebp + panel1_index - panel1_data]
923
        push    eax
981
        push    eax
924
        mov     ecx, [ebp + panel1_files - panel1_data]
-
 
925
        mov     ecx, [ecx+eax*4]
982
        call    get_curfile_name
926
        mov     eax, [ebp + panel1_nfa - panel1_data]
-
 
927
        lea     esi, [ecx+eax*4+32+40]
983
        mov     esi, eax
928
        add     esi, [ebp + panel1_files - panel1_data]
-
 
929
        mov     edi, saved_file_name
984
        mov     edi, saved_file_name
930
@@:
985
@@:
931
        lodsb
986
        lodsb
932
        stosb
987
        stosb
933
        test    al, al
988
        test    al, al
Line 1010... Line 1065...
1010
        dec     eax
1065
        dec     eax
1011
        mov     [panel1_height], eax
1066
        mov     [panel1_height], eax
1012
        mov     [panel2_height], eax
1067
        mov     [panel2_height], eax
1013
        ret
1068
        ret
Line -... Line 1069...
-
 
1069
 
-
 
1070
get_curfile_folder_entry:
-
 
1071
        push    eax
-
 
1072
        mov     ecx, [ebp + panel1_index - panel1_data]
-
 
1073
        mov     eax, [ebp + panel1_files - panel1_data]
-
 
1074
        mov     ecx, [eax+ecx*4]
-
 
1075
        mov     eax, [ebp + panel1_nfa - panel1_data]
-
 
1076
        lea     ecx, [ecx+eax*4+32]
-
 
1077
        add     ecx, [ebp + panel1_files - panel1_data]
-
 
1078
        pop     eax
-
 
1079
        ret
-
 
1080
get_curfile_name:
-
 
1081
        call    get_curfile_folder_entry
-
 
1082
        add     ecx, 40
-
 
1083
        ret
1014
 
1084
 
1015
panels_getname:
1085
panels_getname:
1016
if lang eq ru
1086
if lang eq ru
1017
        mov     eax, ' ­¥'
1087
        mov     eax, ' ­¥'
1018
        stosd
1088
        stosd
Line 2809... Line 2879...
2809
        cmp     ah, al
2879
        cmp     ah, al
2810
        pop     eax
2880
        pop     eax
2811
        ret
2881
        ret
Line 2812... Line 2882...
2812
 
2882
 
2813
 
2883
 
2814
header  db      'Kolibri Far 0.13'
2884
header  db      'Kolibri Far 0.14'
Line 2815... Line 2885...
2815
;.length = $ - header
2885
;.length = $ - header
2816
        db      0
2886
        db      0
Line 3405... Line 3475...
3405
compare_names   db      '¨ˆà¬Œ €­á‘¤„'
3475
compare_names   db      '¨ˆà¬Œ €­á‘¤„'
3406
else
3476
else
3407
compare_names   db      'nNxXmMsSuUcCaA'
3477
compare_names   db      'nNxXmMsSuUcCaA'
3408
end if
3478
end if
Line -... Line 3479...
-
 
3479
 
-
 
3480
; ‡¤¥áì ­ ç¨­ îâáï ª®­ä¨£ãà æ¨®­­ë¥ ¤ ­­ë¥ - ¢ ⥪ã饩 ॠ«¨§ æ¨¨ ®­¨ § è¨âë ¢ ¡¨­ à­¨ª
3409
 
3481
 
3410
;  ­¥«ì
3482
;  ­¥«ì
3411
panel_normal_color      db      1Bh
3483
panel_normal_color      db      1Bh
3412
panel_border_color      db      1Bh
3484
panel_border_color      db      1Bh
3413
panel_cursor_color      db      30h
3485
panel_cursor_color      db      30h
3414
panel_header_color      db      1Bh
3486
panel_header_color      db      1Bh
3415
panel_active_header_color db    30h
3487
panel_active_header_color db    30h
3416
column_header_color     db      1Eh
3488
column_header_color     db      1Eh
-
 
3489
panel_nscreens_color    db      0Bh
-
 
3490
; „¨ «®£¨
-
 
3491
dialog_main_color       db      70h
-
 
3492
dialog_border_color     db      70h
-
 
3493
dialog_header_color     db      70h
-
 
3494
dialog_normal_btn_color db      70h
3417
panel_nscreens_color    db      0Bh
3495
dialog_selected_btn_color db    30h
3418
; Œ¥­î
3496
; Œ¥­î
3419
menu_normal_color       db      3Fh
3497
menu_normal_color       db      3Fh
3420
menu_selected_color     db      0Fh
3498
menu_selected_color     db      0Fh
3421
menu_highlight_color    db      3Eh
3499
menu_highlight_color    db      3Eh
Line 3509... Line 3587...
3509
        db      1Fh
3587
        db      1Fh
3510
        db      3Fh
3588
        db      3Fh
3511
        db      10h
3589
        db      10h
3512
        db      '*',0
3590
        db      '*',0
Line 3513... Line -...
3513
 
-
 
3514
bWasE0          db      0
-
 
3515
ctrlstate       db      0
-
 
3516
MemForImage     dd      0
-
 
3517
 
3591
 
3518
associations:
3592
associations:
3519
        dd      aAsm, tinypad
3593
        dd      aAsm, tinypad
3520
        dd      aInc, tinypad
3594
        dd      aInc, tinypad
3521
        dd      aTxt, tinypad
3595
        dd      aTxt, tinypad
Line 3556... Line 3630...
3556
archer db '/rd/1/@rcher',0
3630
archer db '/rd/1/@rcher',0
Line 3557... Line 3631...
3557
 
3631
 
3558
aRtf db 'rtf',0
3632
aRtf db 'rtf',0
Line -... Line 3633...
-
 
3633
rtfread db '/rd/1/RtfRead',0
-
 
3634
 
-
 
3635
bConfirmDelete  db      1
-
 
3636
 
-
 
3637
; ‡¤¥áì § ª ­ç¨¢ îâáï ª®­ä¨£ãà æ¨®­­ë¥ ¤ ­­ë¥
-
 
3638
 
-
 
3639
bWasE0          db      0
-
 
3640
ctrlstate       db      0
-
 
3641
MemForImage     dd      0
-
 
3642
 
-
 
3643
align   4
-
 
3644
f8_confirm_dlgdata:
-
 
3645
        dd      0
-
 
3646
.x      dd      -1
-
 
3647
.y      dd      -1
-
 
3648
.width  dd      ?
-
 
3649
.height dd      3
-
 
3650
        dd      4
-
 
3651
        dd      2
-
 
3652
        dd      aDeleteCaption
-
 
3653
.main_color db ?
-
 
3654
.border_color db ?
-
 
3655
.header_color db ?
-
 
3656
        db      0
-
 
3657
        dd      0
-
 
3658
        dd      0
-
 
3659
        dd      4
-
 
3660
; áâப  "‚ë å®â¨â¥ 㤠«¨âì ..."
-
 
3661
        dd      1
-
 
3662
        dd      1,0
-
 
3663
.width2 dd      ?
-
 
3664
        dd      0
-
 
3665
        dd      aConfirmDeleteTextBuf
-
 
3666
        dd      1
-
 
3667
; áâப  á ¨¬¥­¥¬ ä ©« /¯ ¯ª¨
-
 
3668
        dd      1
-
 
3669
        dd      1,1
-
 
3670
.width3 dd      ?
-
 
3671
        dd      1
-
 
3672
.name   dd      ?
-
 
3673
        dd      1
-
 
3674
; ª­®¯ª  "㤠«¨âì"
-
 
3675
.del_btn:
-
 
3676
        dd      2
-
 
3677
.del_x1 dd      ?
-
 
3678
        dd      2
-
 
3679
.del_x2 dd      ?
-
 
3680
        dd      2
-
 
3681
        dd      aDelete
-
 
3682
.flags1 dd      4
-
 
3683
; ª­®¯ª  "®â¬¥­¨âì"
-
 
3684
        dd      2
-
 
3685
.cnl_x1 dd      ?
-
 
3686
        dd      2
-
 
3687
.cnl_x2 dd      ?
-
 
3688
        dd      2
-
 
3689
        dd      aCancel
-
 
3690
.flags2 dd      0
-
 
3691
 
-
 
3692
if lang eq ru
-
 
3693
aDeleteCaption          db      '“¤ «¥­¨¥',0
-
 
3694
aConfirmDeleteText      db      '‚ë å®â¨â¥ 㤠«¨âì ',0
-
 
3695
aDeleteFolder           db      '¯ ¯ªã',0
-
 
3696
aConfirmDeleteTextMax = $ - aConfirmDeleteText - 2
-
 
3697
aDeleteFile             db      'ä ©«',0
-
 
3698
aDelete                 db      ' “¤ «¨âì ',0
-
 
3699
aDeleteLength = $ - aDelete - 1
-
 
3700
aCancel                 db      ' Žâ¬¥­¨âì ',0
-
 
3701
aCancelLength = $ - aCancel - 1
-
 
3702
else
-
 
3703
aDeleteCaption          db      'Delete',0
-
 
3704
aConfirmDeleteText      db      'Do you wish to delete ',0
-
 
3705
aDeleteFolder           db      'the folder',0
-
 
3706
aConfirmDeleteTextMax = $ - aConfirmDeleteText - 2
-
 
3707
aDeleteFile             db      'the file',0
-
 
3708
aDelete                 db      ' Delete ',0
-
 
3709
aDeleteLength = $ - aDelete - 1
-
 
3710
aCancel                 db      ' Cancel ',0
-
 
3711
aCancelLength = $ - aCancel - 1
3559
rtfread db '/rd/1/RtfRead',0
3712
end if
3560
 
3713
 
3561
execinfo:
3714
execinfo:
3562
        dd      7
3715
        dd      7
3563
        dd      0
3716
        dd      0
Line 3635... Line 3788...
3635
screens         dd      ?
3788
screens         dd      ?
3636
num_screens     dd      ?
3789
num_screens     dd      ?
3637
active_screen_vtable dd ?
3790
active_screen_vtable dd ?
3638
active_screen_data dd   ?
3791
active_screen_data dd   ?
Line -... Line 3792...
-
 
3792
 
-
 
3793
aConfirmDeleteTextBuf   rb      aConfirmDeleteTextMax + 1
3639
 
3794
 
3640
; stack
3795
; stack
3641
        align   512
3796
        align   4
3642
        rb      512
3797
        rb      512
3643
stacktop:
3798
stacktop:
3644
; buffers for directory - may be resized dynamically
3799
; buffers for directory - may be resized dynamically
3645
buf1    rb      4*304 + 32 + 304*304
3800
buf1    rb      4*304 + 32 + 304*304