1) fix dialog save on press Ctrl+S
2) fix file name in dialog save file git-svn-id: svn://kolibrios.org@7570 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1842ba815f
commit
48512ae4ad
@ -1,10 +1,6 @@
|
||||
if not exist bin mkdir bin
|
||||
if not exist bin\msgbox.obj @copy msgbox.obj bin\msgbox.obj
|
||||
if not exist bin\info mkdir bin\info
|
||||
|
||||
if not exist bin\box_lib.obj @fasm.exe -m 16384 ..\..\develop\libraries\box_lib\trunk\box_lib.asm bin\box_lib.obj
|
||||
@kpack bin\box_lib.obj
|
||||
|
||||
@erase lang.inc
|
||||
@echo lang fix en >lang.inc
|
||||
@fasm.exe -m 16384 t_edit.asm bin\t_edit.kex
|
||||
|
@ -1,10 +1,6 @@
|
||||
if not exist bin mkdir bin
|
||||
if not exist bin\msgbox.obj @copy msgbox.obj bin\msgbox.obj
|
||||
if not exist bin\info mkdir bin\info
|
||||
|
||||
if not exist bin\box_lib.obj @fasm.exe -m 16384 ..\..\develop\libraries\box_lib\trunk\box_lib.asm bin\box_lib.obj
|
||||
@kpack bin\box_lib.obj
|
||||
|
||||
@erase lang.inc
|
||||
@echo lang fix ru >lang.inc
|
||||
@fasm.exe -m 16384 t_edit.asm bin\t_edit.kex
|
||||
|
@ -42,6 +42,7 @@ On_NewFile:
|
||||
stdcall [ted_clear], tedit0,1
|
||||
call draw_but_toolbar
|
||||
stdcall [ted_draw], tedit0
|
||||
mov dword[openfile_path],0
|
||||
ret
|
||||
|
||||
align 4
|
||||
@ -91,12 +92,32 @@ On_Exit:
|
||||
;description:
|
||||
; äãªæ¨ï ®âªàëâ¨ï ä ©« ¡¥§ ®ª á®®¡é¥¨ï
|
||||
align 4
|
||||
but_no_msg_OpenFile:
|
||||
push eax ebx
|
||||
proc but_no_msg_OpenFile uses eax ebx esi
|
||||
stdcall [ted_open_file], tedit0,run_file_70,openfile_path
|
||||
call ted_messages_after_open_file
|
||||
pop ebx eax
|
||||
|
||||
mov esi,openfile_path
|
||||
call strlen
|
||||
add esi,eax
|
||||
@@: ;横« ¤«ï ¯®¨áª ç « ¨¬¥¨ ä ©«
|
||||
dec esi
|
||||
cmp byte[esi],'/'
|
||||
je @f
|
||||
cmp byte[esi],0x5c ;'\'
|
||||
je @f
|
||||
cmp esi,openfile_path
|
||||
jg @b
|
||||
@@:
|
||||
inc esi
|
||||
call strlen
|
||||
cmp eax,255
|
||||
jle @f
|
||||
mov eax,255
|
||||
@@:
|
||||
inc eax ;¤«ï 0 ¢ ª®æ¥ áâப¨
|
||||
stdcall mem_cpy, filename_area,esi,eax ;ª®¯¨à㥬 ¨¬ï ä ©« ¢ ¤¨ «®£ á®åà ¥¨ï
|
||||
ret
|
||||
endp
|
||||
|
||||
;description:
|
||||
; äãªæ¨ï ®âªàëâ¨ï ä ©« á ¢®§¬®¦ë¬ ®ª®¬ á®®¡é¥¨ï (® ¢®§¬®¦®á⨠®â¬¥¨âì ®âªàë⨥)
|
||||
@ -126,7 +147,7 @@ ted_but_open_file:
|
||||
jle .no_crop
|
||||
mov eax,100
|
||||
.no_crop:
|
||||
stdcall mem_copy, esi,msgbox_9.fdp,eax
|
||||
stdcall mem_cpy, msgbox_9.fdp,esi,eax
|
||||
stdcall [mb_create],msgbox_9,thread ;message: error run 'open file dialog'
|
||||
jmp .ret_f
|
||||
@@:
|
||||
@ -174,24 +195,30 @@ popad
|
||||
endp
|
||||
|
||||
;description:
|
||||
; äãªæ¨ï á®åà ¥¨ï ä ©« á ¢ë§®¢®¬ ®ª ¤¨ «®£
|
||||
; äãªæ¨ï á®åà ¥¨ï ä ©«
|
||||
align 4
|
||||
proc ted_but_save_file
|
||||
;*** ¢ë§®¢ ¤¨ «®£®¢®£® ®ª ¤«ï á®åà ¥¨ï ä ©«
|
||||
.init_dlg:
|
||||
copy_path open_dialog_name,communication_area_default_path,file_name,0
|
||||
mov [OpenDialog_data.type],1
|
||||
stdcall [OpenDialog_Start],OpenDialog_data
|
||||
cmp [OpenDialog_data.status],1 ;if status==1 then save
|
||||
jne .end_save_file
|
||||
jne .end_save
|
||||
jmp @f
|
||||
.no_dlg: ; á®åà 塞 ¡¥§ ¢ë§®¢ ¤¨ «®£®¢®£® ®ª
|
||||
cmp byte[openfile_path],0
|
||||
je .init_dlg ; ® ¥á«¨ ¯ãâì ¯ãá⮩ â® ¢á¥-¦¥ ¢ë§ë¢ ¥¬
|
||||
@@:
|
||||
stdcall [ted_save_file],tedit0,run_file_70,openfile_path
|
||||
.end_save_file:
|
||||
.end_save:
|
||||
ret
|
||||
endp
|
||||
|
||||
;description:
|
||||
; ª®¯¨à®¢ ¨¥ ¯ ¬ïâ¨
|
||||
align 4
|
||||
proc mem_copy uses ecx esi edi, source:dword, destination:dword, len:dword
|
||||
proc mem_cpy uses ecx esi edi, destination:dword, source:dword, len:dword
|
||||
cld
|
||||
mov esi, dword[source]
|
||||
mov edi, dword[destination]
|
||||
|
File diff suppressed because one or more lines are too long
@ -276,7 +276,6 @@ mov ebp,lib0
|
||||
je @f ;if file names exist
|
||||
mov esi,openfile_path
|
||||
stdcall auto_open_syntax,esi
|
||||
call strlen ;eax=strlen
|
||||
call but_no_msg_OpenFile
|
||||
@@:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user