Subversion Repositories Kolibri OS

Rev

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

Rev 7579 Rev 7580
Line 66... Line 66...
66
;;------------------------------------------------------------------------------------------------;;
66
;;------------------------------------------------------------------------------------------------;;
67
;< none                                                                                           ;;
67
;< none                                                                                           ;;
68
;;================================================================================================;;
68
;;================================================================================================;;
Line 69... Line 69...
69
 
69
 
70
        stdcall [ted_init], tedit0
70
        stdcall [ted_init], tedit0
Line 71... Line 71...
71
        stdcall dword[edit_box_set_text], edit_volume, root_dir
71
        stdcall [edit_box_set_text], edit_volume, root_dir
72
 
72
 
73
        ; initialize tree list elements
73
        ; initialize tree list elements
Line 74... Line 74...
74
        stdcall dword[tl_data_init], tree1
74
        stdcall [tl_data_init], tree1
75
        stdcall dword[tl_data_init], tree2
75
        stdcall [tl_data_init], tree2
Line 76... Line 76...
76
		
76
		
Line 138... Line 138...
138
    .error:
138
    .error:
139
        jmp     login_gui.error
139
        jmp     login_gui.error
Line 140... Line 140...
140
 
140
 
141
    .exit:
141
    .exit:
142
    ;   stdcall mem.Free,[bmp_icon]
142
    ;   stdcall mem.Free,[bmp_icon]
143
        stdcall dword[tl_data_clear], tree1
143
        stdcall [tl_data_clear], tree1
144
        stdcall dword[tl_data_clear], tree2
144
        stdcall [tl_data_clear], tree2
145
        stdcall [ted_delete], tedit0
145
        stdcall [ted_delete], tedit0
Line 146... Line 146...
146
        jmp     exit
146
        jmp     exit
147
 
147
 
Line 208... Line 208...
208
        mcall   4, , 0xb0000000+STR_COL, str_change
208
        mcall   4, , 0xb0000000+STR_COL, str_change
Line 209... Line 209...
209
 
209
 
210
        ;--------------------------
210
        ;--------------------------
211
        ; tree list components
211
        ; tree list components
212
        ;--------------------------
212
        ;--------------------------
213
        stdcall dword[tl_draw], tree1
213
        stdcall [tl_draw], tree1
Line 214... Line 214...
214
        stdcall dword[tl_draw], tree2
214
        stdcall [tl_draw], tree2
215
     
215
     
Line 216... Line 216...
216
        mov     dword[wScr.all_redraw], 1
216
        mov     dword[wScr.all_redraw], 1
Line 428... Line 428...
428
        mov     byte[edi], 0
428
        mov     byte[edi], 0
Line 429... Line 429...
429
 
429
 
430
        ; add node to tree list
430
        ; add node to tree list
431
        cmp     word[node_entry2], 'fi'
431
        cmp     word[node_entry2], 'fi'
432
        jne     @f
432
        jne     @f
433
        stdcall dword[tl_node_add], tree2, 0, node_entry2
433
        stdcall [tl_node_add], tree2, 0, node_entry2
Line 434... Line 434...
434
        jmp     .added_remote_node
434
        jmp     .added_remote_node
435
 
435
 
Line 436... Line 436...
436
      @@:
436
      @@:
437
        stdcall dword[tl_node_add], tree2, 0x10000, node_entry2
437
        stdcall [tl_node_add], tree2, 0x10000, node_entry2
438
 
438
 
439
      .added_remote_node:
439
      .added_remote_node:
Line 479... Line 479...
479
        pop     edx
479
        pop     edx
480
        jmp     data_loop
480
        jmp     data_loop
Line 481... Line 481...
481
 
481
 
482
        ; clear tree list and add ".." node before executing "LIST"
482
        ; clear tree list and add ".." node before executing "LIST"
483
      .clear_remote_tree:
483
      .clear_remote_tree:
484
        stdcall dword[tl_info_clear], tree2
484
        stdcall [tl_info_clear], tree2
485
        mov     dword[node_entry2+4], 0x2E2E
485
        mov     dword[node_entry2+4], 0x2E2E
486
        stdcall dword[tl_node_add], tree2, 0x10000, node_entry2
486
        stdcall [tl_node_add], tree2, 0x10000, node_entry2
Line 487... Line 487...
487
        ret
487
        ret
488
 
488
 
Line 520... Line 520...
520
        ret
520
        ret
Line 521... Line 521...
521
 
521
 
Line 522... Line 522...
522
 
522
 
523
remove_dir:
523
remove_dir:
524
 
524
 
525
    stdcall dword[tl_node_get_data], tree2
525
    stdcall [tl_node_get_data], tree2
526
    cmp     word[eax], 'fo'
526
    cmp     word[eax], 'fo'
527
    jne     gui.still
527
    jne     gui.still
Line 535... Line 535...
535
    jmp     cmd_rmd
535
    jmp     cmd_rmd
Line 536... Line 536...
536
 
536
 
Line 537... Line 537...
537
 
537
 
538
delete_file:
538
delete_file:
539
 
539
 
540
    stdcall dword[tl_node_get_data], tree2
540
    stdcall [tl_node_get_data], tree2
541
    cmp     word[eax], 'fi'
541
    cmp     word[eax], 'fi'
542
    jne     gui.still
542
    jne     gui.still
Line 564... Line 564...
564
 
564
 
565
; Function to call when you press [Enter]
565
; Function to call when you press [Enter]
566
align 4
566
align 4
Line 567... Line 567...
567
fun_on_enter:
567
fun_on_enter:
568
 
568
 
569
    stdcall dword[tl_node_get_data], tree1
569
    stdcall [tl_node_get_data], tree1
570
    cmp     word[eax], 'fi'
570
    cmp     word[eax], 'fi'
571
    je      @f
571
    je      @f
572
    lea     ecx, [eax+4] ; discard first 4 bytes
572
    lea     ecx, [eax+4] ; discard first 4 bytes
573
    call    populate_local_tree_list.read_new_dir
573
    call    populate_local_tree_list.read_new_dir
Line 574... Line 574...
574
    ;stdcall dword[tl_draw], tree1
574
    ;stdcall [tl_draw], tree1
575
    ret
575
    ret
576
 
576
 
Line 588... Line 588...
588
; Function to call when you press [Enter]
588
; Function to call when you press [Enter]
589
; for treelist with remote directory listing
589
; for treelist with remote directory listing
590
align 4
590
align 4
591
fun_on_enter2:
591
fun_on_enter2:
Line 592... Line 592...
592
 
592
 
593
    stdcall dword[tl_node_get_data], tree2
593
    stdcall [tl_node_get_data], tree2
594
    lea     esi, [eax+4]
594
    lea     esi, [eax+4]
595
    cmp     dword[esi], 0x2E2E
595
    cmp     dword[esi], 0x2E2E
596
    jne     @f
596
    jne     @f
597
    mov     [auto_list], 1
597
    mov     [auto_list], 1
Line 615... Line 615...
615
    cmp     word[eax], 'fo'
615
    cmp     word[eax], 'fo'
616
    je      @f
616
    je      @f
617
    jmp     cmd_retr
617
    jmp     cmd_retr
Line 618... Line 618...
618
 
618
 
619
  @@:
619
  @@:
620
    stdcall dword[tl_info_clear], tree2
620
    stdcall [tl_info_clear], tree2
621
    mov     [auto_list], 1
621
    mov     [auto_list], 1
Line 622... Line 622...
622
    jmp     cmd_cwd
622
    jmp     cmd_cwd
Line 657... Line 657...
657
 
657
 
658
  @@:
658
  @@:
659
    mcall   30, 1, ; set cwd
659
    mcall   30, 1, ; set cwd
660
    mcall   30, 2, filestruct.name, 1024 ; get absolute path for cwd
660
    mcall   30, 2, filestruct.name, 1024 ; get absolute path for cwd
661
    ; clear all nodes in tree list
661
    ; clear all nodes in tree list
662
    stdcall dword[tl_info_clear], tree1
662
    stdcall [tl_info_clear], tree1
Line 663... Line 663...
663
    mov     [filestruct.offset], 0
663
    mov     [filestruct.offset], 0
664
 
664
 
665
  ; read 32 blocks
665
  ; read 32 blocks
Line 696... Line 696...
696
    mov     al, byte[edx-40]
696
    mov     al, byte[edx-40]
697
    and     al, 0x10
697
    and     al, 0x10
698
    jz      @f
698
    jz      @f
699
    ; add a folder to tree
699
    ; add a folder to tree
700
    mov     word[node_entry], 'fo'
700
    mov     word[node_entry], 'fo'
701
    stdcall dword[tl_node_add], tree1, 0x10000, node_entry
701
    stdcall [tl_node_add], tree1, 0x10000, node_entry
702
    jmp     .added
702
    jmp     .added
Line 703... Line 703...
703
 
703
 
704
  @@:
704
  @@:
705
    ; add a file to tree
705
    ; add a file to tree
706
    mov     word[node_entry], 'fi'
706
    mov     word[node_entry], 'fi'
Line 707... Line 707...
707
    stdcall dword[tl_node_add], tree1, 0, node_entry
707
    stdcall [tl_node_add], tree1, 0, node_entry
708
 
708
 
709
  .added:
709
  .added:
710
    add     edx, 304 ; 304 = length of BDFE. jump to next file's name
710
    add     edx, 304 ; 304 = length of BDFE. jump to next file's name
711
    loop    .inner
711
    loop    .inner
712
    stdcall dword[tl_draw], tree1
712
    stdcall [tl_draw], tree1
Line 713... Line 713...
713
    cmp     ebx, 32
713
    cmp     ebx, 32
714
    je      .outer ; more BDFEs to come
714
    je      .outer ; more BDFEs to come
Line 757... Line 757...
757
;;------------------------------------------------------------------------------------------------;;
757
;;------------------------------------------------------------------------------------------------;;
758
;> none                                                                                           ;;
758
;> none                                                                                           ;;
759
;;------------------------------------------------------------------------------------------------;;
759
;;------------------------------------------------------------------------------------------------;;
760
;< none                                                                                           ;;
760
;< none                                                                                           ;;
761
;;================================================================================================;;
761
;;================================================================================================;;
762
        stdcall dword[tl_cur_beg], tree2
762
        stdcall [tl_cur_beg], tree2
Line 763... Line 763...
763
 
763
 
764
    .next_node:
764
    .next_node:
765
        stdcall dword[tl_node_get_data], tree2
765
        stdcall [tl_node_get_data], tree2
766
        ; check whether any nodes left
766
        ; check whether any nodes left
767
        test    eax, eax
767
        test    eax, eax
768
        jnz     @f
768
        jnz     @f
769
        stdcall dword[tl_draw], tree2
769
        stdcall [tl_draw], tree2
770
        stdcall dword[edit_box_set_text], edit_search, str_null
770
        stdcall dword[edit_box_set_text], edit_search, str_null
Line 771... Line 771...
771
        je      gui.still
771
        je      gui.still
772
 
772
 
Line 798... Line 798...
798
        call    search
798
        call    search
799
        pop     esi
799
        pop     esi
800
        test    al, al
800
        test    al, al
Line 801... Line 801...
801
 
801
 
802
        jnz     .get_next
802
        jnz     .get_next
803
        stdcall dword[tl_node_delete], tree2
803
        stdcall [tl_node_delete], tree2
Line 804... Line 804...
804
        jmp     @f
804
        jmp     @f
805
 
805
 
Line 806... Line 806...
806
    .get_next:
806
    .get_next:
807
        stdcall dword[tl_cur_next], tree2
807
        stdcall [tl_cur_next], tree2
Line 1029... Line 1029...
1029
    dd 0,0,0 ;reserved
1029
    dd 0,0,0 ;reserved
1030
    .buffer_size       dd 4096 ;+214
1030
    .buffer_size       dd 4096 ;+214
1031
    .fun_find_err      dd 0 ;+218
1031
    .fun_find_err      dd 0 ;+218
1032
    .fun_init_synt_err dd 0 ;+222
1032
    .fun_init_synt_err dd 0 ;+222
1033
    .fun_draw_panel_buttons dd 0 ;+226
1033
    .fun_draw_panel_buttons dd 0 ;+226
1034
    .fun_draw_panel_find    dd 0 ;+230
1034
    .fun_draw_panels    dd 0 ;+230
1035
    dd 0 ;+234 reserved
1035
    dd 0 ;+234 reserved
1036
    .fun_save_err       dd 0 ;+238
1036
    .fun_save_err       dd 0 ;+238
1037
    .increase_size dd 1000 ;+242
1037
    .increase_size dd 1000 ;+242
1038
    .ptr_free_symb dd ? ;+246
1038
    .ptr_free_symb dd ? ;+246
1039
    .font_size     dd 16 shl 16 ; +250
1039
    .font_size     dd 16 shl 16 ; +250
Line 1157... Line 1157...
1157
        ted_but_redo,       'ted_but_redo', \
1157
        ted_but_redo,       'ted_but_redo', \
1158
        ted_but_reverse,    'ted_but_reverse', \
1158
        ted_but_reverse,    'ted_but_reverse', \
1159
        ted_but_find,       'ted_but_find', \
1159
        ted_but_find,       'ted_but_find', \
1160
        ted_but_replace,    'ted_but_replace', \
1160
        ted_but_replace,    'ted_but_replace', \
1161
        ted_text_colored,   'ted_text_colored', \
1161
        ted_text_colored,   'ted_text_colored', \
1162
        ted_text_colored,   'ted_text_colored', \
-
 
1163
        ted_go_to_position, 'ted_go_to_position', \
1162
        ted_go_to_position, 'ted_go_to_position', \
1164
        progressbar_draw,   'progressbar_draw'
1163
        progressbar_draw,   'progressbar_draw'
Line 1165... Line 1164...
1165
 
1164
 
1166
import  libimg, \
1165
import  libimg, \
1167
        lib_init1         , 'lib_init', \
1166
        lib_init1         , 'lib_init', \
1168
        img_is_img        , 'img_is_img', \;определяет по данным, может ли библиотека сделать из них изображени \
1167
        img_is_img        , 'img_is_img', \;определяет по данным, может ли библиотека сделать из них изображение \
1169
        img_info          , 'img_info', \
1168
        img_info          , 'img_info', \
1170
        img_from_file     , 'img_from_file', \
1169
        img_from_file     , 'img_from_file', \
1171
        img_to_file       , 'img_to_file', \
1170
        img_to_file       , 'img_to_file', \
1172
        img_from_rgb      , 'img_from_rgb', \
1171
        img_from_rgb      , 'img_from_rgb', \
1173
        img_to_rgb        , 'img_to_rgb', \;преобразование изображения в данные RG \
1172
        img_to_rgb        , 'img_to_rgb', \;преобразование изображения в данные RGB \
1174
        img_to_rgb2       , 'img_to_rgb2', \
1173
        img_to_rgb2       , 'img_to_rgb2', \
1175
        img_decode        , 'img_decode', \ ;автоматически определяет формат графических данны \
1174
        img_decode        , 'img_decode', \ ;автоматически определяет формат графических данных \
1176
        img_encode        , 'img_encode', \
1175
        img_encode        , 'img_encode', \
1177
        img_create        , 'img_create', \
1176
        img_create        , 'img_create', \
1178
        img_destroy       , 'img_destroy', \
1177
        img_destroy       , 'img_destroy', \
1179
        img_destroy_layer , 'img_destroy_layer', \
1178
        img_destroy_layer , 'img_destroy_layer', \