Subversion Repositories Kolibri OS

Rev

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

Rev 5939 Rev 6086
Line 41... Line 41...
41
		jmp .ret_f
41
		jmp .ret_f
42
	@@:
42
	@@:
43
	call On_NewFile
43
	call On_NewFile
44
	.ret_f:
44
	.ret_f:
45
		mov byte[openfile_path],0
45
		mov byte[openfile_path],0
46
		mcall 71,1,hed
46
		mcall SF_SET_CAPTION,1,hed
47
	pop ebx eax
47
	pop ebx eax
48
	ret
48
	ret
Line 49... Line 49...
49
 
49
 
50
align 4
50
align 4
Line 140... Line 140...
140
		stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog'
140
		stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog'
141
		jmp .ret_f
141
		jmp .ret_f
142
	@@:
142
	@@:
143
	cmp [OpenDialog_data.status],1
143
	cmp [OpenDialog_data.status],1
144
	jne .ret_f
144
	jne .ret_f
-
 
145
		stdcall auto_open_syntax,[OpenDialog_data.openfile_path]
-
 
146
		stdcall [ted_open_file], tedit0,run_file_70,openfile_path
-
 
147
		call ted_messages_after_open_file
-
 
148
	.ret_f:
-
 
149
	popad
-
 
150
	ret
Line -... Line 151...
-
 
151
 
-
 
152
proc auto_open_syntax, of_path:dword
145
 
153
pushad
146
		;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
154
	;¨é¥¬ ¥áâì «¨ ä ©« ¯®¤á¢¥âª¨ ¤«ï ®âªà뢠¥¬®£® ⥪á⮢®£® ä ©« 
147
		mov esi,[OpenDialog_data.openfile_path]
155
	mov esi,[of_path]
148
		call strlen
156
	call strlen
149
		mov edx,openfile_path
157
	mov edx,[of_path]
150
		add edx,eax
158
	add edx,eax
151
		.f_beg:
159
	.f_beg:
152
		cmp byte[edx],'.'
160
	cmp byte[edx],'.'
153
		je .found
161
	je .found
154
			dec edx
162
		dec edx
155
			cmp edx,openfile_path
163
		cmp edx,[of_path]
156
			jg .f_beg
164
		jg .f_beg
157
		.found:
165
	.found:
Line 158... Line 166...
158
		inc edx ;edx - 㪠§ â¥«ì ­  à áè¨à¥­¨¥ ®âªàë⮣® ä ©« 
166
	inc edx ;edx - 㪠§ â¥«ì ­  à áè¨à¥­¨¥ ®âªàë⮣® ä ©« 
Line 167... Line 175...
167
			cmp byte[ebx],0
175
		cmp byte[ebx],0
168
			jne .cycle_0
176
		jne .cycle_0
169
		jmp .end_0
177
	jmp .end_0
170
		.ok: ;®âªàë⨥ ä ©«  ¯®¤á¢¥âª¨ ¢ § ¢¨á¨¬®á⨠®â ­ ©¤¥­­®£® à áè¨à¥­¨ï
178
	.ok: ;®âªàë⨥ ä ©«  ¯®¤á¢¥âª¨ ¢ § ¢¨á¨¬®á⨠®â ­ ©¤¥­­®£® à áè¨à¥­¨ï
171
			sub ebx,32
179
		sub ebx,32
172
			;mov ecx,ebx
-
 
173
			;mcall 71,1
-
 
174
			call open_unpac_synt_file
180
		stdcall open_unpac_synt_file,ebx
175
		.end_0:
181
	.end_0:
176
 
-
 
177
		stdcall [ted_open_file], tedit0,run_file_70,openfile_path
-
 
178
		call ted_messages_after_open_file
-
 
179
 
-
 
180
	.ret_f:
-
 
181
	popad
182
popad
182
	ret
183
	ret
-
 
184
endp
Line 183... Line 185...
183
 
185
 
184
;description:
186
;description:
185
; äã­ªæ¨ï á®åà ­¥­¨ï ä ©«  á ¢ë§®¢®¬ ®ª­  ¤¨ «®£ 
187
; äã­ªæ¨ï á®åà ­¥­¨ï ä ©«  á ¢ë§®¢®¬ ®ª­  ¤¨ «®£ 
186
align 4
188
align 4
Line 267... Line 269...
267
	mov edi,dword[edit]
269
	mov edi,dword[edit]
268
	cmp ted_panel_id,TED_PANEL_SYNTAX
270
	cmp ted_panel_id,TED_PANEL_SYNTAX
269
	jne @f
271
	jne @f
270
		stdcall dword[tl_node_get_data], tree1
272
		stdcall dword[tl_node_get_data], tree1
271
		mov [fn_col_option],eax
273
		mov [fn_col_option],eax
272
		mov ebx,eax
-
 
273
		call open_unpac_synt_file
274
		stdcall open_unpac_synt_file,eax
274
		cmp ebx,-1
275
		cmp ebx,-1
275
		je @f
276
		je @f
Line 276... Line 277...
276
 
277
 
277
		call [ted_text_colored]
278
		call [ted_text_colored]
Line 280... Line 281...
280
	ret
281
	ret
281
endp
282
endp
Line 282... Line 283...
282
 
283
 
283
;®âªàë⨥ ¨ à á¯ ª®¢ª  ä ©«  ¯®¤á¢¥âª¨ ᨭ⠪á¨á 
284
;®âªàë⨥ ¨ à á¯ ª®¢ª  ä ©«  ¯®¤á¢¥âª¨ ᨭ⠪á¨á 
284
;input:
285
;input:
285
; ebx - 㪠§ â¥«ì ­  ¨¬ï ®âªà뢠¥¬®£® ä ©«  ᨭ⠪á¨á  (¡¥§ ¯ã⨠¨ ¯ ¯ª¨ info)
286
; f_name - 㪠§ â¥«ì ­  ¨¬ï ®âªà뢠¥¬®£® ä ©«  ᨭ⠪á¨á  (¡¥§ ¯ã⨠¨ ¯ ¯ª¨ info)
286
;output:
287
;output:
287
; ebx - ç¨á«® ¯à®ç¨â ­­ëå ¡ ©â ¨§ ä ©« 
288
; ebx - ç¨á«® ¯à®ç¨â ­­ëå ¡ ©â ¨§ ä ©« 
288
; ecx - à §àãè ¥âáï
289
; ecx - à §àãè ¥âáï
289
align 4
290
align 4
290
open_unpac_synt_file:
291
proc open_unpac_synt_file uses eax edi esi, f_name:dword
291
push eax edi esi
292
	mov ebx,[f_name]
292
	mov edi,last_open_synt_file
293
	mov edi,last_open_synt_file
293
	stdcall strcmp,ebx,edi ;áà ¢­¨¢ ¥¬ ¨¬ï ¯®¤ª«î祭­®£® ä ©«  á ¯®¤ª«î祭­ë¬ à ­¥¥ ä ©«®¬
294
	stdcall strcmp,ebx,edi ;áà ¢­¨¢ ¥¬ ¨¬ï ¯®¤ª«î祭­®£® ä ©«  á ¯®¤ª«î祭­ë¬ à ­¥¥ ä ©«®¬
294
	test eax,eax
295
	test eax,eax
Line 295... Line 296...
295
	jz @f
296
	jz @f
296
 
297
 
297
	;ª®¯¨à㥬 ¨¬ï ¯®¤ª«î祭­®£® ä ©«  (¤«ï ¨§¡¥¦ ­¨ï ¯®¢â®à­ëå ¯®¤ª«î祭¨©)
298
	;ª®¯¨à㥬 ¨¬ï ¯®¤ª«î祭­®£® ä ©«  (¤«ï ¨§¡¥¦ ­¨ï ¯®¢â®à­ëå ¯®¤ª«î祭¨©)
298
	mov esi,ebx
299
	mov esi,ebx
299
	mov ecx,32
300
	mov ecx,32/4
Line 300... Line 301...
300
	cld
301
	cld
301
	rep movsb
302
	rep movsd
302
 
303
 
303
	copy_path ebx,fn_syntax_dir,syntax_path,0
304
	copy_path ebx,fn_syntax_dir,syntax_path,0
304
	copy_path syntax_path,sys_path,file_name,0
305
	copy_path syntax_path,sys_path,file_name,0
305
	mov edi, tedit0
306
	mov edi, tedit0
306
	mov [run_file_70.Function], 0
307
	mov [run_file_70.Function], SSF_READ_FILE
307
	mov [run_file_70.Position], 0
308
	mov [run_file_70.Position], 0
308
	mov [run_file_70.Flags], 0
309
	mov [run_file_70.Flags], 0
309
	mov ecx, ted_syntax_file_size
310
	mov ecx, ted_syntax_file_size
310
	mov dword[run_file_70.Count], ecx
311
	mov dword[run_file_70.Count], ecx
311
	m2m dword[run_file_70.Buffer], ted_syntax_file
312
	m2m dword[run_file_70.Buffer], ted_syntax_file
312
	mov byte[run_file_70+20], 0
313
	mov byte[run_file_70+20], 0
313
	mov [run_file_70.FileName], file_name
314
	mov [run_file_70.FileName], file_name
314
	mcall 70, run_file_70
315
	mcall SF_FILE, run_file_70
315
	cmp ebx,-1
316
	cmp ebx,-1
316
	jne .end_0
317
	jne .end_0
Line 335... Line 336...
335
		cld
336
		cld
336
		rep movsb
337
		rep movsb
337
		.end_unpack:
338
		.end_unpack:
338
		stdcall [ted_init_syntax_file], tedit0
339
		stdcall [ted_init_syntax_file], tedit0
339
	@@:
340
	@@:
340
pop esi edi eax
-
 
341
	ret
341
	ret
-
 
342
endp
Line 342... Line 343...
342
 
343
 
343
;description:
344
;description:
344
; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ ¯®¨áª 
345
; ¢ë§®¢/áªàë⨥ ¯ ­¥«¨ ¯®¨áª 
345
align 4
346
align 4
Line 401... Line 402...
401
align 4
402
align 4
402
but_find_key_w:
403
but_find_key_w:
403
	cmp byte[wnd_k_words_run],0
404
	cmp byte[wnd_k_words_run],0
404
	jne @f
405
	jne @f
405
		pushad
406
		pushad
406
		mcall 51,1,prop_start,thread_coords
407
		mcall SF_CREATE_THREAD,1,prop_start,thread_coords
407
		popad
408
		popad
408
	@@:
409
	@@:
409
	ret
410
	ret
Line 410... Line 411...
410
 
411