Subversion Repositories Kolibri OS

Rev

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

Rev 1431 Rev 1439
Line 95... Line 95...
95
START:
95
START:
96
	mcall	68,11
96
	mcall	68,11
97
;OpenDialog	initialisation
97
;OpenDialog	initialisation
98
init_OpenDialog	OpenDialog_data
98
init_OpenDialog	OpenDialog_data
Line -... Line 99...
-
 
99
 
-
 
100
	mov	edi,filename_area
-
 
101
	mov	esi,start_temp_file_name
-
 
102
	xor	eax,eax
-
 
103
	cld
-
 
104
@@:
-
 
105
	lodsb
-
 
106
	stosb
-
 
107
	test	eax,eax
-
 
108
	jnz	@b
99
 
109
 
100
	load_library	boxlib_name,cur_dir_path,buf_cmd_lin,system_path,\
110
	load_library	boxlib_name,cur_dir_path,buf_cmd_lin,system_path,\
Line 101... Line 111...
101
	err_message_found_lib,head_f_l,myimport,err_message_import,head_f_i
111
	err_message_found_lib,head_f_l,myimport,err_message_import,head_f_i
Line 1747... Line 1757...
1747
	call	Ctrl_HOME
1757
	call	Ctrl_HOME
Line 1748... Line 1758...
1748
 
1758
 
1749
	jmp	redraw_all
1759
	jmp	redraw_all
1750
;-------------------------------------------------------------------------------
1760
;-------------------------------------------------------------------------------
1751
open_dialog_save:
-
 
1752
	call	get_filter_data
1761
open_dialog_save:
1753
	mov	[OpenDialog_data.type],1	; Save
1762
	mov	[OpenDialog_data.type],1	; Save
1754
	start_OpenDialog	OpenDialog_data
1763
	start_OpenDialog	OpenDialog_data
1755
	cmp	[OpenDialog_data.status],2	; OpenDialog does not start
1764
	cmp	[OpenDialog_data.status],2	; OpenDialog does not start
1756
;	je	.sysxtree	; some kind of alternative, instead OpenDialog
1765
;	je	.sysxtree	; some kind of alternative, instead OpenDialog
Line 2747... Line 2756...
2747
	mov	[cursor],eax
2756
	mov	[cursor],eax
2748
	jmp	red
2757
	jmp	red
Line 2749... Line 2758...
2749
 
2758
 
2750
;---------------------------------------------------------------------
2759
;---------------------------------------------------------------------
2751
open_dialog:
-
 
2752
	call	get_filter_data
2760
open_dialog:
2753
	mov	[OpenDialog_data.type],0	; Open
2761
	mov	[OpenDialog_data.type],0	; Open
2754
	start_OpenDialog	OpenDialog_data
2762
	start_OpenDialog	OpenDialog_data
2755
	cmp	[OpenDialog_data.status],2	; OpenDialog does not start
2763
	cmp	[OpenDialog_data.status],2	; OpenDialog does not start
2756
	je	.sysxtree	; some kind of alternative, instead OpenDialog
2764
	je	.sysxtree	; some kind of alternative, instead OpenDialog
Line 2775... Line 2783...
2775
	sub	esi,path
2783
	sub	esi,path
2776
	mov	[edit1.size],esi
2784
	mov	[edit1.size],esi
2777
	mov	[edit1.pos],esi
2785
	mov	[edit1.pos],esi
2778
	jmp	open_file.0
2786
	jmp	open_file.0
2779
;---------------------------------------------------------------------
2787
;---------------------------------------------------------------------
2780
get_filter_data:
-
 
2781
	mov	edi,[OpenDialog_data.com_area]
-
 
2782
	test	edi,edi
-
 
2783
	jnz	@f
-
 
2784
	add	esp,4
-
 
2785
	jmp	still
-
 
2786
@@:
-
 
2787
	add	edi,4096+4
-
 
2788
	mov	esi,Filter
-
 
2789
	mov	ecx,[esi]
-
 
2790
	inc	ecx
-
 
2791
	cld
-
 
2792
	rep	movsb
-
 
2793
	mov	edi,[OpenDialog_data.com_area]
-
 
2794
	mov	[edi+4096],dword 1
-
 
2795
	ret
-
 
2796
;---------------------------------------------------------------------
-
 
2797
;##################################
2788
;##################################
2798
opendialog:
2789
opendialog:
2799
;
2790
;
2800
; STEP 1 Run SYSXTREE with parametrs MYPID 4 bytes in dec,
2791
; STEP 1 Run SYSXTREE with parametrs MYPID 4 bytes in dec,
2801
; 1 byte space, 1 byte type of dialog (O - Open ,S - Save)
2792
; 1 byte space, 1 byte type of dialog (O - Open ,S - Save)
Line 3427... Line 3418...
3427
.dir_default_pach	dd communication_area_default_pach	;+20
3418
.dir_default_pach	dd communication_area_default_pach	;+20
3428
.start_path		dd open_dialog_path	;+24
3419
.start_path		dd open_dialog_path	;+24
3429
.draw_window		dd draw_window_1	;+28
3420
.draw_window		dd draw_window_1	;+28
3430
.status			dd 0	;+32
3421
.status			dd 0	;+32
3431
.openfile_pach 		dd fname_buf	;+36
3422
.openfile_pach 		dd fname_buf	;+36
-
 
3423
.filename_area		dd filename_area	;+40
-
 
3424
.filter_area		dd Filter
Line 3432... Line 3425...
3432
 
3425
 
3433
communication_area_name:
3426
communication_area_name:
3434
	db 'FFFFFFFF_open_dialog',0
3427
	db 'FFFFFFFF_open_dialog',0
3435
open_dialog_path:
3428
open_dialog_path:
3436
	db '/sys/File Managers/opendial',0
3429
	db '/sys/File Managers/opendial',0
3437
communication_area_default_pach:
3430
communication_area_default_pach:
Line 3438... Line 3431...
3438
	db '/rd/1',0
3431
	db '/rd/1',0
3439
 
3432
 
-
 
3433
Filter:
3440
Filter:
3434
dd	Filter.end - Filter.1
3441
dd	Filter.end - Filter
3435
.1:
3442
db	'BIN',0
3436
;db	'BIN',0
3443
db	'DAT',0
3437
;db	'DAT',0
-
 
3438
.end:
-
 
3439
db	0
3444
.end:
3440
 
Line 3445... Line 3441...
3445
db	0
3441
start_temp_file_name:	db 'temp.bin',0
3446
;---------------------------------------------------------------------
3442
;---------------------------------------------------------------------
3447
 
3443
 
Line 3492... Line 3488...
3492
 
3488
 
3493
func_70	f70
3489
func_70	f70
3494
;---------------------------------------------------------------------
3490
;---------------------------------------------------------------------
3495
fname_buf:
3491
fname_buf:
-
 
3492
	rb 4096
3496
	rb 4096
3493
;---------------------------------------------------------------------
3497
temp_dir_pach:
3494
temp_dir_pach:
3498
	rb 4096
3495
	rb 4096
-
 
3496
;---------------------------------------------------------------------
-
 
3497
filename_area:
-
 
3498
	rb 256
3499
;---------------------------------------------------------------------
3499
;---------------------------------------------------------------------
3500
D_END:
3500
D_END: