Subversion Repositories Kolibri OS

Rev

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

Rev 7035 Rev 7570
Line 40... Line 40...
40
align 4
40
align 4
41
On_NewFile:
41
On_NewFile:
42
	stdcall [ted_clear], tedit0,1
42
	stdcall [ted_clear], tedit0,1
43
	call draw_but_toolbar
43
	call draw_but_toolbar
44
	stdcall [ted_draw], tedit0
44
	stdcall [ted_draw], tedit0
-
 
45
	mov dword[openfile_path],0
45
	ret
46
	ret
Line 46... Line 47...
46
 
47
 
47
align 4
48
align 4
48
On_SaveAndNewFile:
49
On_SaveAndNewFile:
Line 89... Line 90...
89
	ret
90
	ret
Line 90... Line 91...
90
 
91
 
91
;description:
92
;description:
92
; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  ¡¥§ ®ª­  á®®¡é¥­¨ï
93
; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  ¡¥§ ®ª­  á®®¡é¥­¨ï
93
align 4
94
align 4
94
but_no_msg_OpenFile:
-
 
95
	push eax ebx
95
proc but_no_msg_OpenFile uses eax ebx esi
96
	stdcall [ted_open_file], tedit0,run_file_70,openfile_path
96
	stdcall [ted_open_file], tedit0,run_file_70,openfile_path
-
 
97
	call ted_messages_after_open_file
-
 
98
 
-
 
99
	mov esi,openfile_path
97
	call ted_messages_after_open_file
100
	call strlen
-
 
101
	add esi,eax
-
 
102
	@@: ;横« ¤«ï ¯®¨áª  ­ ç «  ¨¬¥­¨ ä ©« 
-
 
103
		dec esi
-
 
104
		cmp byte[esi],'/'
-
 
105
		je @f
-
 
106
		cmp byte[esi],0x5c ;'\'
-
 
107
		je @f
-
 
108
		cmp esi,openfile_path
-
 
109
		jg @b
-
 
110
	@@:
-
 
111
	inc esi
-
 
112
	call strlen
-
 
113
	cmp eax,255
-
 
114
	jle @f
-
 
115
		mov eax,255
-
 
116
	@@:
-
 
117
	inc eax ;¤«ï 0 ¢ ª®­æ¥ áâப¨
98
	pop ebx eax
118
	stdcall mem_cpy, filename_area,esi,eax ;ª®¯¨à㥬 ¨¬ï ä ©«  ¢ ¤¨ «®£ á®åà ­¥­¨ï
-
 
119
	ret
Line 99... Line 120...
99
	ret
120
endp
100
 
121
 
101
;description:
122
;description:
102
; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  á ¢®§¬®¦­ë¬ ®ª­®¬ á®®¡é¥­¨ï (® ¢®§¬®¦­®á⨠®â¬¥­¨âì ®âªàë⨥)
123
; äã­ªæ¨ï ®âªàëâ¨ï ä ©«  á ¢®§¬®¦­ë¬ ®ª­®¬ á®®¡é¥­¨ï (® ¢®§¬®¦­®á⨠®â¬¥­¨âì ®âªàë⨥)
Line 124... Line 145...
124
		call strlen
145
		call strlen
125
		cmp eax,100
146
		cmp eax,100
126
		jle .no_crop
147
		jle .no_crop
127
			mov eax,100
148
			mov eax,100
128
		.no_crop:
149
		.no_crop:
129
		stdcall mem_copy, esi,msgbox_9.fdp,eax
150
		stdcall mem_cpy, msgbox_9.fdp,esi,eax
130
		stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog'
151
		stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog'
131
		jmp .ret_f
152
		jmp .ret_f
132
	@@:
153
	@@:
133
	cmp [OpenDialog_data.status],1
154
	cmp [OpenDialog_data.status],1
134
	jne .ret_f
155
	jne .ret_f
Line 172... Line 193...
172
popad
193
popad
173
	ret
194
	ret
174
endp
195
endp
Line 175... Line 196...
175
 
196
 
176
;description:
197
;description:
177
; äã­ªæ¨ï á®åà ­¥­¨ï ä ©«  á ¢ë§®¢®¬ ®ª­  ¤¨ «®£ 
198
; äã­ªæ¨ï á®åà ­¥­¨ï ä ©« 
178
align 4
199
align 4
179
proc ted_but_save_file
200
proc ted_but_save_file
-
 
201
	;*** ¢ë§®¢ ¤¨ «®£®¢®£® ®ª­  ¤«ï á®åà ­¥­¨ï ä ©« 
180
	;*** ¢ë§®¢ ¤¨ «®£®¢®£® ®ª­  ¤«ï á®åà ­¥­¨ï ä ©« 
202
	.init_dlg:
181
	copy_path open_dialog_name,communication_area_default_path,file_name,0
203
	copy_path open_dialog_name,communication_area_default_path,file_name,0
182
	mov [OpenDialog_data.type],1
204
	mov [OpenDialog_data.type],1
183
	stdcall [OpenDialog_Start],OpenDialog_data
205
	stdcall [OpenDialog_Start],OpenDialog_data
184
	cmp [OpenDialog_data.status],1 ;if status==1 then save
206
	cmp [OpenDialog_data.status],1 ;if status==1 then save
-
 
207
	jne .end_save
-
 
208
	jmp @f
-
 
209
	.no_dlg: ; á®å࠭塞 ¡¥§ ¢ë§®¢  ¤¨ «®£®¢®£® ®ª­ 
-
 
210
		cmp byte[openfile_path],0
-
 
211
		je .init_dlg ; ­® ¥á«¨ ¯ãâì ¯ãá⮩ â® ¢á¥-¦¥ ¢ë§ë¢ ¥¬
185
	jne .end_save_file
212
	@@:
186
		stdcall [ted_save_file],tedit0,run_file_70,openfile_path
213
		stdcall [ted_save_file],tedit0,run_file_70,openfile_path
187
	.end_save_file:
214
	.end_save:
188
	ret
215
	ret
Line 189... Line 216...
189
endp
216
endp
190
 
217
 
191
;description:
218
;description:
192
; ª®¯¨à®¢ ­¨¥ ¯ ¬ïâ¨
219
; ª®¯¨à®¢ ­¨¥ ¯ ¬ïâ¨
193
align 4
220
align 4
194
proc mem_copy uses ecx esi edi, source:dword, destination:dword, len:dword
221
proc mem_cpy uses ecx esi edi, destination:dword, source:dword, len:dword
195
	cld
222
	cld
196
	mov esi, dword[source]
223
	mov esi, dword[source]
197
	mov edi, dword[destination]
224
	mov edi, dword[destination]