Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 592 → Rev 595

/programs/develop/tinypad/trunk/tinypad.asm
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
'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
20002,btn.bot.opensave ,\
20003,btn.bot.find ,\
20004,btn.bot.appearance,\
20007, btn.bot.no ,\
21001,btn.bot.tabpos ,\
0
 
/programs/develop/tinypad/trunk/tp-dialog.asm
160,7 → 160,15
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
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
/programs/develop/tinypad/trunk/tp-draw.asm
197,7 → 197,30
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
 
;-----------------------------------------------------------------------------
/programs/develop/tinypad/trunk/tp-key.asm
130,8 → 130,14
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
;-----------------------------------------------------------------------------
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
;-----------------------------------------------------------------------------
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
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
/programs/develop/tinypad/trunk/tp-locale.inc
174,6 → 174,10
ru,'‘®åà ­¨âì',\
en,'Save',\
et,'Salvesta'
lsz s_2save_no,\
ru,'¥â',\
en,'No',\
et,'No'
lsz s_2find,\
ru,' ©â¨',\
en,'Find',\
202,6 → 206,11
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>,\
/programs/develop/tinypad/trunk/tp-tabctl.asm
108,10 → 108,10
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