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
|
; data
|
||||||
str_title db 'FTP client for KolibriOS',0
|
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
|
db 10,0
|
||||||
str_srv_addr db 'Please enter ftp server address.',10,0
|
str_srv_addr db 'Please enter ftp server address.',10,0
|
||||||
|
|
||||||
|
@ -68,9 +68,6 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
|||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
|
|
||||||
stdcall [ted_init], tedit0
|
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
|
stdcall dword[edit_box_set_text], edit_volume, root_dir
|
||||||
|
|
||||||
; initialize tree list elements
|
; initialize tree list elements
|
||||||
@ -164,7 +161,7 @@ gui: ;//////////////////////////////////////////////////////////////////////////
|
|||||||
stdcall [ted_draw], tedit0
|
stdcall [ted_draw], tedit0
|
||||||
|
|
||||||
; draw "disconnect" button
|
; draw "disconnect" button
|
||||||
mcall 8, <50,85>, <25,25>, 3, BT_COL
|
mcall 8, <50,95>, <25,25>, 3, BT_COL
|
||||||
; string "disconnect"
|
; string "disconnect"
|
||||||
mcall 4, <50+5,25+5>, 0xb0000000+STR_COL, str_disconnect
|
mcall 4, <50+5,25+5>, 0xb0000000+STR_COL, str_disconnect
|
||||||
; draw "Copy" button
|
; draw "Copy" button
|
||||||
@ -981,7 +978,7 @@ wScr2:
|
|||||||
align 4
|
align 4
|
||||||
tedit0:
|
tedit0:
|
||||||
.wnd BOX 50,355,325,240 ;+ 0 195,5+40,325,240
|
.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_m db 0 ;+32
|
||||||
.drag_k db 0 ;+33
|
.drag_k db 0 ;+33
|
||||||
.sel rb 16 ;+34
|
.sel rb 16 ;+34
|
||||||
@ -998,7 +995,7 @@ tedit0:
|
|||||||
.color_wnd_capt dd BT_COL ;+102
|
.color_wnd_capt dd BT_COL ;+102
|
||||||
.color_wnd_work dd 0xffffff ;+106
|
.color_wnd_work dd 0xffffff ;+106
|
||||||
.color_wnd_bord dd 0x737373 ;+110
|
.color_wnd_bord dd 0x737373 ;+110
|
||||||
.color_select dd 0x0000ff ;+114
|
.color_select dd 0xA4C4E4 ;+114
|
||||||
.color_cur_text dd 0xffff00 ;+118
|
.color_cur_text dd 0xffff00 ;+118
|
||||||
.color_wnd_text dd 0x000000 ;+122
|
.color_wnd_text dd 0x000000 ;+122
|
||||||
.syntax_file dd 0 ;+126
|
.syntax_file dd 0 ;+126
|
||||||
|
@ -45,21 +45,33 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
|||||||
align 4
|
align 4
|
||||||
.draw:
|
.draw:
|
||||||
mcall 12, 1
|
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
|
call .draw_editboxes
|
||||||
|
|
||||||
; draw "connect" button
|
; draw "connect" button
|
||||||
mcall 8, <162,65>, <150,25>, 2, BT_COL
|
mcall 8, <162,65>, <150,25>, 2, [sc.work_button]
|
||||||
|
|
||||||
; draw strings
|
; draw strings
|
||||||
mcall 4, <3, 8>, 0xb0000000, gui_str_usr
|
mov ecx, 0x90000000
|
||||||
mcall , <3,pad*1+8>, , gui_str_pass
|
or ecx, [sc.work_text]
|
||||||
mcall , <3,pad*2+8>, , gui_str_server
|
mcall 4, <3, 8>, , gui_str_usr
|
||||||
mcall , <3,pad*3+8>, , gui_str_port
|
mcall , <3,pad*1+8>, , gui_str_pass
|
||||||
mcall , <3,pad*4+8>, , gui_str_path
|
mcall , <3,pad*2+8>, , gui_str_server
|
||||||
mcall , <167,155>, 0xb0000000+STR_COL, gui_str_connect
|
mcall , <3,pad*3+8>, , gui_str_port
|
||||||
mcall , <3,115>, 0xb0ff0000, [str_error_addr]
|
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
|
mov [str_error_addr], gui_str_null ; reset error string address
|
||||||
|
|
||||||
mcall 12, 2
|
mcall 12, 2
|
||||||
@ -90,7 +102,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
|||||||
jz .exit
|
jz .exit
|
||||||
|
|
||||||
dec ah ; 'Connect' button clicked
|
dec ah ; 'Connect' button clicked
|
||||||
jz gui.main
|
jz .connect
|
||||||
|
|
||||||
jmp .still
|
jmp .still
|
||||||
|
|
||||||
@ -98,7 +110,7 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
|||||||
mcall 2
|
mcall 2
|
||||||
|
|
||||||
cmp ah,13
|
cmp ah,13
|
||||||
je gui.main
|
je .connect
|
||||||
|
|
||||||
cmp ah,9
|
cmp ah,9
|
||||||
je .tab
|
je .tab
|
||||||
@ -111,6 +123,13 @@ login_gui: ;////////////////////////////////////////////////////////////////////
|
|||||||
|
|
||||||
jmp .still
|
jmp .still
|
||||||
|
|
||||||
|
.connect:
|
||||||
|
cmp [param_server_addr], 0
|
||||||
|
jne gui.main
|
||||||
|
|
||||||
|
mov [str_error_addr], gui_str_no_srvr
|
||||||
|
jmp .redraw
|
||||||
|
|
||||||
.error:
|
.error:
|
||||||
mov [str_error_addr], gui_str_error
|
mov [str_error_addr], gui_str_error
|
||||||
jmp .server_addr
|
jmp .server_addr
|
||||||
@ -163,7 +182,8 @@ gui_str_pass db 'Password:',0
|
|||||||
gui_str_server db 'Server:',0
|
gui_str_server db 'Server:',0
|
||||||
gui_str_port db 'Port:',0
|
gui_str_port db 'Port:',0
|
||||||
gui_str_path db 'Path:',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
|
gui_str_null db ' ',0
|
||||||
|
|
||||||
str_error_addr dd gui_str_null
|
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_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_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
|
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