forked from KolibriOS/kolibrios
ftpc 0.15: use system colors for login, show error if no server set, fix letter spacing in edit0 at main window
git-svn-id: svn://kolibrios.org@7489 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
07093dfc10
commit
faea42b346
2
programs/network/ftpc/build.bat
Normal file
2
programs/network/ftpc/build.bat
Normal file
@ -0,0 +1,2 @@
|
||||
fasm ftpc.asm ftpc
|
||||
pause
|
@ -750,7 +750,7 @@ exit2:
|
||||
|
||||
; data
|
||||
str_title db 'FTP client for KolibriOS',0
|
||||
str_welcome db 'FTP client for KolibriOS v0.14',10
|
||||
str_welcome db 'FTP client for KolibriOS v0.15',10
|
||||
db 10,0
|
||||
str_srv_addr db 'Please enter ftp server address.',10,0
|
||||
|
||||
|
@ -68,9 +68,6 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
;;================================================================================================;;
|
||||
|
||||
stdcall [ted_init], tedit0
|
||||
mov dword[tedit0.rec.width], 9
|
||||
mov dword[tedit0.rec.height], 16
|
||||
|
||||
stdcall dword[edit_box_set_text], edit_volume, root_dir
|
||||
|
||||
; initialize tree list elements
|
||||
@ -164,7 +161,7 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
||||
stdcall [ted_draw], tedit0
|
||||
|
||||
; draw "disconnect" button
|
||||
mcall 8, <50,85>, <25,25>, 3, BT_COL
|
||||
mcall 8, <50,95>, <25,25>, 3, BT_COL
|
||||
; string "disconnect"
|
||||
mcall 4, <50+5,25+5>, 0xb0000000+STR_COL, str_disconnect
|
||||
; draw "Copy" button
|
||||
@ -981,7 +978,7 @@ wScr2:
|
||||
align 4
|
||||
tedit0:
|
||||
.wnd BOX 50,355,325,240 ;+ 0 195,5+40,325,240
|
||||
.rec BOX 30,13,7,10 ;+16
|
||||
.rec BOX 30,13,6,10 ;+16
|
||||
.drag_m db 0 ;+32
|
||||
.drag_k db 0 ;+33
|
||||
.sel rb 16 ;+34
|
||||
@ -998,7 +995,7 @@ tedit0:
|
||||
.color_wnd_capt dd BT_COL ;+102
|
||||
.color_wnd_work dd 0xffffff ;+106
|
||||
.color_wnd_bord dd 0x737373 ;+110
|
||||
.color_select dd 0x0000ff ;+114
|
||||
.color_select dd 0xA4C4E4 ;+114
|
||||
.color_cur_text dd 0xffff00 ;+118
|
||||
.color_wnd_text dd 0x000000 ;+122
|
||||
.syntax_file dd 0 ;+126
|
||||
|
@ -45,21 +45,33 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
||||
align 4
|
||||
.draw:
|
||||
mcall 12, 1
|
||||
mcall 0, <WIN_X,WIN_W>, <WIN_Y,WIN_H>, 0x34000000+SYS_COL, 0x805080DD, str_title
|
||||
mcall 48, 3, sc, 40
|
||||
edit_boxes_set_sys_color edit_usr,editboxes_end,sc
|
||||
mov edx, 0x34000000
|
||||
or edx, [sc.work]
|
||||
mcall 0, <WIN_X,WIN_W>, <WIN_Y,WIN_H>, , 0x805080DD, str_title
|
||||
|
||||
call .draw_editboxes
|
||||
|
||||
; draw "connect" button
|
||||
mcall 8, <162,65>, <150,25>, 2, BT_COL
|
||||
mcall 8, <162,65>, <150,25>, 2, [sc.work_button]
|
||||
|
||||
; draw strings
|
||||
mcall 4, <3, 8>, 0xb0000000, gui_str_usr
|
||||
mcall , <3,pad*1+8>, , gui_str_pass
|
||||
mcall , <3,pad*2+8>, , gui_str_server
|
||||
mcall , <3,pad*3+8>, , gui_str_port
|
||||
mcall , <3,pad*4+8>, , gui_str_path
|
||||
mcall , <167,155>, 0xb0000000+STR_COL, gui_str_connect
|
||||
mcall , <3,115>, 0xb0ff0000, [str_error_addr]
|
||||
mov ecx, 0x90000000
|
||||
or ecx, [sc.work_text]
|
||||
mcall 4, <3, 8>, , gui_str_usr
|
||||
mcall , <3,pad*1+8>, , gui_str_pass
|
||||
mcall , <3,pad*2+8>, , gui_str_server
|
||||
mcall , <3,pad*3+8>, , gui_str_port
|
||||
mcall , <3,pad*4+8>, , gui_str_path
|
||||
|
||||
mov ecx, 0x90000000
|
||||
or ecx, [sc.work_button_text]
|
||||
mcall , <167,155>, , gui_str_connect
|
||||
|
||||
mcall , <3,185>, 0xb0ff0000, [str_error_addr]
|
||||
add ebx, 1*65536
|
||||
mcall
|
||||
mov [str_error_addr], gui_str_null ; reset error string address
|
||||
|
||||
mcall 12, 2
|
||||
@ -90,7 +102,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
||||
jz .exit
|
||||
|
||||
dec ah ; 'Connect' button clicked
|
||||
jz gui.main
|
||||
jz .connect
|
||||
|
||||
jmp .still
|
||||
|
||||
@ -98,7 +110,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
||||
mcall 2
|
||||
|
||||
cmp ah,13
|
||||
je gui.main
|
||||
je .connect
|
||||
|
||||
cmp ah,9
|
||||
je .tab
|
||||
@ -110,7 +122,14 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
||||
stdcall [edit_box_key], edit_path
|
||||
|
||||
jmp .still
|
||||
|
||||
|
||||
.connect:
|
||||
cmp [param_server_addr], 0
|
||||
jne gui.main
|
||||
|
||||
mov [str_error_addr], gui_str_no_srvr
|
||||
jmp .redraw
|
||||
|
||||
.error:
|
||||
mov [str_error_addr], gui_str_error
|
||||
jmp .server_addr
|
||||
@ -163,7 +182,8 @@ gui_str_pass db 'Password:',0
|
||||
gui_str_server db 'Server:',0
|
||||
gui_str_port db 'Port:',0
|
||||
gui_str_path db 'Path:',0
|
||||
gui_str_error db 'ERROR! Check log file for details',0
|
||||
gui_str_error db 'Error! Check log file for details',0
|
||||
gui_str_no_srvr db 'Error! Please set server adress',0
|
||||
gui_str_null db ' ',0
|
||||
|
||||
str_error_addr dd gui_str_null
|
||||
@ -174,5 +194,6 @@ edit_pass edit_box 300,75,pad+5, 0xffffff,0x94AECE,0,0xAABBCC,0x10000000,99,p
|
||||
edit_server edit_box 300,75,pad*2+5,0xffffff,0x94AECE,0,0xAABBCC,0x10000000,99,param_server_addr,mouse_dd,0
|
||||
edit_port edit_box 50, 75,pad*3+5,0xffffff,0x94AECE,0,0xAABBCC,0x10000000,99,param_port,mouse_dd,ed_figure_only
|
||||
edit_path edit_box 300,75,pad*4+5,0xffffff,0x94AECE,0,0xAABBCC,0x10000000,99,param_path,mouse_dd,0
|
||||
editboxes_end:
|
||||
|
||||
mouse_dd rd 1
|
||||
mouse_dd rd 1
|
||||
|
Loading…
Reference in New Issue
Block a user