forked from KolibriOS/kolibrios
add save files Ctrl+S and Ctrl+Shift+S
git-svn-id: svn://kolibrios.org@7571 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
48512ae4ad
commit
6eefd8e3f5
@ -243,27 +243,33 @@ proc ted_key, edit:dword, table:dword, control:dword
|
||||
cmp ah,24 ;Ctrl+O
|
||||
jne @f
|
||||
cmp ted_fun_on_key_ctrl_o,0
|
||||
je @f
|
||||
je .end_key_fun
|
||||
call ted_fun_on_key_ctrl_o
|
||||
@@:
|
||||
cmp ah,31 ;Ctrl+S
|
||||
jne @f
|
||||
jne .end_ctrl_s
|
||||
cmp ted_fun_on_key_ctrl_s,0
|
||||
je @f
|
||||
call ted_fun_on_key_ctrl_s
|
||||
je .end_key_fun
|
||||
xor eax,eax
|
||||
test esi,KM_SHIFT
|
||||
jz @f
|
||||
inc eax
|
||||
@@:
|
||||
call ted_fun_on_key_ctrl_s
|
||||
jmp .end_key_fun
|
||||
.end_ctrl_s:
|
||||
cmp ah,33 ;Ctrl+F
|
||||
jne @f
|
||||
cmp ted_panel_id,TED_PANEL_FIND
|
||||
je @f
|
||||
cmp ted_fun_on_key_ctrl_f,0
|
||||
je @f
|
||||
je .end_key_fun
|
||||
call ted_fun_on_key_ctrl_f
|
||||
@@:
|
||||
cmp ah,49 ;Ctrl+N
|
||||
jne @f
|
||||
cmp ted_fun_on_key_ctrl_n,0
|
||||
je @f
|
||||
je .end_key_fun
|
||||
call ted_fun_on_key_ctrl_n
|
||||
@@:
|
||||
; *** ¢ë§®¢ ¢ãâ२å äãªæ¨©
|
||||
|
@ -194,21 +194,24 @@ popad
|
||||
ret
|
||||
endp
|
||||
|
||||
;input:
|
||||
; eax ¥á«¨ à ¢¥: 0 - á®åà ¥¨¥ ¡¥§ ¤¨ «®£ , 1 - á®åà ¥¨¥ á ¤¨ «®£®¬
|
||||
;description:
|
||||
; äãªæ¨ï á®åà ¥¨ï ä ©«
|
||||
align 4
|
||||
proc ted_but_save_file
|
||||
;*** ¢ë§®¢ ¤¨ «®£®¢®£® ®ª ¤«ï á®åà ¥¨ï ä ©«
|
||||
or eax,eax
|
||||
jnz .init_dlg
|
||||
; á®åà 塞 ¡¥§ ¢ë§®¢ ¤¨ «®£®¢®£® ®ª
|
||||
cmp byte[openfile_path],0
|
||||
jne @f
|
||||
.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
|
||||
jmp @f
|
||||
.no_dlg: ; á®åà 塞 ¡¥§ ¢ë§®¢ ¤¨ «®£®¢®£® ®ª
|
||||
cmp byte[openfile_path],0
|
||||
je .init_dlg ; ® ¥á«¨ ¯ãâì ¯ãá⮩ â® ¢á¥-¦¥ ¢ë§ë¢ ¥¬
|
||||
@@:
|
||||
stdcall [ted_save_file],tedit0,run_file_70,openfile_path
|
||||
.end_save:
|
||||
@ -220,9 +223,9 @@ endp
|
||||
align 4
|
||||
proc mem_cpy uses ecx esi edi, destination:dword, source:dword, len:dword
|
||||
cld
|
||||
mov esi, dword[source]
|
||||
mov edi, dword[destination]
|
||||
mov ecx, dword[len]
|
||||
mov esi,[source]
|
||||
mov edi,[destination]
|
||||
mov ecx,[len]
|
||||
rep movsb
|
||||
ret
|
||||
endp
|
||||
@ -233,8 +236,8 @@ align 4
|
||||
proc mem_spac uses eax ecx edi, mem:dword, len:dword
|
||||
cld
|
||||
mov al,' '
|
||||
mov edi, dword[mem]
|
||||
mov ecx, dword[len]
|
||||
mov edi,[mem]
|
||||
mov ecx,[len]
|
||||
repne stosb
|
||||
ret
|
||||
endp
|
||||
|
File diff suppressed because one or more lines are too long
@ -32,6 +32,13 @@ draw_but_toolbar: ;
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+3],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Save as
|
||||
@@:
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+4],0
|
||||
jnc @f
|
||||
add edx,30 shl 16
|
||||
call draw_but_icon ;Select word
|
||||
@ -43,14 +50,14 @@ draw_but_toolbar: ;
|
||||
and ecx,0xffff
|
||||
@@:
|
||||
inc cx
|
||||
bt word[panel_but+4],0
|
||||
bt word[panel_but+5],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Cut
|
||||
@@:
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+5],0
|
||||
bt word[panel_but+6],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Copy
|
||||
@ -62,7 +69,7 @@ draw_but_toolbar: ;
|
||||
and ecx,0xffff
|
||||
@@:
|
||||
inc cx
|
||||
bt word[panel_but+6],0
|
||||
bt word[panel_but+7],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Paste
|
||||
@ -70,21 +77,21 @@ draw_but_toolbar: ;
|
||||
or ecx,0x40000000
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+7],0
|
||||
bt word[panel_but+8],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Found
|
||||
@@:
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+8],0
|
||||
bt word[panel_but+9],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Replace
|
||||
@@:
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+9],0
|
||||
bt word[panel_but+10],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Key words
|
||||
@ -96,21 +103,21 @@ draw_but_toolbar: ;
|
||||
and ecx,0xffff
|
||||
@@:
|
||||
inc cx
|
||||
bt word[panel_but+10],0
|
||||
bt word[panel_but+11],0
|
||||
jnc @f
|
||||
add edx,30 shl 16
|
||||
call draw_but_icon ;Upper
|
||||
@@:
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+11],0
|
||||
bt word[panel_but+12],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Lower
|
||||
@@:
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+12],0
|
||||
bt word[panel_but+13],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Reverse
|
||||
@ -123,7 +130,7 @@ draw_but_toolbar: ;
|
||||
and ecx,0xffff
|
||||
@@:
|
||||
inc cx
|
||||
bt word[panel_but+13],0
|
||||
bt word[panel_but+14],0
|
||||
jnc @f
|
||||
add edx,30 shl 16
|
||||
call draw_but_icon ;Undo
|
||||
@ -135,7 +142,7 @@ draw_but_toolbar: ;
|
||||
and ecx,0xffff
|
||||
@@:
|
||||
inc cx
|
||||
bt word[panel_but+14],0
|
||||
bt word[panel_but+15],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Redo
|
||||
@ -143,19 +150,12 @@ draw_but_toolbar: ;
|
||||
or ecx,0x40000000
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+15],0
|
||||
bt word[panel_but+16],0
|
||||
jnc @f
|
||||
add edx,30 shl 16
|
||||
call draw_but_icon ;Invisible on|off
|
||||
@@:
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+16],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon
|
||||
@@:
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+17],0
|
||||
jnc @f
|
||||
@ -165,13 +165,20 @@ draw_but_toolbar: ;
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+18],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;Ïîäñâåòêà âêë|âûêë
|
||||
@@:
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+19],0
|
||||
jnc @f
|
||||
add edx,30 shl 16
|
||||
call draw_but_icon ;cp 1251 -> 866
|
||||
@@:
|
||||
|
||||
inc cx
|
||||
bt word[panel_but+19],0
|
||||
bt word[panel_but+20],0
|
||||
jnc @f
|
||||
add edx,25 shl 16
|
||||
call draw_but_icon ;cp 866 -> 1251
|
||||
|
@ -215,40 +215,42 @@ mov ebp,lib0
|
||||
mov byte[panel_but+1],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_save,1
|
||||
mov byte[panel_but+2],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_select,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_save_as,1
|
||||
mov byte[panel_but+3],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_cut,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_select,1
|
||||
mov byte[panel_but+4],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_copy,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_cut,1
|
||||
mov byte[panel_but+5],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_paste,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_copy,1
|
||||
mov byte[panel_but+6],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_find,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_paste,1
|
||||
mov byte[panel_but+7],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_replace,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_find,1
|
||||
mov byte[panel_but+8],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_key_words,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_replace,1
|
||||
mov byte[panel_but+9],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_upper,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_key_words,1
|
||||
mov byte[panel_but+10],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_lower,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_upper,1
|
||||
mov byte[panel_but+11],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_reverse,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_lower,1
|
||||
mov byte[panel_but+12],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_undo,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_reverse,1
|
||||
mov byte[panel_but+13],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_redo,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_undo,1
|
||||
mov byte[panel_but+14],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_invisible,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_redo,1
|
||||
mov byte[panel_but+15],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_syntax_list,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_invisible,1
|
||||
mov byte[panel_but+16],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_syntax_mode,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_syntax_list,1
|
||||
mov byte[panel_but+17],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_convert_1251_866,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_syntax_mode,1
|
||||
mov byte[panel_but+18],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_convert_866_1251,1
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_convert_1251_866,1
|
||||
mov byte[panel_but+19],al
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_but_convert_866_1251,1
|
||||
mov byte[panel_but+20],al
|
||||
;ä ©«®¢ë¥ à áè¨à¥¨ï
|
||||
xor edx,edx
|
||||
mov ebx,synt_auto_open
|
||||
@ -410,8 +412,8 @@ key:
|
||||
cmp ah,69 ;[Pause Break]
|
||||
je still
|
||||
|
||||
stdcall KeyConvertToASCII, dword conv_tabl
|
||||
stdcall [edit_box_key], dword edit2
|
||||
stdcall KeyConvertToASCII, conv_tabl
|
||||
stdcall [edit_box_key], edit2
|
||||
jmp still
|
||||
@@:
|
||||
|
||||
@ -433,90 +435,98 @@ button:
|
||||
@@:
|
||||
cmp ah,5
|
||||
jne @f
|
||||
call ted_but_save_file
|
||||
xor eax,eax
|
||||
call ted_but_save_file ;á®åà ¥¨¥ ¡¥§ ¤¨ «®£
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,6
|
||||
jne @f
|
||||
stdcall [ted_but_select_word], tedit0
|
||||
xor eax,eax
|
||||
inc eax
|
||||
call ted_but_save_file ;á®åà ¥¨¥ á ¤¨ «®£®¬
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,7
|
||||
jne @f
|
||||
stdcall [ted_but_cut], tedit0
|
||||
stdcall [ted_but_select_word], tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,8
|
||||
jne @f
|
||||
stdcall [ted_but_copy], tedit0
|
||||
stdcall [ted_but_cut], tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,9
|
||||
jne @f
|
||||
stdcall [ted_but_paste], tedit0
|
||||
stdcall [ted_but_copy], tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,10
|
||||
jne @f
|
||||
call ted_but_find
|
||||
stdcall [ted_but_paste], tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,11
|
||||
jne @f
|
||||
call but_replace
|
||||
call ted_but_find
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,12
|
||||
jne @f
|
||||
call but_find_key_w
|
||||
call but_replace
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,13
|
||||
jne @f
|
||||
stdcall [ted_but_sumb_upper], tedit0
|
||||
call but_find_key_w
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,14
|
||||
jne @f
|
||||
stdcall [ted_but_sumb_lover], tedit0
|
||||
stdcall [ted_but_sumb_upper], tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,15
|
||||
jne @f
|
||||
stdcall [ted_but_reverse], tedit0
|
||||
stdcall [ted_but_sumb_lover], tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,16
|
||||
jne @f
|
||||
stdcall [ted_but_undo], tedit0
|
||||
stdcall [ted_but_reverse], tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,17
|
||||
jne @f
|
||||
stdcall [ted_but_redo], tedit0
|
||||
stdcall [ted_but_undo], tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,18
|
||||
jne @f
|
||||
stdcall but_sumb_invis, tedit0
|
||||
stdcall [ted_but_redo], tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,19
|
||||
jne @f
|
||||
stdcall but_k_words_show, tedit0
|
||||
stdcall but_sumb_invis, tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,20
|
||||
jne @f
|
||||
stdcall but_synt_show, tedit0
|
||||
stdcall but_k_words_show, tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,21
|
||||
jne @f
|
||||
stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866
|
||||
stdcall but_synt_show, tedit0
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,22
|
||||
jne @f
|
||||
stdcall [ted_but_convert_by_table],tedit0,tbl_1251_866
|
||||
jmp still
|
||||
@@:
|
||||
cmp ah,23
|
||||
jne @f
|
||||
stdcall [ted_but_convert_by_table],tedit0,tbl_866_1251
|
||||
jmp still
|
||||
|
@ -10,6 +10,7 @@ scroll_type=0
|
||||
but_new=1
|
||||
but_open=1
|
||||
but_save=1
|
||||
but_save_as=1
|
||||
but_select=1
|
||||
but_cut=1
|
||||
but_copy=1
|
||||
|
@ -5,6 +5,7 @@ sz_main_menu_File db '
|
||||
sz_main_menu_File_New db '<27>®¢ë©', 0
|
||||
sz_main_menu_File_Open db '<27>âªàëâì', 0
|
||||
sz_main_menu_File_Save db '‘®åà ¨âì', 0
|
||||
sz_main_menu_File_Save_As db '‘®åà ¨âì ª ª', 0
|
||||
sz_main_menu_File_Exit db '‚ë室', 0
|
||||
|
||||
sz_main_menu_Changes db 'ˆ§¬¥¥¨ï', 0
|
||||
@ -35,6 +36,7 @@ sz_main_menu_File db 'File', 0
|
||||
sz_main_menu_File_New db 'New', 0
|
||||
sz_main_menu_File_Open db 'Open', 0
|
||||
sz_main_menu_File_Save db 'Save', 0
|
||||
sz_main_menu_File_Save_As db 'Save as', 0
|
||||
sz_main_menu_File_Exit db 'Exit', 0
|
||||
|
||||
sz_main_menu_Changes db 'Changes', 0
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.5 KiB |
Loading…
Reference in New Issue
Block a user