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:
Rus 2007-07-29 02:06:58 +00:00
parent c2cb1b6183
commit df6f93e4eb
6 changed files with 77 additions and 6 deletions

View File

@ -22,6 +22,10 @@
; 4.0.5 (mike.dld and Rus)
; bug-fixes:
; - 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)
; bug-fixes:
; - statusbar contained hint after dialog operation cancelled
@ -613,6 +617,7 @@ accel_table2 dd \
'HSG',btn.hscroll_down ,\
'TBL',btn.tabctl_right ,\
'TBG',btn.tabctl_left ,\
177 , key.ctrl_f4 ,\ ; close current tab button
0
accel_table2_botdlg dd \
@ -621,6 +626,7 @@ accel_table2_botdlg dd \
20002,btn.bot.opensave ,\
20003,btn.bot.find ,\
20004,btn.bot.appearance,\
20007, btn.bot.no ,\
21001,btn.bot.tabpos ,\
0

View File

@ -160,7 +160,15 @@ osdlg_handler:
push 20001 s_2cancel s_2cancel.size
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]
sub eax,6*(s_2filename.size+1)+1
add eax,6*(s_2filename.size+1)*65536
@ -604,6 +612,15 @@ botdlg.button:
call drawwindow
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:
movzx ecx,[tb_find.length]
mov [s_search.size],ecx

View File

@ -197,7 +197,30 @@ func draw_main_menu ;/////////////////////////////////////////////////////////
jmp @b
.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
cross:
db 'X'
endf
;-----------------------------------------------------------------------------

View File

@ -130,8 +130,14 @@ func key.ctrl_o ;///// ENTER OPEN FILENAME ///////////////////////////////////
mov [bot_dlg_mode2],0
.direct:
cmp [bot_dlg_mode2], 2
je .ask
mov [s_status],s_enter_filename
jmp .ask1
.ask:
mov [s_status],s_ask_save
.ask1:
mov [bot_mode],1
mov [bot_dlg_height],16*2+4*2-1
mov [bot_dlg_handler],osdlg_handler
@ -148,8 +154,8 @@ endf
;-----------------------------------------------------------------------------
func key.ctrl_s ;///// ENTER SAVE FILENAME ///////////////////////////////////
;-----------------------------------------------------------------------------
cmp [cur_editor.FilePath],'/'
jne key.shift_ctrl_s
cmp [cur_editor.FilePath], 0
je key.shift_ctrl_s
cmp [cur_editor.Modified],0
je .exit
call save_file
@ -1486,11 +1492,17 @@ endf
;-----------------------------------------------------------------------------
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
push [tab_bar.Current.Ptr]
cmp [tab_bar.Items.Count],1
jne @f
call create_tab
;call create_tab
jmp key.alt_x.close ; close program
@@: pop ebp
call delete_tab
dec [do_not_draw]
@ -1564,7 +1576,11 @@ func key.alt_x ;///// EXIT PROGRAM ///////////////////////////////////////////
mov [f_info70+21],f_info.path
mcall 70,f_info70
.bgn_rp:
call key.ctrl_f4
.close:
cmp [tab_bar.Items.Count],1
jne .bgn_rp
mov [main_closed],1
mcall -1
endf

View File

@ -174,6 +174,10 @@ lsz s_2save,\
ru,'‘®åà ­¨âì',\
en,'Save',\
et,'Salvesta'
lsz s_2save_no,\
ru,'<27>¥â',\
en,'No',\
et,'No'
lsz s_2find,\
ru,'<27> ©â¨',\
en,'Find',\
@ -202,6 +206,11 @@ lsz s_enter_filename,\
en,<'Enter filename',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,\
ru,<'‚¢¥¤¨â¥ ⥪áâ ¤«ï ¯®¨áª ',0>,\
en,<'Enter text to find',0>,\

View File

@ -108,10 +108,10 @@ func create_tab ;///// ADD TAB TO THE END ////////////////////////////////////
rep stosb
mov esi,s_defname
mov edi,cur_editor.FilePath
mov edi,cur_editor.FilePath + 1
mov ecx,s_defname.size
rep movsb
mov [cur_editor.FileName],0
mov [cur_editor.FileName],1
mov [cur_editor.Modified],0
mov [cur_editor.AsmMode],0