Subversion Repositories Kolibri OS

Rev

Rev 1792 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1792 yogev_ezra 1
;-------------------------------------------------------------
2
create_directory:
3
    call clear_file_buffer
4
    mov edi, edit1
5
    mov ed_size, dword 0
6
    mov ed_pos, dword 0
7
default_box
8
    mov [create_dir_name],byte 0
9
    mcall 66, 1, 0
10
    jmp  .red
11
.red_1:
12
    call  draw_window
13
.red:
14
    call  draw_create_dir
15
.still:
16
    mcall 10
17
    cmp  eax,1
18
    je	 .red_1
19
    cmp  eax,2
20
    je	 .key_create
21
    cmp  eax,3
22
    je	 .button_create
23
	mouse_edit_box create_editboxes
24
	jmp .still
25
;-------------------------------------------------------------
26
.button_create:
27
    mov eax,17
3840 mario79 28
	mcall
1792 yogev_ezra 29
    test ah,ah
30
    jz	.still
31
    cmp  ah,160
32
    je	.exit_with_create
33
    cmp  ah,161
34
    je	.exit_without_create
35
    cmp   ah,1
36
    jne   .still
37
    mcall -1
38
.exit_with_create:
39
    call  create_directory_1
40
    cmp   [select_panel_counter],0
41
    jne   @f
42
    call proc_read_left_folder
43
    jmp  .exit_without_create
44
@@:
45
    call proc_read_right_folder
46
.exit_without_create:
47
    mcall 66, 1, 1
48
    jmp  red
49
;-------------------------------------------------------------
50
.key_create:
51
    mov eax,2
3840 mario79 52
	mcall
1792 yogev_ezra 53
    cmp ah,13
54
    je	.exit_with_create
55
    cmp ah,27
56
    je	.exit_without_create
57
    key_edit_box create_editboxes
58
    jmp .still
59
;-------------------------------------------------------------
60
draw_create_dir:
61
    mov  ecx,[window_high]
62
    mov  ebx,[window_width]
63
    shr  ecx,1
64
    shr  ebx,1
65
    sub  ecx,30
66
    sub  ebx,87
67
    shl  ecx,16
68
    shl  ebx,16
69
    mov   cx,60
70
    mov   bx,174
71
    mcall 13, , ,0x6060ff ;0xff
72
    pusha
73
    shr ebx,16
74
    add  ebx,10
75
    shr ecx,16
76
    add ecx,17
77
    mov eax,create_editboxes
78
    mov dword [eax+4],ebx
79
    mov dword [eax+8],ecx
80
	draw_edit_box create_editboxes
81
	popa
82
	pusha
83
	add   ebx,70 shl 16
84
	add   ecx,37 shl 16
85
    mov   cx,15
86
    mov   bx,40
87
    mov   esi,0xffffff
88
    mov   edx,0x40000000+160
89
    mov   eax,8
3840 mario79 90
	mcall
1792 yogev_ezra 91
    add   ebx,50 shl 16
92
    inc   edx
3840 mario79 93
	mcall
1792 yogev_ezra 94
    popa
95
 
96
    push  ebx ecx
97
    add   ebx,70 shl 16
98
    add   ecx,37 shl 16
99
    mov   bx,40
100
    mov   cx,15
101
    mov   edx,0
102
    push  ebx ecx
103
    sub   ecx,1 shl 16
104
    sub   ebx,1 shl 16
105
    mov   bx,42
106
    mov   cx,17
3840 mario79 107
	mcall
1792 yogev_ezra 108
    add   ebx,50 shl 16
3840 mario79 109
	mcall
1792 yogev_ezra 110
    pop   ecx ebx
111
    mov   edx,0xff7700
3840 mario79 112
	mcall
1792 yogev_ezra 113
    mov   edx,0xaa00
114
    add   ebx,50 shl 16
3840 mario79 115
	mcall
1792 yogev_ezra 116
    pop   ecx ebx
117
 
118
    shr   ecx,16
119
    mov   bx,cx
120
    add   ebx,30 shl 16+5
121
    mcall 4, ,0x90ffffff,create_dir  ;[confirmation_type]
122
    add   ebx,48 shl 16+36
123
    mov   edx,type_yes
3840 mario79 124
	mcall
1792 yogev_ezra 125
    add   ebx,56 shl 16
126
    mov   edx,type_no
3840 mario79 127
	mcall
1792 yogev_ezra 128
	ret
129
;-------------------------------------------------------------
130
create_directory_1:
131
    mov   edx,create_dir_name
132
    cmp   [select_panel_counter],0
133
    jne   @f
134
    mov   esi,read_folder_name
135
    jmp   .start
136
@@:
137
    mov   esi,read_folder_1_name
138
.start:
139
    mov   edi,file_name
140
    xor   eax,eax
141
@@:
142
    cld
143
    lodsb
144
    stosb
145
    test  eax,eax
146
    jnz   @b
147
    mov   [edi-1], byte '/'
148
    mov   esi,edx
149
    mov   [error_pointer], edx	;start_file_data.name
150
@@:
151
    cld
152
    lodsb
153
    stosb
154
    test  eax,eax
155
    jnz   @b
156
    call  create_directory_f70
157
    cmp   eax,0
158
    je	  @f
159
;    mov  ebx,0
160
;    sub  ebx,eax
161
;    mov  eax,ebx
162
    call start_error_window_thread
163
@@:
164
;    call create_directory_f70
165
    ret
166
;-------------------------------------------------------------
167
clear_file_buffer:
168
    xor  eax,eax
169
    mov edi,create_dir_name
170
    mov ecx,256/4
171
    cld
172
    rep stosd
173
    ret
174
;-------------------------------------------------------------