forked from KolibriOS/kolibrios
4.0.5 (Rus)
bug-fixes: - correct call save-dialog for saving new files or files from folder of tinypad new features: - added prompt to save file before closing - added close tab button git-svn-id: svn://kolibrios.org@595 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
c2cb1b6183
commit
df6f93e4eb
@ -22,6 +22,10 @@
|
|||||||
; 4.0.5 (mike.dld and Rus)
|
; 4.0.5 (mike.dld and Rus)
|
||||||
; bug-fixes:
|
; bug-fixes:
|
||||||
; - a new tab is created when opening a file from folder of tinypad
|
; - a new tab is created when opening a file from folder of tinypad
|
||||||
|
; - correct call save-dialog for saving new files or files from folder of tinypad
|
||||||
|
; new features:
|
||||||
|
; - added prompt to save file before closing
|
||||||
|
; - added close tab button
|
||||||
; 4.0.4 (mike.dld)
|
; 4.0.4 (mike.dld)
|
||||||
; bug-fixes:
|
; bug-fixes:
|
||||||
; - statusbar contained hint after dialog operation cancelled
|
; - statusbar contained hint after dialog operation cancelled
|
||||||
@ -613,6 +617,7 @@ accel_table2 dd \
|
|||||||
'HSG',btn.hscroll_down ,\
|
'HSG',btn.hscroll_down ,\
|
||||||
'TBL',btn.tabctl_right ,\
|
'TBL',btn.tabctl_right ,\
|
||||||
'TBG',btn.tabctl_left ,\
|
'TBG',btn.tabctl_left ,\
|
||||||
|
177 , key.ctrl_f4 ,\ ; close current tab button
|
||||||
0
|
0
|
||||||
|
|
||||||
accel_table2_botdlg dd \
|
accel_table2_botdlg dd \
|
||||||
@ -621,6 +626,7 @@ accel_table2_botdlg dd \
|
|||||||
20002,btn.bot.opensave ,\
|
20002,btn.bot.opensave ,\
|
||||||
20003,btn.bot.find ,\
|
20003,btn.bot.find ,\
|
||||||
20004,btn.bot.appearance,\
|
20004,btn.bot.appearance,\
|
||||||
|
20007, btn.bot.no ,\
|
||||||
21001,btn.bot.tabpos ,\
|
21001,btn.bot.tabpos ,\
|
||||||
0
|
0
|
||||||
|
|
||||||
|
@ -160,7 +160,15 @@ osdlg_handler:
|
|||||||
push 20001 s_2cancel s_2cancel.size
|
push 20001 s_2cancel s_2cancel.size
|
||||||
call define_3d_button
|
call define_3d_button
|
||||||
|
|
||||||
mov ebp,tb_opensave
|
cmp [bot_dlg_mode2], 2 ; exit-save dialog
|
||||||
|
jne @f
|
||||||
|
|
||||||
|
sub ebx,(6*(s_2save_no.size+2)+3)*65536
|
||||||
|
mov bx,6*(s_2save_no.size+2)
|
||||||
|
push 20007 s_2save_no s_2save_no.size
|
||||||
|
call define_3d_button
|
||||||
|
|
||||||
|
@@: mov ebp,tb_opensave
|
||||||
mov eax,[p_info.client_box.width]
|
mov eax,[p_info.client_box.width]
|
||||||
sub eax,6*(s_2filename.size+1)+1
|
sub eax,6*(s_2filename.size+1)+1
|
||||||
add eax,6*(s_2filename.size+1)*65536
|
add eax,6*(s_2filename.size+1)*65536
|
||||||
@ -604,6 +612,15 @@ botdlg.button:
|
|||||||
call drawwindow
|
call drawwindow
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
btn.bot.no:
|
||||||
|
call key.ctrl_f4.close
|
||||||
|
xor eax,eax
|
||||||
|
mov [bot_mode],al
|
||||||
|
mov [bot_dlg_height],eax
|
||||||
|
mov [s_status],eax
|
||||||
|
call drawwindow
|
||||||
|
ret
|
||||||
|
|
||||||
btn.bot.find:
|
btn.bot.find:
|
||||||
movzx ecx,[tb_find.length]
|
movzx ecx,[tb_find.length]
|
||||||
mov [s_search.size],ecx
|
mov [s_search.size],ecx
|
||||||
|
@ -197,7 +197,30 @@ func draw_main_menu ;/////////////////////////////////////////////////////////
|
|||||||
jmp @b
|
jmp @b
|
||||||
|
|
||||||
.exit:
|
.exit:
|
||||||
|
mov eax, 8
|
||||||
|
mov bx, word [mainwnd_pos.w]
|
||||||
|
sub bx, 25
|
||||||
|
shl ebx, 16
|
||||||
|
add ebx, 12
|
||||||
|
|
||||||
|
mov ecx, 3 * 65536 + 12
|
||||||
|
mov edx, 177
|
||||||
|
mov esi, 0x00bcbec6
|
||||||
|
int 0x40
|
||||||
|
|
||||||
|
;mov eax, 4
|
||||||
|
shr eax, 1
|
||||||
|
sub ebx, -4 * 65536
|
||||||
|
mov bx, 6
|
||||||
|
mov ecx, 0
|
||||||
|
mov edx, cross
|
||||||
|
mov esi, 1
|
||||||
|
int 0x40
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
cross:
|
||||||
|
db 'X'
|
||||||
endf
|
endf
|
||||||
|
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
|
@ -130,8 +130,14 @@ func key.ctrl_o ;///// ENTER OPEN FILENAME ///////////////////////////////////
|
|||||||
mov [bot_dlg_mode2],0
|
mov [bot_dlg_mode2],0
|
||||||
|
|
||||||
.direct:
|
.direct:
|
||||||
|
cmp [bot_dlg_mode2], 2
|
||||||
|
je .ask
|
||||||
mov [s_status],s_enter_filename
|
mov [s_status],s_enter_filename
|
||||||
|
jmp .ask1
|
||||||
|
|
||||||
|
.ask:
|
||||||
|
mov [s_status],s_ask_save
|
||||||
|
.ask1:
|
||||||
mov [bot_mode],1
|
mov [bot_mode],1
|
||||||
mov [bot_dlg_height],16*2+4*2-1
|
mov [bot_dlg_height],16*2+4*2-1
|
||||||
mov [bot_dlg_handler],osdlg_handler
|
mov [bot_dlg_handler],osdlg_handler
|
||||||
@ -148,8 +154,8 @@ endf
|
|||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
func key.ctrl_s ;///// ENTER SAVE FILENAME ///////////////////////////////////
|
func key.ctrl_s ;///// ENTER SAVE FILENAME ///////////////////////////////////
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
cmp [cur_editor.FilePath],'/'
|
cmp [cur_editor.FilePath], 0
|
||||||
jne key.shift_ctrl_s
|
je key.shift_ctrl_s
|
||||||
cmp [cur_editor.Modified],0
|
cmp [cur_editor.Modified],0
|
||||||
je .exit
|
je .exit
|
||||||
call save_file
|
call save_file
|
||||||
@ -1486,11 +1492,17 @@ endf
|
|||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
func key.ctrl_f4 ;///// CLOSE CURRENT TAB ////////////////////////////////////
|
func key.ctrl_f4 ;///// CLOSE CURRENT TAB ////////////////////////////////////
|
||||||
;-----------------------------------------------------------------------------
|
;-----------------------------------------------------------------------------
|
||||||
|
cmp [cur_editor.Modified], 0
|
||||||
|
je .close
|
||||||
|
mov [bot_dlg_mode2], 2
|
||||||
|
jmp key.ctrl_o.direct
|
||||||
|
.close:
|
||||||
mov [do_not_draw],1
|
mov [do_not_draw],1
|
||||||
push [tab_bar.Current.Ptr]
|
push [tab_bar.Current.Ptr]
|
||||||
cmp [tab_bar.Items.Count],1
|
cmp [tab_bar.Items.Count],1
|
||||||
jne @f
|
jne @f
|
||||||
call create_tab
|
;call create_tab
|
||||||
|
jmp key.alt_x.close ; close program
|
||||||
@@: pop ebp
|
@@: pop ebp
|
||||||
call delete_tab
|
call delete_tab
|
||||||
dec [do_not_draw]
|
dec [do_not_draw]
|
||||||
@ -1564,7 +1576,11 @@ func key.alt_x ;///// EXIT PROGRAM ///////////////////////////////////////////
|
|||||||
mov [f_info70+21],f_info.path
|
mov [f_info70+21],f_info.path
|
||||||
mcall 70,f_info70
|
mcall 70,f_info70
|
||||||
|
|
||||||
|
.bgn_rp:
|
||||||
|
call key.ctrl_f4
|
||||||
.close:
|
.close:
|
||||||
|
cmp [tab_bar.Items.Count],1
|
||||||
|
jne .bgn_rp
|
||||||
mov [main_closed],1
|
mov [main_closed],1
|
||||||
mcall -1
|
mcall -1
|
||||||
endf
|
endf
|
||||||
|
@ -174,6 +174,10 @@ lsz s_2save,\
|
|||||||
ru,'‘®åà ¨âì',\
|
ru,'‘®åà ¨âì',\
|
||||||
en,'Save',\
|
en,'Save',\
|
||||||
et,'Salvesta'
|
et,'Salvesta'
|
||||||
|
lsz s_2save_no,\
|
||||||
|
ru,'<27>¥â',\
|
||||||
|
en,'No',\
|
||||||
|
et,'No'
|
||||||
lsz s_2find,\
|
lsz s_2find,\
|
||||||
ru,'<27> ©â¨',\
|
ru,'<27> ©â¨',\
|
||||||
en,'Find',\
|
en,'Find',\
|
||||||
@ -202,6 +206,11 @@ lsz s_enter_filename,\
|
|||||||
en,<'Enter filename',0>,\
|
en,<'Enter filename',0>,\
|
||||||
et,<'Sisesta failinimi',0>
|
et,<'Sisesta failinimi',0>
|
||||||
|
|
||||||
|
lsz s_ask_save,\
|
||||||
|
ru,<'†¥« ¥â¥ á®åà ¨âì?',0>,\
|
||||||
|
en,<'Would you like to save?',0>,\
|
||||||
|
et,<'Gradite conservare?',0> ; May be incorrect
|
||||||
|
|
||||||
lsz s_enter_text_to_find,\
|
lsz s_enter_text_to_find,\
|
||||||
ru,<'‚¢¥¤¨â¥ ⥪áâ ¤«ï ¯®¨áª ',0>,\
|
ru,<'‚¢¥¤¨â¥ ⥪áâ ¤«ï ¯®¨áª ',0>,\
|
||||||
en,<'Enter text to find',0>,\
|
en,<'Enter text to find',0>,\
|
||||||
|
@ -108,10 +108,10 @@ func create_tab ;///// ADD TAB TO THE END ////////////////////////////////////
|
|||||||
rep stosb
|
rep stosb
|
||||||
|
|
||||||
mov esi,s_defname
|
mov esi,s_defname
|
||||||
mov edi,cur_editor.FilePath
|
mov edi,cur_editor.FilePath + 1
|
||||||
mov ecx,s_defname.size
|
mov ecx,s_defname.size
|
||||||
rep movsb
|
rep movsb
|
||||||
mov [cur_editor.FileName],0
|
mov [cur_editor.FileName],1
|
||||||
|
|
||||||
mov [cur_editor.Modified],0
|
mov [cur_editor.Modified],0
|
||||||
mov [cur_editor.AsmMode],0
|
mov [cur_editor.AsmMode],0
|
||||||
|
Loading…
Reference in New Issue
Block a user